Value1 + Value2 Value1 + Value2

Value1

Number Number

The number to add together with the other number (the first addend ).

Value2

Number Number

The number to add together with the other number (the second addend ).

Returns

Number Number

The sum of the numbers.

Adds two numbers together and returns the result. 2 + 42 + 4 returns 6.

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

Adding together many values

The SUM function is equivalent to this operator. These formulas both return 6:

1 + 2 + 3
1 + 2 + 3

SUM (1, 2, 3)
SUM (1; 2; 3)

However, SUM can be invoked with arrays with an arbitrary number of elements. To add all the elements of NumberArray together and return the result, use this formula:

SUM (NumberArray)
SUM (NumberArray)

"Logical or"

Spreadsheet users often use + to mean "logical or" (disjunction) when manipulating logical arrays. This operator only adds numbers together, so use the "logical or" operator || instead. This formula returns those elements which are greater than 5 or are less than 2:

FILTER (NumberArray, (NumberArray > 5) || (NumberArray < 2))
FILTER (NumberArray; (NumberArray > 5) || (NumberArray < 2))

Refer to the documentation of the || operator for an in-depth example.

Examples

2 + 4
2 + 4

Returns 6.

{ 1, 2 } + 6
{ 1; 2 } + 6

Returns the array { 7, 8 }{ 7; 8 }, equivalent to { 1 + 6, 2 + 6 }{ 1 + 6; 2 + 6 }.

{ 1, 2 } + { 6, 7 }
{ 1; 2 } + { 6; 7 }

Returns the array { 7, 9 }{ 7; 9 }, equivalent to { 1 + 6, 2 + 7 }{ 1 + 6; 2 + 7 }.

FILTER (NumberArray, (NumberArray > 5) || (NumberArray < 2))
FILTER (NumberArray; (NumberArray > 5) || (NumberArray < 2))

Returns elements which are greater than 5 or less than 2. This example uses the || operator for "logical or" (disjunction), as the + operator only adds numbers together.

Value1 + Value2 Value1 + Value2

Value1

Temporal Temporal

The date to add a number of days to.

Value2

Number Number

The number of days to add.

Returns

Temporal Temporal

The date arrived at by adding the given number of days to the given date.

Adds a number of days to a date and returns the resulting date. DATE (2024, 1, 1) + 7 DATE (2024; 1; 1) + 7 returns January 8, 2024.

The number of days need not be a whole number. Adding 0.5 advances the date by twelve hours, and adding a negative number moves the date backwards.

Examples

DATE (2024, 1, 1) + 7
DATE (2024; 1; 1) + 7

Returns January 8, 2024.

TODAY () + 1
TODAY () + 1

Returns tomorrow's date.

Date + 7
Date + 7

Returns the date one week after Date .

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell