REDUCE Function

Excel 365, Excel 2021

Summary

The REDUCE function transforms an array into a single accumulated value by iteratively applying a custom LAMBDA function to each element, starting from an optional initial value. This powerful array processing tool enables complex reductions like conditional sums, products, and custom aggregations.

Syntax

REDUCE([initial_value], array, LAMBDA(accumulator, value, body))

Parameters

Parameter Type Required Description
initial_value Any No Sets the initial accumulator value; omit to use first array element
array Array Yes Array or range containing values to reduce
lambda LAMBDA Yes Custom LAMBDA function that processes accumulator and current value

Using the REDUCE Function

REDUCE excels at custom array reductions beyond simple SUM or PRODUCT. Use it for conditional aggregations, custom counting logic, or any iterative calculation requiring accumulated results across array elements.

Common REDUCE Examples

Sum of Squared Values

=REDUCE(, A1:C2, LAMBDA(a,b,a+b^2))

Sums the squares of all values in range A1:C2 by accumulating squares (no initial value)

Conditional Product (>50 only)

=REDUCE(1,Table1[nums],LAMBDA(a,b,IF(b>50,a*b,a)))

Multiplies only numbers greater than 50, starting with 1 and skipping others

Count Even Numbers

=REDUCE(0,Table2[Nums],LAMBDA(a,n,IF(ISEVEN(n),a+1,a)))

Counts even numbers in table by incrementing accumulator only for even values

Frequently Asked Questions

REDUCE uses the first element of the array as the starting accumulator and begins processing from the second element.

Using 1 as initial_value ensures correct multiplication results; 0 would make all products zero.

Yes, it automatically processes dynamic arrays and spilled ranges.

Common Errors and Solutions

#VALUE! - Incorrect Parameters

Cause: Invalid LAMBDA syntax or wrong number of LAMBDA parameters

Solution: Ensure LAMBDA has exactly 3 parameters: accumulator, value, body

#CALC!

Cause: Empty array with omitted initial_value

Solution: Provide initial_value or ensure array has data

Notes

  • Perfect companion to LAMBDA for functional programming
  • Use 0 for sum/count operations, 1 for product operations
  • Processes rows, columns, or 2D arrays
  • Combine with BYROW/BYCOL for multi-dimensional reductions

Compatibility

Available in: Excel 365, Excel 2021

Not available in: Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 365, Excel 2021