# Calculating Complex Formulas in Text Documents

From LibreOffice Help

You can use predefined functions in a formula, and then insert the result of the calculation into a text document.

For example, to calculate the mean value of three numbers, do the following:

- Click in the document where you want to insert the formula, and then press F2.
- Click the
**Formula**icon, and choose "Mean" from the Statistical Functions list. - Type the three numbers, separated by vertical slashes (|).
- Press
**Enter**. The result is inserted as a field into the document.

To edit the formula, double-click the field in the document.

**Related Topics**

Displaying the Result of a Table Calculation in a Different Table

Calculating and Pasting the Result of a Formula in a Text Document