We can use the AVERAGE function to calculate the running average in Google Sheets, which is simply the cumulative average from the first value up to the current position in the dataset.
Calculating a running average involves updating the average as new values are added, which calls for dynamic formulas—especially in expanding datasets.
You can use modern functions like MAP and LAMBDA, or classic options like SUMIF, MMULT, and DAVERAGE.
In this guide, we’ll focus specifically on how to calculate the running average in Google Sheets. But to help you distinguish it from other commonly used averages—like rolling or moving averages—here’s a quick reference:
| Term | Typical Meaning | Example Cell Ranges |
|---|---|---|
| Rolling Average | Average over a sliding window (e.g., 3 rows), moves down one row at a time. | A1:A3, A2:A4, A3:A5, … |
| Moving Average | Average of the most recent N values in a growing dataset. | A3:A5 (last 3 non-blank cells) |
| Running Average | Cumulative average from the first row to the current row. | A1:A1, A1:A2, A1:A3, … |
| Average of Every N Rows | Average calculated in non-overlapping chunks of N rows. | A1:A3, A4:A6, A7:A9, … |
Introduction
An average (arithmetic mean) is a single number that represents the central tendency of a dataset. It’s calculated by adding all values and dividing by the count.
Example: If attendance at your last four weekly meetings was 5, 4, 4, and 6:
=AVERAGE(5, 4, 4, 6) → 4.75
When another meeting occurs with 5 attendees:
=AVERAGE(5, 4, 4, 6, 5) → 4.8
You’re now calculating a running average — expanding the average range as new values appear. Let’s see how to implement this dynamic cumulative average in Google Sheets.
Two Approaches to Calculate Running Average in Google Sheets
You can calculate the running average in Google Sheets using:
- Non-array formulas — use a fill-down formula.
- Array formulas — calculate for all rows at once using a dynamic formula.
Cumulative Average Using a Non-Array Formula
Assume weekly meeting dates are in column A, and attendance is in column B.
Use this formula in C2, then drag it down:
=AVERAGE($B$2:B2)
This formula computes the average from the first row down to the current row. It ignores blanks but includes 0 values.

Running Average in Google Sheets Using Array Formulas
Let’s now look at dynamic, auto-expanding formulas. These running average array formulas in Google Sheets update automatically as data changes.
Note: The MMULT and DAVERAGE versions may be slower in large datasets.
You can enter each of the following formulas in cell C2.
1. Running Average Using MAP
=MAP(SEQUENCE(ROWS(B2:B)), LAMBDA(r, IF(INDEX(B2:B, r)="",,AVERAGE(ARRAY_CONSTRAIN(B2:B, r, 1)))))
Explanation:
SEQUENCE(ROWS(B2:B))generates a list of row numbers from 1 to n.- MAP loops over these numbers and applies the LAMBDA function.
INDEX(B2:B, r)checks whether the cell in rowris blank.ARRAY_CONSTRAIN(B2:B, r, 1)limits the input to the first r values ofB2:B.AVERAGE(...)computes the cumulative average up to that row.
This is one of the most elegant and efficient running average array formulas in Google Sheets.
2. Running Average Using SUMIF
=ArrayFormula(
IF(B2:B="",,
SUMIF(ROW(B2:B), "<=" & ROW(B2:B), B2:B) /
COUNTIFS(B2:B, "<>", ROW(B2:B), "<=" & ROW(B2:B))
)
)
Explanation:
SUMIF(ROW(B2:B), "<=" & ROW(B2:B), B2:B) calculates the running sum by summing all rows up to the current one.
COUNTIFS(B2:B, "<>", ROW(B2:B), "<=" & ROW(B2:B)) counts how many non-blank values exist up to each row.
Their division returns the cumulative average in Google Sheets.
If you’d like to explore how these components work in detail, here are two helpful guides:
3. Running Average Using MMULT
=ArrayFormula(
IF(B2:B="",,
MMULT(N(ROW(B2:B) >= TRANSPOSE(ROW(B2:B))), N(B2:B)) /
COUNTIFS(B2:B, "<>", ROW(B2:B), "<=" & ROW(B2:B))
)
)
Explanation:
ROW(B2:B) >= TRANSPOSE(ROW(B2:B)) creates a lower triangular matrix of TRUE values, where each row includes all previous rows (and itself).
| TRUE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE |
| TRUE | TRUE | FALSE | FALSE | FALSE | FALSE | FALSE |
| TRUE | TRUE | TRUE | FALSE | FALSE | FALSE | FALSE |
| TRUE | TRUE | TRUE | TRUE | FALSE | FALSE | FALSE |
| TRUE | TRUE | TRUE | TRUE | TRUE | FALSE | FALSE |
| TRUE | TRUE | TRUE | TRUE | TRUE | TRUE | FALSE |
| TRUE | TRUE | TRUE | TRUE | TRUE | TRUE | TRUE |
Wrapping it with N(...) converts the TRUE/FALSE matrix into 1s and 0s.
MMULT(..., N(B2:B)) performs matrix multiplication to return the cumulative sums up to each row.
COUNTIFS(...) again counts how many non-blank values exist from the start up to each row.
Their division gives the running average.
This is a compact and clever running average array formula in Google Sheets, but it may be resource-intensive on large datasets.
The cumulative sum and running count logic used here is the same as in the SUMIF approach above. For detailed explanations, refer to the tutorials linked in that section.
4. Running Average Using DAVERAGE
=ArrayFormula(
IF(B2:B="",,
DAVERAGE(
IFNA(VSTACK(, IF(ROW(B2:B) <= TRANSPOSE(ROW(B2:B)), B2:B, ""))),
SEQUENCE(ROWS(B2:B), 1),
VSTACK(IF(,,), IF(,,))
)
)
)
Explanation:
This formula takes a database-style approach to calculating the running average in Google Sheets.
IF(ROW(B2:B) <= TRANSPOSE(ROW(B2:B)), B2:B, "") builds a triangular structure where each column contains all values from the first row up to that row.
→ Learn more: Get 1-12-123-1234 Patterns Using an Array Formula in Google Sheets
| 5 | 5 | 5 | 5 | 5 | 5 | 5 |
| 1 | 1 | 1 | 1 | 1 | 1 | |
| 6 | 6 | 6 | 6 | 6 | ||
| 10 | 10 | 10 | 10 | |||
| 5 | 5 | 5 | ||||
| 1 | 1 | |||||
| 2 |
VSTACK(,) adds an empty row as a header to satisfy DAVERAGE’s requirement for a field name.
SEQUENCE(ROWS(B2:B), 1) generates a column index for each set of cumulative values.
VSTACK(IF(,,), IF(,,)) provides a blank criteria range so DAVERAGE can compute each column’s average.
This is a creative and less conventional running average array formula. It’s quite resource-intensive but demonstrates the flexibility of database functions in Google Sheets.
Final Thoughts
Here’s a quick summary:
| Formula Type | Best For |
|---|---|
=AVERAGE($B$2:B2) | Simple drag-down use cases |
MAP + ARRAY_CONSTRAIN | Clean, modern, and efficient array formula |
SUMIF + COUNTIFS | Reliable and non-LAMBDA array formula |
MMULT | Concise but heavy on resources |
DAVERAGE | Creative use of built-in database tools |
Each of these methods offers a valid way to compute a running average in Google Sheets, depending on your preference for array formulas, readability, or performance.
Related Resources
- Weighted Moving Average in Google Sheets (Formula Options)
- How to Use Nested BYROW to Loop a Row-by-Row Average in Google Sheets
- Reset Rolling Averages Across Categories in Google Sheets
- Google Sheets: Rolling Average Excluding Blank Cells and Aligning
- Dynamic Moving Average in Excel
- Dynamic Weekly Averages in Excel Without Helper Columns






















Thank you for these solutions. I would very much appreciate it if you can help.
Can the cumulative running average be turned into a rolling “n” period average?
For example, 7 cells or 25 cells in the column? So as new data is added the formula calculates the “n” period average on an ongoing rolling basis?
Hi, Alex,
Please check my SMA tutorial (you can find them under Resources in the last part of the tutorial above).
Also, this may help – Formula to Filter Rolling N Days | Months in Google Sheets.
You can also consider sharing an example sheet. Include the URL in your reply. The admin won’t publish it.
Please check my New Tutorial: Calculating Rolling N Period Average in Google Sheets.