Excel REDUCE Function Examples With Numbers

Formulas & functions · Updated November 3, 2026

Excel REDUCE Function Examples With Numbers

If your numbers are in A2:A6, add them with =REDUCE(0,A2:A6,LAMBDA(acc,n,acc+n)). With 12, -3, 8, 0, and 5 in those cells, the result is 22: REDUCE passes each value to a LAMBDA calculation and carries the updated total forward.

What the REDUCE function does

REDUCE processes the values in an array or range one at a time, updating an accumulator as it goes. The accumulator is the working result: for a sum, it is the total so far; for a product, it is the product so far. After Excel has processed every item, REDUCE returns the final accumulator value in the formula cell.

Its syntax is REDUCE([initial_value],array,LAMBDA(accumulator,value,calculation)). The initial value sets the starting state, array is the range or array of values to process, and the LAMBDA expression says how to update the accumulator for each value. The names accumulator and value are placeholders; you can use short names such as acc and n, provided they are valid LAMBDA parameter names.

REDUCE is useful when the result depends on repeatedly applying a rule to a sequence. A basic total is easy to calculate with SUM, but REDUCE can express a total that includes a condition or a custom calculation for each number. It generally returns one final result, not a separate result for every input.

How the formula works, step by step

In the opening example, the initial value is 0, and the LAMBDA adds the current number to the accumulated total. Conceptually, Excel starts at 0, adds 12 to get 12, adds -3 to get 9, adds 8 to get 17, adds 0 to stay at 17, and adds 5 to finish at 22. The order of those updates follows the order of values in the input array.

The function name REDUCE does not mean that it automatically reduces numbers by subtraction. The operation is determined by the expression inside LAMBDA. For addition, use acc+n; for multiplication, use acc*n; and for another task, write the corresponding rule. The first LAMBDA parameter receives the previous accumulator and the second receives the current array value.

In Microsoft 365 on Windows, enter the formula in a cell and press Enter. REDUCE and LAMBDA are available in Microsoft 365 and Excel 2024; they are not available in Excel 2021 or earlier perpetual editions. The function is also available in supported Microsoft 365 versions for Mac and Excel for the web, though formula argument separators can vary with regional settings. The examples here use commas.

Example: add or multiply a list of numbers

For a simple sum, the initial accumulator should usually be 0 because adding zero does not change the first value. If A2:A6 contains 12, -3, 8, 0, and 5, the formula from the opening returns 22, matching 12 – 3 + 8 + 0 + 5.

For a product, start with 1, because multiplying by 1 leaves the first number unchanged. With the numbers 2, 3, 4, and 5 in B2:B5, use =REDUCE(1,B2:B5,LAMBDA(acc,n,acc*n)). The successive results are 2, 6, 24, and 120, so the formula returns 120. Starting at 0 would make every product zero, which is why the choice of initial value matters.

These examples illustrate a practical rule: choose a starting value that acts as a neutral value for the operation. Zero is neutral for addition, and one is neutral for multiplication. For minimum or maximum calculations, however, a neutral value depends on the possible data, so it is often safer to initialize with an actual item from the range.

Example: sum only positive numbers

REDUCE can apply a condition to every item before adding it. With 12, -3, 8, 0, 5, and -2 in A2:A7, use =REDUCE(0,A2:A7,LAMBDA(acc,n,acc+IF(n>0,n,0))). The IF expression contributes a number only when it is greater than zero. Excel therefore adds 12, 8, and 5, while the negative values and zero contribute nothing; the result is 25.

The same pattern works for a threshold. To count values at least 5, let the accumulator increase by 1 when a value qualifies and by 0 otherwise. Assuming the same values are in A2:A7, use =REDUCE(0,A2:A7,LAMBDA(acc,n,acc+IF(n>=5,1,0))). The qualifying values are 12, 8, and 5, so the formula returns 3.

For a conditional total, a readable IF inside the LAMBDA often makes the rule easier to audit than a more compact expression. If the condition becomes more involved, test it on a few values first and confirm which numbers should be included. REDUCE follows the logic you provide; it does not infer the intended criteria from the data.

Example: calculate a running balance or a maximum

A transaction list can be added to a starting balance, even when some transactions are negative. If A2:A4 contains 25, -10, and -30, and the opening balance is 100, use =REDUCE(100,A2:A4,LAMBDA(balance,change,balance+change)). The calculation is 100 + 25 – 10 – 30, so the final balance is 85. This returns only the ending balance; it does not display a new balance beside each transaction.

To find the greatest value in a list that may contain only negative numbers, use the first value as the initial best value rather than starting at zero. With -8, -3, -11, -2, and -6 in A2:A6, use =REDUCE(A2,A3:A6,LAMBDA(best,n,MAX(best,n))). REDUCE compares the initial -8 with each remaining number and returns -2. If the formula started at zero, zero would incorrectly appear to be the maximum, even though it is not in the list.

This maximum example leaves A2 out of the array because A2 is already the initial value. That setup also shows why the initial value should reflect the data and the purpose of the calculation. Check that the array covers every remaining item exactly once.

Choosing REDUCE or another Excel function

For a plain total or product, SUM or PRODUCT is usually shorter and clearer. REDUCE earns its place when each item needs a custom rule, such as adding only positive values, updating a balance, or applying a calculation that ordinary aggregation functions do not express as directly. A shorter formula is not always better if its rule is harder for someone else to understand.

REDUCE also differs from SCAN. REDUCE keeps updating one accumulator and returns the final result, whereas SCAN returns the intermediate accumulator values as an array. With 12, -3, 8, 0, and 5 in A2:A6, use =SCAN(0,A2:A6,LAMBDA(acc,n,acc+n)) to return the running totals 12, 9, 17, 17, and 22. In a clear output area, Excel can spill those results into neighboring cells. Choose SCAN when you need to see each stage, and REDUCE when only the final value matters.

For a very simple conditional sum, SUMIF or SUMIFS may be more familiar and easier to maintain. REDUCE is more flexible for custom sequential logic, but that flexibility brings a longer formula and extra care around the accumulator. If a standard function describes the task clearly, prefer it; if it does not, REDUCE is a useful alternative.

Common problems and ways to check results

  • Wrong starting value: Starting a product at 0 forces the result to 0. Starting a maximum search at 0 can give a wrong answer when every input is negative. Select an initial value that fits the operation and data.
  • Text mixed with numbers: Arithmetic such as acc+n can return an error if a text value is passed where a number is expected. Check the source range for labels, numbers stored as text, or unexpected entries. Keep headers outside the array passed to REDUCE.
  • Incorrect range boundaries: If a cell is omitted or included twice, the final result changes. Verify the first and last cells in the array and, for an initialization based on the first value, make sure the remaining array begins at the next cell.
  • Hard-to-read LAMBDA parameters: Names like a and x work, but descriptive names such as balance and change make a formula easier to review. Keep the parameter order consistent: the accumulator comes first, then the current value.
  • Expecting a list of intermediate answers: REDUCE normally gives one final accumulated result. Use SCAN if the desired output is a sequence of running totals or other intermediate values.

A useful check is to calculate a small example by hand and compare it with the formula. For a longer range, temporarily reduce the array to a few rows and confirm each update, or compare a straightforward case against SUM or PRODUCT. Avoid wrapping the whole formula in error-handling logic until you understand the source of any error; hiding an error can conceal bad input rather than fix it.

Frequently Asked Questions

What does REDUCE do in Excel?
REDUCE applies a LAMBDA calculation to each item in an array, carrying an accumulator from one item to the next. It returns the accumulator after the final item has been processed.

What initial value should I use for REDUCE?
For addition, use 0; for multiplication, use 1. For a maximum or minimum, consider using the first value as the initial result so that a made-up starting number cannot distort the answer.

Can REDUCE add only positive numbers?
Yes. Use an IF condition inside LAMBDA so positive values are added and other values contribute zero. For the sample range in this article, the positive values total 25.

Why does my REDUCE formula return an error?
Common causes include text or error values in a range used for arithmetic, an incorrect range, an invalid LAMBDA parameter name, or a version of Excel without REDUCE. Check the input values and formula arguments, then confirm that your Excel edition supports the function.

Does REDUCE show running totals?
No. REDUCE returns the final accumulator only. Use SCAN when you want Excel to return every intermediate result, such as a running total after each number.

Is REDUCE better than SUM?
Not for an ordinary total: SUM is simpler. REDUCE is useful when the calculation needs a custom rule for each value or a sequential update that SUM does not express on its own.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.