How can I calculate the average of a group of numbers between two dates in Google Sheets?

To calculate the average of a group of numbers between two dates in Google Sheets, you can use the AVERAGEIFS function. This function allows you to specify two dates as criteria and calculate the average of the numbers between them. You can also include additional criteria to refine your results. To use the function, simply enter the range of cells containing the numbers, the criteria for the start date, the criteria for the end date, and any additional criteria. The function will then calculate the average of the numbers that match all of the criteria.


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, "<=1/15/2022", 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, "<=1/15/2022", 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 .

 

x