If you’re working in a LibreOffice Writer document, and need to do some simple calculations, instead of opening the Windows Calculator, you can perform the calculations directly in Writer.

We’ll show you how to calculate simple equations in LibreOffice Writer using the Formula bar and the Calculate function. You can also use pre-defined functions in your equations, such as mean (average), square root, and power.

## Performing Simple Calculations

The Formula bar in LibreOffice Writer allows you to perform simple calculations while working in a text document. To enter an equation to calculate, first place the cursor where you want to insert the result in your document. Then, press F2 to access the Formula bar. Type an equals sign (=) and the equation you want to calculate with no spaces. Press Enter.

The result of your calculation is inserted at the cursor and the Formula bar is hidden again. The result is highlighted in gray because it is a field.

## Calculating Complex Formulas Using Predefined Functions

The Formula bar includes predefined functions you can use in your calculations. For example, to calculate the mean, or average, of a set of numbers, press F2 to access the Formula bar and then click the “fx” button on the bar. Then, select Statistical Functions > Mean from the popup menu.

The function name is inserted into the Formula bar with a space after it. Note that the cursor might not be in the Formula bar after inserting the function. If not, click in the empty space to the right of the function name on the Formula bar to put the cursor at the end of the equation so far. Then, enter the numbers for which you want to calculate the mean, separated by vertical bars. and press Enter.

The result of your function calculation is inserted at the cursor and the Formula bar is hidden again. Again, the result is highlighted in gray because it is a field.

The online help for LibreOffice Writer provides help on how to enter the values for each type of function available on the Formula bar.

## Viewing the Formula

As we’ve said, when you calculate an equation using the Formula bar, the result that displays is a field, showing the field value by default. You can easily view the equation in the field by switching to viewing field names. To do this, press Ctrl+F9, or select View > Field Names. This is handy if you’ve calculated an equation using the Formula bar in your document in the past and don’t remember what the equation was.

To switch back to viewing the result, press Ctrl+F9 again, or select View > Field Names again.

## Changing the Formula

Once you’ve calculated an equation or function using one of the methods described above, you can change it and get a different result. As we mentioned, the answer is inserted into your document as a field, and you can edit this field. To do so, simply double-click on the result highlighted in gray.

The Edit Fields dialog box displays. The Type of field is Insert Formula and the formula itself is in the Formula box. You can edit the formula in the Formula box and then click “OK” when you’re done making changes.

The result is updated to reflect the changes.

## Calculating a Formula Already Existing in Your Document

If you already have an existing equation in your LibreOffice Writer document, you can easily calculate the equation and insert the result without using the Formula bar. Select the equation you want to calculate.

Select Tools > Calculate, or press Ctrl+Plus sign (+).

Put the cursor where you want to insert the answer and press Ctrl+V to paste the result.

When calculating existing equations using this last method, the result is not a field and is not linked to the equation. If you change the equation, you must select and calculate it again and paste the result again.

Comments: