Calculate
Work out a number: pick an operation (add, divide, power, round up, average, percent of ...) or write a formula such as ($price$ * $qty$) * (1 + $tax$ / 100).
Command in the Number toolkit · id ooa.number/calculate · 6 inputs, 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Operation | String | No | add | What to work out. Percent of: A percent of B. Percentage change: from A to B, in percent. Round, round up and round down use Decimals. |
| Number A | Number | No | The first number (the only one for square root, absolute, negate, round and the parts). | |
| Number B | Number | No | The second number: what is added, subtracted, multiplied by, divided by, the power, or the whole for Percent of. | |
| Numbers | List | No | The numbers, as a List variable or [1, 2, 3]; empty items are left out. | |
| Formula | Any | No | A calculation with variables, brackets and functions, e.g. ($price$ * $qty$) * (1 + $tax$ / 100) or round(average($prices$), 2). | |
| Decimals | Number | No | Round the result half up to this many decimals; empty keeps it as it is (Round, Round up and Round down: 0 when empty). |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Number | The result of the calculation. |