> For the complete documentation index, see [llms.txt](https://formulapro.shadebridge.com/formula-pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://formulapro.shadebridge.com/formula-pro/formula-pro-custom-functions/math.md).

# Math & Arithmetic

Formula Pro math functions with optional string concatenation support for formatted values.

***

## ADD / PLUS

Adds numbers together. With `enableStringConcatenation`, concatenates strings when operands are non-numeric.

**Syntax:** `ADD(operand1, operand2, ...)` or `PLUS(...)`

**Example:**

```
ADD(5, 10, 15)
```

**Result:** `30`

**Example:**

```
ADD(100, 50)
```

**Result:** `150`

***

## MINUS / SUBTRACT

Subtracts operands sequentially: first - second - third - ...

**Syntax:** `MINUS(operand1, operand2, ...)` or `SUBTRACT(...)`

**Example:**

```
MINUS(100, 30, 10)
```

**Result:** `60`

***

## MULTIPLY

Multiplies all operands. Returns product.

**Syntax:** `MULTIPLY(operand1, operand2, ...)`

**Example:**

```
MULTIPLY(5, 4, 2)
```

**Result:** `40`

***

## DIVIDE

Divides numbers. Wraps Formula.js DIVIDE (handles division by zero).

**Syntax:** `DIVIDE(numerator, denominator)`

**Example:**

```
DIVIDE(100, 4)
```

**Result:** `25`

***

## RAND\_BETWEEN

Returns a random integer between min and max (inclusive).

**Syntax:** `RAND_BETWEEN(min, max)`

**Example:**

```
RAND_BETWEEN(1, 100)
```

**Result:** (varies) e.g. `42`

***

## Comparison Operators

Formula Pro provides comparison functions that work with both numbers and strings:

| Function                 | Alias   | Description |
| ------------------------ | ------- | ----------- |
| EQUAL                    | IS      | `a === b`   |
| NOT\_EQUAL               | IS\_NOT | `a !== b`   |
| LESS\_THAN               |         | `a < b`     |
| LESS\_THAN\_OR\_EQUAL    |         | `a <= b`    |
| GREATER\_THAN            |         | `a > b`     |
| GREATER\_THAN\_OR\_EQUAL |         | `a >= b`    |

**Example:**

```
IF(GREATER_THAN({item's Number}, 10), "High", "Low")
```

**Example:**

```
IF(IS({item's Status}, "Done"), "Complete", "Incomplete")
```

***

## String Concatenation Mode

When `enableStringConcatenation` is enabled (in automation context), ADD and MINUS can concatenate strings:

* **ADD** with strings: concatenates without separator (e.g., `"A" + "B"` → `"AB"`)
* **MINUS** with strings: joins with `" - "` (e.g., `"A" - "B"` → `"A - B"`)

This supports formatted arithmetic patterns like `"A - 5"` where continued operations preserve the format.
