REDUCE

Boil a whole array down to a single result by running a LAMBDA across every value and carrying a running total forward with REDUCE.

|
Excel 365 only
|
Google Sheets Supported

Spreadsheet editor

Syntax

=REDUCE([initial_value], array, lambda) Returns: Varies

Arguments

Argument Required Description
initial_value No The starting value for the accumulator. Pick a value that matches your step: 0 for adding, 1 for multiplying, or an empty string "" for building text.
array Yes The array or range whose values you want to fold into one result.
lambda Yes A LAMBDA that combines each value with the running result. It takes two parameters, the accumulator first and the current value second, and must be the last argument.

About

The REDUCE function walks through an array one value at a time and folds everything into a single answer. You give it a starting value, the array to process, and a LAMBDA that says how to combine each value with the result so far. REDUCE keeps a running value (the accumulator), updates it for every item, and hands you the final total at the end.

Use REDUCE when a plain function like SUM or SUMPRODUCT cannot express the logic you need. It is perfect for custom running calculations: compounding a list of growth rates, adding up only the values that pass a test, or stitching text together into one string. Because you write the step yourself inside the LAMBDA, you control exactly what happens at each value.

REDUCE pairs well with LET when your step needs a few named pieces, and with SEQUENCE when you want to generate the numbers to fold over. Unlike functions that spill one result per row, REDUCE returns just the final accumulated value, which makes it a clean way to turn a column into a single summary number, label, or sentence.

Examples

Build a guest list in one cell

See how REDUCE stitches a column of names into one comma-separated sentence. Start with an empty string and edit a name to watch the list rebuild instantly.

Spreadsheet editor

Add up only the large orders

Watch REDUCE add an amount only when it clears 100 and skip the smaller orders. Change an order value above or below 100 and see the total react.

Spreadsheet editor

Compound a list of growth rates

See why the starting value matters when you multiply. This compounds yearly growth rates onto a running multiplier. Change the first argument from a 1 to a 0 and watch the answer collapse to zero.

Spreadsheet editor

Watch out for

Accumulator and value are in the wrong order

The LAMBDA lists the current value before the accumulator, so REDUCE feeds them in backwards and your math comes out wrong.

Keep the order fixed: the accumulator is always the first parameter and the current value is the second, like LAMBDA(acc, val, ...).

Starting value does not fit the step

You start a multiplication at 0, so every result is 0, or you start text at 0 and get a stray number in front of your string.

Match the starting value to the job. Some common ones: use 0 for adding, 1 for multiplying, and "" (an empty string) for building text.

Expecting one result per row

You assume REDUCE spills a value next to each input, but it only returns the single final accumulated value.

Use REDUCE when you want one summary answer. If you need a result for every value, build that logic with LAMBDA in a function that spills per row instead.

Function not available

REDUCE returns a #NAME? error in older Excel versions that do not include it.

REDUCE needs Microsoft 365 or Excel for the web. On older versions, use SUMPRODUCT or a helper column to get a similar result.

Tips & notes

REDUCE processes the array in order, top to bottom and left to right, carrying the accumulator forward at each step. Your LAMBDA can return a number, text, or even an array, so the type of the final answer depends on the step you write.

Common questions

What is the difference between REDUCE and SUM?

SUM only adds numbers together. REDUCE lets you define any step you want, so you can multiply, build text, apply a condition, or run logic that SUM cannot handle.

Do I have to include an initial value?

The initial value is optional, but it is good practice to set one. It decides the starting point and the type of your result.

Why does REDUCE only return one cell?

That is by design. REDUCE folds the whole array into a single accumulated value and returns just that final result, not one answer per row.

Does REDUCE work in Google Sheets?

Yes. Google Sheets has REDUCE with the same idea: REDUCE(initial_value, array_or_range, LAMBDA). The arguments line up with the Excel version.