Custom weighted sum
=REDUCE(0, A2:A, LAMBDA(acc, v, acc + v * 2)) doubles each value while summing.
REDUCE walks an array left to right, carrying an accumulator value updated by a LAMBDA on each step. It can implement custom aggregates, text joins with rules, or conditional running logic that SUM alone cannot express.
Use REDUCE when you need a single summary from a list with custom combination rules, not a spilled running column.
Skip REDUCE for simple totals. SUM, PRODUCT, or TEXTJOIN are faster to read. Use SCAN when you need every intermediate step visible.
Set initial accumulator value, such as 0 or empty string.
Pass the array to fold over.
Write LAMBDA(acc, value, new_acc) returning the updated accumulator.
REDUCE returns only the final accumulator after the last element.
Test on a short list in a scratch cell to verify order of operations.
Document whether your LAMBDA treats blanks as zero or skips them.
=REDUCE(0, A2:A, LAMBDA(acc, v, acc + v * 2)) doubles each value while summing.
=REDUCE("", A2:A, LAMBDA(acc, v, IF(acc="", v, acc & ", " & v))) joins with commas.
=REDUCE(0, B2:B, LAMBDA(acc, v, IF(v>acc, v, acc))) finds max when IFERROR guards exist.
Build this without starting from a blank cell
Use a Better Sheets tool for REDUCE, then watch a walkthrough when you want the full pattern.
Guides that explain REDUCE in more depth.
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Users can also customize the appearance of their spreadsheets with different fonts, colors, and themes.
Read post →Make your sheets better 1% every day. Google Sheets can be boring. It can get complicated. But it doesn’t have to be. Here at Better Sheets, we don’t just make them better. We make them more fun, too.
Read post →SCAN is like REDUCE but returns every intermediate accumulator in a spilled column. It powers running totals, cumulative text builds, and step-by-step counters without dragging cumulative formulas.
Read guide →MAP walks aligned arrays element by element and applies a LAMBDA to each position. Pass one array for unary transforms or several arrays for element-wise combinations. It is the modern replacement for many ARRAYFORMULA column operations.
Read guide →LAMBDA defines an anonymous function inside a formula. You name parameters, write the calculation, then pass arguments when you call it. Combined with MAP, BYROW, or a named LAMBDA in the Name manager, it replaces fragile copy-paste logic across big tables.
Read guide →BYROW takes an array and a LAMBDA that receives one row at a time. It returns a column of results, one per row. It is the clean way to sum across columns, test row-wide rules, or format composite keys without ARRAYFORMULA hacks.
Read guide →Done reading about REDUCE?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.