> ## Documentation Index
> Fetch the complete documentation index at: https://80x.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Formula

> The Formula block (Calculations) evaluates a math expression over number or currency variables and returns one numeric result.

The **Formula** block (Calculations) evaluates a math expression over number or currency variables and returns one numeric result. A variable is a value the workflow has already produced, such as a field from the record that started the run.

**Formula** is a logic block. A logic block runs inside the workflow without calling any outside service, so it consumes no credits. It supports only the four arithmetic operators `+`, `-`, `/`, and `*`. That makes it the right tool for ratios, multipliers, and running totals. It is a poor fit for anything that needs powers (exponents) or remainders (modulo).

| | |
| - | - |
| **Category** | Calculations |
| **Credit cost** | Free. Logic blocks consume no credits. |
| **Engine** | New Workflows engine (June 2026+) |
| **Plan availability** | All plans |
| **Limits** | Operators limited to `+`, `-`, `/`, and `*`. Operates on number and currency values only. |

## Inputs

| Input | Type | Required | Default | Notes |
| - | - | - | - | - |
| Formula | Expression | Yes | None | A math expression built from `+`, `-`, `/`, and `*` over number or currency variables and literals, such as `{{ trigger.record.mrr }} * 12`. |

The block reads each variable as a number. A currency value contributes its numeric amount. So when you multiply a currency by a plain number, you get a number in the same currency scale.

## Outputs

| Output | Type | Example | Notes |
| - | - | - | - |
| Result | Number | `48000` | The evaluated result of the expression. |

Reference the result in a later block as `{{ steps.formula.result }}`.

## Behavior

The block evaluates the expression once per run and returns a single number. It does not write the result anywhere on its own. To store the result on a record, pass `{{ steps.formula.result }}` into an [Update record](/reference/records/update-record) or [Update list entry](/reference/lists/update-list-entry) block later in the workflow.

An empty or null variable has no numeric value. So an expression that references one can fail the run instead of treating the variable as zero. Give each variable a fallback to keep that from happening.

The operator set is limited to `+`, `-`, `/`, and `*`. Because of this, multi-step math is best split across more than one **Formula** block. Compute an intermediate result in the first block, then feed `{{ steps.formula.result }}` into the next.

## Gotchas

* **An empty variable fails the run.** A referenced variable can be null, for example an `mrr` attribute that was never filled in. When that happens, the expression has no number to operate on and the block errors. Wrap the variable in a fallback so it resolves to a number, such as `{{ trigger.record.mrr | default: 0 }}`, before it reaches the formula.
* **The result vanishes unless you save it.** **Formula** returns `{{ steps.formula.result }}` as a run variable only. It never writes to a record by itself. Add an [Update record](/reference/records/update-record) block after it to persist the value to an attribute.
* **Unsupported operators are rejected.** The block accepts only `+`, `-`, `/`, and `*`. Operators outside that set, such as exponentiation (`^`) or modulo (`%`), are not available. For a power, a remainder, or any expression the four operators cannot express, use the [Execute code](/reference/calculations/execute-code) block instead.
* **A long chained expression breaks silently on edit.** Packing several operations into one expression makes it hard to audit and easy to mis-edit. Keep each **Formula** block to one readable calculation. Split multi-step math across several blocks so a teammate can follow it.

## Examples

### Calculating annual recurring revenue from monthly

This formula turns a monthly recurring revenue attribute into an annual figure and writes it back to the deal.

| Field | Value |
| - | - |
| Formula | `{{ trigger.record.mrr }} * 12` |

For a deal with an `mrr` of `4000`, the block returns `48000`. Pass `{{ steps.formula.result }}` into an [Update record](/reference/records/update-record) block to save it to the `arr` attribute.

### Computing a win rate with a null-safe denominator

This formula divides closed-won deals by total deals to produce a win rate, guarding against a zero or empty total.

| Field | Value |
| - | - |
| Formula | `{{ steps.won_count.result }} / {{ steps.total_count.result \| default: 1 }}` |

For `30` won deals out of `120` total, the block returns `0.25`. The `default: 1` fallback keeps an empty total from failing the run. A downstream [Update record](/reference/records/update-record) block then writes the rate onto the company.

### Applying a discount multiplier to a quote

This formula multiplies a currency amount by a discount factor to compute a net price.

| Field | Value |
| - | - |
| Formula | `{{ trigger.record.list_price }} * 0.85` |

For a `list_price` of `2000` USD, the block returns `1700`, expressed in the same currency. Store it on the `net_price` attribute with an [Update record](/reference/records/update-record) block.

## Source

[Attio Workflows block library](https://attio.com/help/reference/automations/workflows/workflows-block-library).

Last reviewed against the Attio Help Center, June 2026.

## See also

* [Aggregate values](/reference/calculations/aggregate-values)
* [Execute code](/reference/calculations/execute-code)
* [Update record](/reference/records/update-record)
* [Variables & data passing](/explanation/variables)
* [Attio Workflows block library](https://attio.com/help/reference/automations/workflows/workflows-block-library)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.