> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/operators/arithmetic.md). Agents can also search and read this documentation through its [MCP server](https://docs.buildings.ability.abb/collection/~gitbook/mcp).

# Arithmetic

Calculate a numeric result from connected values and an optional fixed operand.

Use **Arithmetic** to add, subtract, multiply, or divide numeric values. For example, multiply a measurement by a fixed factor before comparing the result.

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-a455011bdb659b5eb0a36aede70ca21ed60a2e8c%2Frule-chain-arithmetic-palette.png?alt=media" alt="Arithmetic entry in the Operators palette."><figcaption><p>Arithmetic in the palette</p></figcaption></figure>

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-c52d850da96f28b729ad46c0d8468d0ed5e9d2bf%2Frule-chain-arithmetic-node.png?alt=media" alt="Configured MUL node showing Multiply by 10."><figcaption><p>Arithmetic configured to multiply by 10</p></figcaption></figure>

## Inputs and outputs

* **Inputs:** Red numeric values, used in input-pin order.
* **Output:** The numeric calculation result, shown in red. Additional output pins carry the same result.

A non-empty **Value** is included after the connected inputs. A blank Value adds no fixed operand.

## Configurable settings

Open the node's gear icon to change its settings.

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2Fgit-blob-6694802677b3a0d553bce2a100653ecf3b4ab1c2%2Frule-chain-arithmetic-settings.png?alt=media" alt="Arithmetic settings with one input, MUL and Value 10, with callouts A to F."><figcaption><p>Arithmetic settings</p></figcaption></figure>

| Reference | Setting     | Purpose                                                                                                                                          |
| --------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **\[A]**  | Input pins  | Set `1` to `100` connected numeric inputs.                                                                                                       |
| **\[B]**  | Output pins | Displays the output count. This field is disabled in the settings window.                                                                        |
| **\[C]**  | Operation   | Select ADD, SUB, MUL, or DIV from the options below.                                                                                             |
| **\[D]**  | Value       | With one input, enter a numeric fixed operand. With several inputs, leave it blank to use only connected values, or enter an additional operand. |
| **\[E]**  | Note        | Explain the calculation on the node.                                                                                                             |
| **\[F]**  | Save        | Apply the node settings. Save the chain separately in the editor.                                                                                |

| Operation               | Calculation                                                                                     |
| ----------------------- | ----------------------------------------------------------------------------------------------- |
| **ADD (Add to)**        | Add all connected values, then the fixed Value if entered.                                      |
| **SUB (Subtract from)** | Start with the first input. Subtract each following input, then the fixed Value if entered.     |
| **MUL (Multiply by)**   | Multiply the values together, including the fixed Value if entered.                             |
| **DIV (Divide by)**     | Start with the first input. Divide by each following input, then by the fixed Value if entered. |

For MUL and DIV, provide at least two operands in total, such as one connected input and a fixed Value. For DIV, each divisor must be nonzero.

## Multiply a measurement by 10

Before you begin, [open the rule chain editor](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/open-the-configuration-of-an-existing-rule-chain.md) and configure [Get Data](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/nodes/get-data.md) for a numeric value. Keep the chain paused while configuring.

1. Drag **Arithmetic** from **Operators** onto the workspace.\
   ▷ The settings window opens.
2. Set **Input pins** **\[A]** to `1`.
3. Select **MUL (Multiply by)** in **Operation** **\[C]**.
4. Enter `10` in **Value** **\[D]**.
5. Enter `Scale by 10` in **Note** **\[E]**.
6. Click **Save** **\[F]**.\
   ▷ The node shows **MUL** and **Multiply by: 10**.
7. Connect the Get Data output to the Arithmetic input.
8. Connect the Arithmetic output to a numeric input, such as a [Condition](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/conditions/condition.md).
9. Set the [execution order](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/configure-rule-chain.md#set-order) so Get Data runs before Arithmetic and the next block runs after it.
10. Click **Save** in the editor.

When the chain executes, an input of `2.5` produces `25`. With two inputs of `2.5` and `4`, MUL produces `10` if Value is blank, or `100` if Value is `10`.

## Related documentation

* [Get Data](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/nodes/get-data.md) to supply numeric values.
* [Condition](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/conditions/condition.md) to compare the result.
* [Value](https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/store-values/value.md) to retain a calculated result between executions.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.buildings.ability.abb/collection/platform/alarms-rules-and-escalations/rule-chains/operators/arithmetic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
