# plus, minus, multiply, divide in Jira Automation: examples

URL: https://goingstellar.ro/reference/smart-values/plus-minus-multiply-divide/

These functions do arithmetic on a number smart value and take another number or number smart value as the argument. They chain, so one value can pass through several steps before it is printed or used in a field.

## Syntax

```
{{number.plus(value)}}
{{number.minus(value)}}
{{number.multiply(value)}}
{{number.divide(value)}}
```

## Arguments

- `value` (required: yes): A number or a smart value that returns a number

## Works on

- Numbers: number fields and results such as length() or a list size
- Returns: a number

## Examples

```
{{issue.comments.size.plus(issue.labels.size)}}
```

Add the number of labels to the number of comments.

Result:

```
4
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().minus(issue.comments.size)}}
```

Subtract one count from another.

Result:

```
10
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.comments.size.multiply(3)}}
```

Scale a count, for example three days per comment.

Result:

```
6
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().divide(4)}}
```

Divide a count by a fixed number.

Result:

```
3
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.plusBusinessDays(issue.comments.size.multiply(3))}}
```

Feed a calculated number into a date function: add three business days for each comment.

Result:

```
2026-12-07T16:15:14.4+0000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.comments.size.plus(1)}}
```

Number the next comment by adding one to the current count.

Result:

```
3
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- `divide()` works on whole numbers: with a summary of Hello World! (12 characters), `length().divide(5)` gives 2 and `length().divide(4)` gives 3 (checked on Jira Cloud, November 2026). Use `{{#=}}{{issue.summary.length()}} / 5{{/}}` when you need decimals.
- Dividing by zero does not raise an error: `issue.comments.size.divide(0)` printed 2, the original number, on a work item with 2 comments (checked on Jira Cloud, November 2026). A silent wrong number is harder to spot than a stopped rule.
- If the number field is empty the whole chain prints nothing, for example `issue.Story Points.plus(issue.subtasks.size)` on a work item without story points gave an empty string.

## Related

- [{{#=}} math expressions](https://goingstellar.ro/reference/smart-values/math-expressions/)
- [abs, round, floor, ceil](https://goingstellar.ro/reference/smart-values/abs-round-floor-ceil/)
- [gt(), gte(), eq(), lt(), lte()](https://goingstellar.ro/reference/smart-values/number-comparisons/)
- [format() and formatWithLocale()](https://goingstellar.ro/reference/smart-values/number-format/)
- [plusDays() / minusDays() and other units](https://goingstellar.ro/reference/smart-values/date-plus-minus/)

## Sources

- [Jira smart values: math expressions (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)

