> For the complete documentation index, see [llms.txt](https://helpdocumentation.gitbook.io/user/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocumentation.gitbook.io/user/automation-apps-blocks/calculator-block.md).

# Calculator Block

The **Calculator Block** allows you to perform mathematical operations directly inside your chatbot or automation flow.

#### How to Use Calculator Block

1. In your **Bot Flow**, click on **Add Node**.
2. Select **Add Automation App**.
3. Search for **Calculator**.
4. Choose the required operation:
   * Add
   * Subtract
   * Multiply
   * Divide
   * SIP
   * Multiply V2
5. Enter or map the **First Value** (e.g., quantity from bot field).
6. Enter the **Second Value** (e.g., price or another number).
7. Click **Run** to test the calculation.
8. Click **Save** to apply it in the flow.

#### Example

If a user enters `5` tickets and each ticket costs `100`, select **Multiply**:

* First Value → `quantity`
* Second Value → `100`

Output → `500`

You can then save this output into a variable and use it in messages, confirmations, or further automation steps.

The Calculator block is useful for dynamic pricing, totals, discounts, tax calculations, EMI, SIP, and other numeric operations within your WhatsApp chat flow.

{% embed url="<https://youtu.be/CG9cnw8gcQQ>" %}


---

# 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://helpdocumentation.gitbook.io/user/automation-apps-blocks/calculator-block.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.
