# Calculations Table

Since RSpace 1.47 you can add a special table element that supports Excel-like formulas. This allows for doing basic mathematical calculations on tabular data inside text fields.

To insert a Calculations Table you must be in edit mode in a document text field. Click in the text field to create an insertion point for your file. Go to the editor toolbar above the text field, and find the ‘Insert Calculations Table’ button. This will open a window like the one in the screenshot below.

Inside the ‘Calculations Table’ dialog you can edit the content of the table and also add/remove columns and rows (try right-click menu). When editing a table cell you can insert a plain value, or a formula. The formula has to start with an equals sign (=) and will be calculated after switching to another cell. Inside the formula you can reference another cell with $A1 or A1 syntax, similarly to Excel.

When you finish editing the table click on ‘Insert’, and the table will be added to the text field. When the calculation table is added to the field it is treated as any other field element, and can be moved around or deleted. Double-click on the table (or use context menu action) to re-open it for editing.

The list of supported operations includes:

- math functions:
`+`

`-`

`*`

`/`

`^`

- logical functions:
`=`

`>`

`<`

`>=`

`<=`

`<>`

`NOT`

- trigonometric functions: SIN, ASIN, etc.
- other formulas like: SUM, SQRT, LOG, ROUND, IF, AND, OR

Examples of other formulae:

`=SUM(A1:C1)`

-> add values from cells A1, B1, C1`=ROUND(B1/C1, 2)`

-> divide value of B2 and B3, round to two decimal places`=SUMIF(A1:C1, ‘>1’)`

-> add A1, B1, C1 values that are larger than 1

A longer list of available functions is available here.