Subtract

Subtracts one number from another.

Node id math/subtract

The Subtract node outputs a - b.

Inputs

NameTypeDefaultNotes
anumber0
bnumber0

Outputs

NameTypeNotes
resultnumber

Behaviour

  • Defaults. Both inputs default to 0: with only b set, the result is -b, like Negate.
  • Invalid math. Subtracting Infinity from itself gives NaN, with no error.
  • Add: the opposite operation.
  • Negate: flips the sign of one number.
  • Abs: the size of a difference, whatever its sign.
© 2026 Wirepaint