REDUCE function
Runs through an array with a LAMBDA, carrying an accumulator from step to step, and returns only the final accumulated value.
Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024
Excel 2024 and laterWorks in Google Sheets
Syntax
REDUCE([initial_value], array, lambda(accumulator, value))| Argument | What it means | |
|---|---|---|
initial_value | Optional | The starting value of the accumulator, for example 0 for a total or 1000 for an opening balance. |
array | Required | The values to process, one at a time from left to right, top to bottom. |
lambda | Required | A LAMBDA with two parameters: the accumulator so far and the current value. Its result becomes the new accumulator. |
Returns: The final value of the accumulator after the last element.
How REDUCE works
REDUCE boils a whole list down to one answer by repeating a step. It starts with an initial value, takes the first item and combines the two with your LAMBDA, then takes that result and combines it with the second item, and so on until the list ends. The running value is called the accumulator.
For plain totals SUM is simpler, but REDUCE handles rules that ordinary functions cannot express, such as compounding growth rates, applying a sequence of percentage changes, or adding values only when they meet a condition. If you want to see every intermediate step rather than just the end result, use SCAN, which works the same way but returns the whole running list.
Examples
1Total of large orders only
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Amount | ||
| 2 | SO-301 | 85 | 465 | |
| 3 | SO-302 | 140 | ||
| 4 | SO-303 | 60 | ||
| 5 | SO-304 | 220 | ||
| 6 | SO-305 | 105 |
Result: 465
Starting from 0, each amount above 100 is added: 140 + 220 + 105 = 465. Amounts of 100 or less add 0. (SUMIF could do this particular job too; REDUCE shows the pattern.)
2Grow an investment through yearly returns
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Year | Return | ||
| 2 | 2023 | 0.05 | 1059.87 | |
| 3 | 2024 | 0.03 | ||
| 4 | 2025 | -0.02 |
Result: 1059.87
1,000 grows by 5% to 1,050, then by 3% to 1,081.50, then falls 2% to 1,059.87. The returns are shown as decimals here; formatted as percentages they read 5%, 3% and -2%.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The LAMBDA does not have exactly two parameters. | Use LAMBDA(acc, value, ...). |
#CALC! | The calculation returns an error or an unexpected array. | Test the step on a single value first, e.g. =LAMBDA(acc, x, acc+x)(0, B2). |
Tips
- If you omit
initial_value, keep the comma:REDUCE(, B2:B6, ...). The accumulator then starts empty, which for addition behaves like 0 — but a clear starting value is easier to read. - REDUCE can return an array as its final value, which allows advanced tricks such as building a list with VSTACK step by step.
Google Sheets
REDUCE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.