Subtract
Subtracts one number from another, whole or decimal.
Subtract takes the second number away from the first and gives you the difference. It works with whole numbers and decimals alike. Use it for balances, remaining stock, or to count down.
Add the action
In the Process Designer toolbox, open Numerical and pick Subtract (or type Subtract in the search box).

Inputs and outputs
| Field | Direction | Type | Required | What to put / what you get |
|---|---|---|---|---|
| First number | Input | Number (whole or decimal) | Yes | The number to subtract from. |
| Second number | Input | Number (whole or decimal) | Yes | The number to take away. |
| Result | Output | Number (whole or decimal) | Yes | First number minus Second number. |
Example
| First number | Second number | Result |
|---|---|---|
10 | 4 | 6 |
4 | 10.5 | -6.5 |
5.75 | 0.25 | 5.5 |
Good to know
- Decimals are exact, with no rounding error.
- When the difference is a whole number, you get a whole number, so you can map Result to an Integer variable.
- Use a dot for decimals. A comma is read as a thousands separator and ignored (
1,5counts as15). - Text that is not a number stops the step with
Invalid input.; an empty input stops it withInput was null. Please, fill it.

