Home » Google Sheets: Calculate Average If Between Two Dates

Google Sheets: Calculate Average If Between Two Dates

by Tutor Aspire

You can use the following formula to calculate the average in Google Sheets only for cells that fall between two specific dates:

=AVERAGEIFS(B2:B11, A2:A11, "", A2:A11, ">=1/5/2022")

This particular formula calculates the average value of cells in range B2:B11 where the date in the range A2:A11 is between 1/5/2022 and 1/15/2022.

The following example show  how to use this formula in practice.

Example: Calculate Average If Between Two Dates

Suppose we have the following dataset that shows the total sales made by some company on various dates:

We can use the following formula to calculate the average daily sales between 1/5/2022 and 1/15/2022:

=AVERAGEIFS(B2:B11, A2:A11, "", A2:A11, ">=1/5/2022")

The following screenshot shows how to use this formula in practice:

Google Sheets average if between two dates

The average daily sales between 1/5/2022 and 1/15/2022 is 7.2.

We can manually verify that this is correct:

Average Daily Sales = (7 + 7 + 8 + 6 + 8) / 5 = 7.2.

Note: You can find the complete documentation for the AVERAGEIFS function here.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: Calculate Average Excluding Outliers
Google Sheets: Calculate Average by Group
Google Sheets: Calculate Average If Cell Contains Text

You may also like