Entering Formulas
You can enter formulas in several ways: using the icons, or by typing on the keyboard, or by a mixture of both methods.

Click the cell in which you want to enter the formula.

Click the Function icon on the Formula Bar.
You will now see an equals sign in the input line and you can begin to input the formula.

After entering the required values, press Enter or click Accept to insert the result in the active cell. If you want to clear your entry in the input line, press Escape or click Cancel.
You can also enter the values and the formulas directly into the cells, even if you cannot see an input cursor. Formulas must always begin with an equals sign.
You can also press the + or  key on the numerical keyboard to start a formula. NumLock must be "on". For example, press the following keys in succession:
+ 5 0  8 Enter
You see the result 42 in the cell. The cell contains the formula =+508.
If you are editing a formula with references, the references and the associated cells will be highlighted with the same color. You can now resize the reference border using the mouse, and the reference in the formula displayed in the input line also changes. Show references in color can be deactivated under LibreOffice  PreferencesTools  Options  LibreOffice Calc  View.
If an error occurs when creating the formula, an error message appears in the active cell.