Inline Calculations

An inline calculation embeds a formula directly in your text. You see the formula while editing; respondents see the computed result.

For example, a paragraph containing Your total: ⌈@price * @qty⌉ per month displays as “Your total: 150 per month” when a respondent fills in the fields.

Adding a calculation

Type /calculate (also matches /calc, /formula, /math) inside a text block to insert a calculation inline. You can also add one from the + menu — it’s listed as Calculate under Content.

Writing the formula

Inline calculations use the same formula syntax as variables — @ references, arithmetic operators, numbers, and functions. The formula is evaluated at runtime using the respondent’s current answers and variable values.

Where calculations can appear

  • Paragraphs
  • Headings
  • Field labels

Number formatting in results

When a calculation produces a number from a number field with a custom format (prefix, suffix, decimal padding), the result inherits that format automatically:

  • ⌈@price * 1.1⌉ displays as $11.00 when @price is a $ field with 2 decimal places and padding
  • ⌈@total / 2⌉ keeps the $ prefix
  • ⌈MAX(@price_a, @price_b)⌉ displays with the shared $ format

The format carries through only when there’s no ambiguity. It’s dropped, and the result shows as a plain rounded number, in cases like:

  • Operands with different formats (one $, one %)
  • A calculation that cancels the format, like ⌈@price / @other_price⌉ (a unitless ratio)
  • Aggregates whose arguments don’t all share the same format

Variables follow the same rules: a variable that computes a number from a formatted field keeps the format, so referencing it later in text shows the formatted value.

Tips

  • Inline calculations are great for showing totals, scores, or personalized summaries without needing a separate variable
  • For complex computations, define a variable first and then reference it in the calculation — keeps things readable
  • If the formula can’t be parsed, @ references are still replaced with their values as plain text