Skip to main content

$subtract

The $subtract operator subtracts the second numeric value from the first numeric value.

Input

  • An array containing exactly two numeric values (minuend and subtrahend)

Output

  • The difference of the two input values (first - second)

Examples

Basic Subtraction

Result: 7

Field Value Subtraction

Result: The difference between revenue and expenses fields

Decimal Subtraction

Result: 10.3