> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/strategies/tokens/using-the-math-token-for-mathematical-calculations.md).

# Using the {math=} Token for Mathematical Calculations

#### How does it work?

Just use the token {math=} followed by the operation you want to perform. The system processes the calculation and returns the result automatically.

**Examples:**

* `{math=1 + 1}` → 2
* `{math=(10 + 30) * 2}` → 80
* `{math={contactfield=id} * 2}` → returns the lead's ID field value multiplied by 2

#### Available operators:

You can use the main mathematical operators:

* Addition: +
* Subtraction: -
* Multiplication: \*
* Division: /
* Use of parentheses for precedence: ()<br>

Be careful with decimal numbers

The system does not recognize commas in numbers. Always use a dot (.) as the decimal separator.

**Incorrect example:**

`{math=1.000,32 + 10}` → Error

**Correct example:**\
\
`{math=1000.32 + 10}` → 1010.32

#### Where to use

This token is useful in various contexts, such as:

* Automatic calculations with lead data
* Dynamic messages with personalized values
* Automations of conditional logic based on numbers

#### Conclusion

With the {math=} token you have more flexibility and intelligence in your automations. Try different formulas and make your communications even more precise and automated!

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/strategies/tokens/using-the-math-token-for-mathematical-calculations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
