Subtract
Last updated
Last updated
Subtracts one number from another, producing their difference. This basic math operation is useful for finding gaps between values or reducing numeric values.
a
The first number (minuend)
Number
Yes
b
The number to subtract (subtrahend)
Number
Yes
value
The difference (a minus b)
Number
Drag the Subtract node into your graph.
Connect a number (like 44
) to the "a" input.
Connect another number (like 33
) to the "b" input.
Run the graph—your output will be 10
.
Remember that subtraction is not commutative: a - b is not the same as b - a.
For absolute differences (regardless of which is larger), pair this with an Absolute node.
Add: For adding numbers together.
Multiply: For multiplying numbers together.
Spacing Adjustment: Calculate the difference between container width and content width.
Relative Positioning: Determine offsets from a base position in layouts.
Token Derivation: Create derived tokens by subtracting values from a base token.