5.3 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Calculate Average by Group in Google Sheets

How to Calculate Average by Group in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

The following step-by-step example shows how to calculate the average value by group in Google Sheets.

Example: Calculate Average by Group in Google Sheets

First, let’s enter the following dataset that shows the total points scored by various basketball players:

Now suppose we’d like to find the average value of the points scored, grouped by team.

To do so, we can use the UNIQUE() function to first create a list of the unique teams.

We’ll type the following formula into cell E2:

=UNIQUE(B2:B12)

Once we press Enter, a list of unique team names will be displayed:

Next, we can use the =AVERAGEIF() function to find the average of points scored by players on each team:

=AVERAGEIF($B$2:$B$12, E2, $C$2:$C$12)

We’ll type this formula into cell F2 and copy and paste it down to each remaining cell in column F:

Column E displays each of the unique teams and column F displays the average value of the points scored by each team.

We can verify these results are correct by manually calculating the average for one of the teams.

For example, the average points scored by players on the Spurs team would be:

Average points by Spurs players: (13.7 + 12.7 + 22.4) / 3 = 12.26667.

This matches the value calculated using the formula.

Note: You can find the complete documentation for the AVERAGEIF formula in Google Sheets here.

Additional Resources

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

How to Calculate Average Percentage in Google Sheets
How to Calculate a Weighted Average in Google Sheets
How to Calculate Average If Cell Contains Text in Gogle Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories