REDUCE Function

Works through an array, building up a running result, and returns the final value.

Category

Logical

Available in

Microsoft 365, Excel 2024

Returns

A single accumulated result

Taught hands-on in Level 5: Expert Techniques & Workbook Architecture - Modern Functions module

Overview

REDUCE starts with an initial value — the “accumulator” — then visits each item in an array. At every step your LAMBDA decides what the accumulator becomes.

When it's done, you get the final accumulator. It can count, total, compound or even build up tables, depending on what the LAMBDA does.

Syntax

=REDUCE([initial_value], array, lambda(accumulator, value))

Arguments

ArgumentRequired?What it does
initial_valueOptionalWhere the accumulator starts, such as 0 or 1000.
arrayYesThe values to work through.
lambdaYesA LAMBDA with two parameters: the accumulator so far, and the current value. It returns the new accumulator.

Examples

Example 1 — Compound growth

Grow 1,000 by each month's rate in turn.

D2fx=REDUCE(1000, B2:B5, LAMBDA(bal, r, bal*(1+r)))
ABCD
1MonthGrowthEnding
2Jan5%1102.26
3Feb3%
4Mar-2%
5Apr4%
=REDUCE(1000, B2:B5, LAMBDA(bal, r, bal*(1+r))) Explain
  1. Starts at 1,000.
  2. Jan: 1,000 × 1.05 = 1,050. Feb: × 1.03 = 1,081.50.
  3. Mar: × 0.98 = 1,059.87. Apr: × 1.04 = 1,102.26.

Example 2 — Counting with your own rule

Count how many sales are 500 or more.

=REDUCE(0, B2:B13, LAMBDA(n, v, IF(v>=500, n+1, n))) Explain
Simple counts are easier with COUNTIF. Reach for REDUCE when the rule depends on the running result.

Common mistakes

  • The LAMBDA has one parameter. REDUCE always passes two values — accumulator then current value — so the LAMBDA needs both.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.