Back to functions
Logical2026-11-221 related article

REDUCE Function in Excel

Apply a calculation to each value in an array, carrying the result forward and returning the final accumulated result.

Syntax

REDUCE([initial_value], array, lambda(accumulator, value, body))
Table of Contents

Arguments

initial_value

Optional

The starting value for the accumulator. Supply 0 for an additive total, 1 for a product, or empty text for text accumulation.

array

Required

Input array to reduce.

lambda

Required

A LAMBDA with two input parameters: the accumulated result and the current array value. Its final calculation returns the next accumulated result.

What it returns

Final accumulated result.

What REDUCE does

REDUCE works through an array and carries a result from one calculation to the next. That carried result is the accumulator. After processing the array, REDUCE returns the final accumulated result.

You supply the starting value and a LAMBDA that explains how to combine the current result with the next input. The starting value can be a number or text, depending on the task.

Practical examples

Build a total from three amounts

Enter 5, 10, and 15 in A2:A4. In C2, enter:

=REDUCE(0,A2:A4,LAMBDA(total,value,total+value))
Formula

The expected result is 30. Starting at 0, the accumulator becomes 5 after A2, 15 after A3, and 30 after A4. Only the final 30 appears in C2.

For an ordinary sum, SUM is shorter. This example makes the carried result visible in the formula: total holds the previous result, value holds the current input, and total+value produces the next result.

Join two text pieces in order

On a separate worksheet, enter text A in A2 and B in A3. In C2, enter:

=REDUCE("",A2:A3,LAMBDA(result,piece,result&piece))
Formula

The expected result is the text AB. The starting value is empty text, "". The first calculation joins it to A; the second joins the accumulated A to B. No separator is added because the calculation doesn't include one.

The same idea can carry text through a series of edits. The list-based text replacement guide uses an ordered rule list with SUBSTITUTE, passing the revised text into each subsequent replacement.

Common mistakes and notes

Choose a starting value for the task

Although initial_value is optional in the syntax, supplying it explicitly makes the calculation easier to check. These examples use 0 for addition and "" for joining text. A repeated multiplication generally needs 1 as its starting value; starting at 0 would keep the product at 0.

Declare two inputs, then write the calculation

In LAMBDA(total,value,total+value), total and value are the two input parameters. total+value is the calculation, not a third input parameter. An invalid LAMBDA or incorrect number of parameters returns #VALUE! (Incorrect Parameters).

Check the sequence when each step changes the next

Joining A and B gives AB; reversing those inputs gives BA. For text replacement rules, later substitutions can change text introduced by earlier rules. Check the order before assuming that a rule list produces simultaneous replacements.

Check availability for REDUCE itself

Microsoft's direct REDUCE support page lists Microsoft 365 and Excel for the web among its supported products; it does not list Excel 2024. Availability of another LAMBDA helper in your version doesn't establish REDUCE support.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use REDUCE.

Official documentation