Subtraction operator (-)

Value1 - Value2

Value1

Number or { Number }

The number to subtract from (the minuend).

Value2

Number or { Number }

The number which should be substracted from the first number (the subtrahend).

Returns

Number or { Number }

The difference between the numbers.

Subtracts one number from another and returns the result. 8 - 38 - 3 returns 5.

This operator also works with arrays. { 8, 9 } - 6{ 8; 9 } - 6 returns the array { 2, 3 }{ 2; 3 } (equivalent to { 8 - 6, 9 - 6 }{ 8 - 6; 9 - 6 }) and { 8, 9 } - { 6, 10 }{ 8; 9 } - { 6; 10 } returns the array { 2, -1 }{ 2; -1 } (equivalent to { 8 - 6, 9 - 10 }{ 8 - 6; 9 - 10 }).

Subtracting many values

The SUM function is equivalent to this operator, provided that all parameters other than the first one are negated.

These formulas both return 5:

8 - 38 - 3
SUM(8, -3)SUM(8; -3)

However, SUM can be invoked with arrays with an arbitrary number of elements. To subtract the field values of the Field2:Field4Field2:Field4 range from the value of Field1 and return the result, use this formula:

SUM(Field1, -Field2:Field4)SUM(Field1; -Field2:Field4)

(The Field2:Field4Field2:Field4 range is a short-hand way of expressing an array containing Field2 and Field4, as well as any fields that appear between them, such as Field3. If only Field3 appears between the other two fields, Field2:Field4Field2:Field4 and { Field2, Field3, Field4 }{ Field2; Field3; Field4 } are equivalent.)

Examples

8 - 38 - 3

Returns 5.

{ 8, 9 } - 6{ 8; 9 } - 6

Returns the array { 2, 3 }{ 2; 3 }, equivalent to { 8 - 6, 9 - 6 }{ 8 - 6; 9 - 6 }.

{ 8, 9 } - { 6, 10 }{ 8; 9 } - { 6; 10 }

Returns the array { 2, -1 }{ 2; -1 }, equivalent to { 8 - 6, 9 - 10 }{ 8 - 6; 9 - 10 }.