# Using Drivers in Formulas

This article explains how to **use drivers in formulas** in Model Reef.

You will learn:

* How to reference drivers in the Formula modal.
* How drivers combine with variables and other series.
* Patterns for building driver based formulas safely.

Drivers are read-only time series that you plug into variable formulas and custom chart formulas.

{% stepper %}
{% step %}

### Referencing drivers in the Formula modal

When you open the **Formula modal** for a variable or custom series:

* A sidebar shows available drivers grouped by type.
* You can click a driver to insert a reference into the formula.
* You can also start typing the driver name and use autocomplete.

The inserted reference represents the entire time series, not a single cell.
{% endstep %}

{% step %}

### Arithmetic-only formula engine

The formula engine supports arithmetic only:

* Addition `+`
* Subtraction `-`
* Multiplication `*`
* Division `/`
* Parentheses `( )`

No IF statements, logical operators or cell-based references are allowed. Formulas operate on entire time series at once.
{% endstep %}

{% step %}

### Common driver formula patterns

Examples of patterns using drivers:

* Price and volume
  * `Revenue = Units driver × Price driver`
* Inflation or growth
  * `Cost = Base cost × (1 + Inflation driver)`
* FX adjustment
  * `Local amount = Foreign amount × FX driver`
* Scenario multiplier
  * `Scenario result = Base result × Scenario modifier driver`

Because everything is vectorised, the formula is applied across all periods of the model horizon.
{% endstep %}

{% step %}

### Combining drivers with variables

You can combine drivers with variables, for example:

* `New variable = Existing variable × Modifier driver`
* `Margin % = (Revenue variable - COGS variable) ÷ Revenue variable`

The engine takes care of aligning time indexes so that operations occur period by period.
{% endstep %}

{% step %}

### Validation and previews

The Formula modal provides:

* Syntax validation to check the formula is structurally correct.
* A preview of the resulting series, so you can see if the pattern looks right.

If a driver reference is removed or renamed, you will see an error until the formula is updated.
{% endstep %}
{% endstepper %}

## Related articles

* [Linking Drivers to Variables](/syntax/drivers-syntax/linking-drivers-to-variables.md)
* [Overriding Drivers](/syntax/scenario-syntax/overriding-drivers.md)
* [Economic Drivers](/help/drivers-variables-and-timing/economic-drivers.md)
* [Build a Staffing Cost Model](/how-tos/operations-and-unit-economics/build-a-staffing-cost-model.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.modelreef.io/syntax/drivers-syntax/using-drivers-in-formulas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
