REDUCE Function

Excel Functions › Logical

Excel 365

The Excel REDUCE function walks through an array one element at a time, carrying a running accumulator, and returns the single final value. It is Excel’s loop: anything shaped like “start with X, then for each value do Y” is a REDUCE. Where MAP gives back a same-size array, REDUCE folds everything down to one answer — and its sibling SCAN shows every intermediate step along the way.


Quick answer: to sum the values in B2:B6 but count no day for more than 10,000:
=REDUCE(0, B2:B6, LAMBDA(acc, v, acc + MIN(v, 10000)))
The accumulator acc starts at 0; for each value v the LAMBDA returns the new accumulator. After the last element, REDUCE returns the final acc.

Syntax

=REDUCE([initial_value], array, lambda(accumulator, value, body))
ArgumentDescription
initial_valueOptionalThe accumulator’s starting value. Use 0 for sums, 1 for products, "" for building text. Technically optional, but omitting it makes the start value blank — set it explicitly.
arrayRequiredThe range or array to fold, processed left-to-right, top-to-bottom.
lambdaRequiredA two-parameter LAMBDA: the running accumulator, then the current value. Whatever the body returns becomes the accumulator for the next element.

Available in: Excel for Microsoft 365 and Excel for the web only. Older versions show #NAME?. Parameter order matters: accumulator first, value second.

Fold a list to one value

Step counts sit in B2:B6, but for the challenge only the first 10,000 steps per day count. No single built-in aggregate does “cap, then sum” — REDUCE does:

ABC
1DayStepsCapped at 10,000
2Mon8,40046,600
3Tue12,750
4Wed9,100
5Thu14,300
6Fri9,100
=REDUCE(0, B2:B6, LAMBDA(acc, v, acc + MIN(v, 10000))) // returns 46,600

Trace it: acc starts at 0 → +8,400 → +10,000 (capped) → +9,100 → +10,000 (capped) → +9,100 = 46,600. Each pass, the LAMBDA’s return value becomes the next acc.

The accumulator doesn’t have to be a number — build text by appending:

=REDUCE("", A2:A6, LAMBDA(acc, v, acc & ", " & v)) // though TEXTJOIN is simpler for plain joins

Try it: watch the accumulator fold

Live demo

Pick an operation, then click Step to feed the array into the LAMBDA one value at a time and watch the accumulator change.

REDUCE vs SCAN, and real-world folds

SCAN takes exactly the same arguments but returns every intermediate accumulator instead of just the last one. Same LAMBDA, different output shape:

=REDUCE(0, B2:B6, LAMBDA(acc, v, acc+v)) // one cell: the final total
=SCAN(0, B2:B6, LAMBDA(acc, v, acc+v)) // spills 5 cells: the running total

Use REDUCE when only the destination matters, SCAN when the journey is the report.

A favorite real-world fold — apply a whole column of percentage discounts in sequence to one starting price:

=REDUCE(B1, C2:C4, LAMBDA(price, d, price*(1-d))) // stacked discounts, compounded in order

REDUCE can even accumulate an array: start with a header row and VSTACK qualifying rows onto it as you go. That pattern — REDUCE + VSTACK — is how pros build filtered, reshaped tables that no single function can produce.

Don’t over-REDUCE: plain totals are still SUM’s job. Reach for REDUCE when the step logic is custom — caps, conditions, compounding, or building something up element by element.

Errors & common pitfalls

#CALC! — the LAMBDA doesn’t declare two parameters. REDUCE always passes the accumulator and the current value. LAMBDA(v, …) with one parameter fails; you need LAMBDA(acc, v, …).

#NAME? — older Excel. REDUCE exists only in Excel for Microsoft 365 and Excel for the web. Excel 2021 and earlier don’t recognize it.

Pitfall: parameters swapped. The accumulator comes first. LAMBDA(v, acc, acc+v) still calculates — with the meanings reversed — and for non-symmetric logic like subtraction or text-building it silently produces wrong answers.

Pitfall: wrong initial_value. Starting a product at 0 returns 0 forever; starting a text-builder at 0 gives you a stray leading zero. Match the start value to the operation: 0 for sums, 1 for products, "" for text.

Pitfall: expecting a spilled column. REDUCE returns one value (unless you deliberately accumulate an array). If you wanted the running totals down the column, you wanted SCAN.

Practice workbook

📊
Download the free REDUCE practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does the Excel REDUCE function do?
REDUCE folds an array into a single value. It starts an accumulator at initial_value, then for each element runs your LAMBDA(accumulator, value, body) and carries the result forward. After the last element, the final accumulator is returned.
What's the difference between REDUCE and SCAN?
Identical arguments, different output: REDUCE returns only the final accumulator (one value); SCAN spills every intermediate accumulator (an array the size of the input). Running balance you want to see = SCAN; final balance only = REDUCE.
What's the parameter order in REDUCE's LAMBDA?
Accumulator first, current value second: LAMBDA(acc, v, body). Swapping them doesn't raise an error — the calculation just runs with the meanings reversed, which corrupts any non-symmetric logic.
When should I use REDUCE instead of SUM or SUMPRODUCT?
When the per-element step is something no built-in aggregate expresses: cap each value before adding, compound a sequence of rates, stop counting after a condition, or stack rows into a growing array. For a plain total, SUM is simpler and faster.
Why does REDUCE return #CALC!?
Usually the LAMBDA declares the wrong number of parameters — it must take exactly two (accumulator, then value) plus the body. A LAMBDA with one parameter, or a missing body, triggers the error.
Which Excel versions support REDUCE?
Excel for Microsoft 365 and Excel for the web only. Excel 2021, 2019, and earlier show #NAME?.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: LAMBDA · SCAN · MAP · BYROW · BYCOL · MAKEARRAY · VSTACK