FormulaCraft

How to calculate a 7-day rolling average in Excel and Google Sheets

Excel & Google Sheets
=IF(COUNT(B2:B8)=7,AVERAGE(B2:B8),"N/A")

Verified example

Computed by a real spreadsheet engine on the sample data below.

DateSales
2023-01-01100
2023-01-02150
2023-01-03200
2023-01-04250
2023-01-05300
2023-01-06350
2023-01-07400

=IF(COUNT(B2:B8)=7,AVERAGE(B2:B8),"N/A")250

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Enter your data into a column, starting from cell B2.
  2. 2In cell C8, enter the formula to calculate the 7-day rolling average.
  3. 3Drag the fill handle down to apply the formula to other cells.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What if my data has gaps?

The formula will return "N/A" if there are fewer than 7 data points in the range.

Can I use this for more than 7 days?

Yes, adjust the range in the COUNT and AVERAGE functions to the desired number of days.

Does this work with text data?

No, the formula requires numerical data to calculate an average.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: