Calculate Average by Group in Google Sheets


In the realm of data analysis, a common requirement is to compute aggregated values for specific categories within a dataset. This tutorial provides a comprehensive, step-by-step guide on how to calculate the average value by group in Google Sheets. This technique is invaluable for gaining insights from structured data, allowing you to quickly understand performance metrics across different segments.

Understanding Grouped Averages in Google Sheets

Calculating an average by group means segmenting your data based on a particular criterion and then computing the mean for each segment independently. For instance, if you have sales data, you might want to find the average sales per region, or with student grades, the average score per class. This process helps in identifying trends, comparing performance, and making informed decisions based on summarized data.

Google Sheets offers powerful functions to achieve this efficiently, bypassing the need for manual sorting and filtering, which can be time-consuming and prone to error, especially with large datasets. We will leverage two primary functions: UNIQUE() and AVERAGEIF(), to streamline this analytical task.

The following example will walk you through the entire process, from preparing your data to interpreting the final results, ensuring clarity and precision at every stage.

Setting Up Your Data for Analysis

To illustrate the process, let’s begin by entering a sample dataset into your Google Sheets spreadsheet. This dataset represents the total points scored by various basketball players, along with their respective teams.

The data is structured with player names, their teams, and the points they scored. This setup is typical for scenarios where you need to aggregate data based on a categorical variable (in this case, ‘Team’).

Observe the data below, which will serve as our foundation for calculating grouped averages:

Our primary objective is to determine the average number of points scored by players, grouped by their respective teams. This will provide a clear understanding of the scoring performance across different teams.

Step 1: Extracting Unique Groups with the UNIQUE() Function

Before we can calculate the average points for each team, we first need a distinct list of all the teams present in our dataset. This list will serve as our criteria for the subsequent averaging calculation. The UNIQUE() function in Google Sheets is perfectly suited for this task.

The UNIQUE() function takes a range of cells as its argument and returns only the distinct values from that range. In our scenario, we will apply it to the ‘Team’ column to generate a list of all unique team names.

To implement this, navigate to cell E2 (or any empty cell where you want your list of unique teams to appear) and input the following formula:

=UNIQUE(B2:B12)

After pressing Enter, Google Sheets will automatically populate column E with a dynamic list of unique team names derived from the range B2:B12. This method ensures that if new teams are added to your dataset, the unique list will update accordingly.

The result of applying the UNIQUE() function should look like this:

This distinct list is crucial for the next step, where we will use each team name as a criterion for our conditional average calculation.

Step 2: Calculating Group Averages Using the AVERAGEIF() Function

With our list of unique teams established, the next logical step is to calculate the average points scored for each of these teams. For this, we will employ the powerful AVERAGEIF() function. This function allows you to find the average of values in a range that meet a specified criterion.

The syntax for the AVERAGEIF() function is as follows: AVERAGEIF(range, criterion, [average_range]).

Let’s break down each component:

  • range: This is the range of cells that will be evaluated against the criterion. In our case, it’s the ‘Team’ column ($B$2:$B$12), where we look for team names.
  • criterion: This is the condition or value that cells in the ‘range’ must meet. Here, it will be each unique team name from our list in column E (e.g., E2 for “Spurs”).
  • average_range: This is the actual range of cells that will be averaged if their corresponding cells in ‘range’ meet the criterion. For our example, this is the ‘Points’ column ($C$2:$C$12).

To compute the average points for the first team, type the following formula into cell F2:

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

Notice the use of absolute references ($B$2:$B$12 and $C$2:$C$12) for the range and average_range. This is crucial because when you copy this formula down to other cells, these ranges will remain fixed, while the criterion (E2) will adjust relative to its new position (e.g., E3, E4, etc.), ensuring each team’s average is calculated correctly.

After entering the formula in F2, simply drag the fill handle (the small square at the bottom-right corner of cell F2) down to the remaining cells in column F. This will automatically apply the formula for each unique team.

The final output clearly displays each unique team in column E and their corresponding average points in column F, providing a concise summary of team performance.

Interpreting and Verifying Your Results

Once the AVERAGEIF() formulas have been applied, you will have a neatly organized table. Column E lists all the distinct teams identified from your initial dataset, and column F presents the calculated average points scored by players belonging to each of those teams. This summary provides immediate insights into the performance distribution across groups.

It is always good practice to verify your results, especially when dealing with formulas. This helps confirm that your calculations are accurate and that you have understood the function’s application correctly. Let’s manually calculate the average for one of the teams to cross-check our automated results.

Consider the “Spurs” team. From our original data, the points scored by players on the Spurs team are:

  • Player A (Spurs): 10 points
  • Player B (Spurs): 15 points
  • Player C (Spurs): 11 points

To find the average, we sum the points and divide by the number of players:

Average for Spurs = (10 + 15 + 11) / 3 = 36 / 3 = 12

Upon reviewing the results in column F, you will find that the calculated average for the “Spurs” team is indeed 12. This successful manual verification confirms the accuracy of our AVERAGEIF() formula and the overall process.

Leveraging Conditional Functions for Advanced Data Analysis

The methodology demonstrated using UNIQUE() and AVERAGEIF() is a fundamental skill in data analysis within Google Sheets. These conditional functions are incredibly versatile and form the basis for more complex data manipulations. Understanding their application allows you to extract meaningful insights from raw data efficiently.

Beyond just calculating averages, similar conditional functions like SUMIF(), COUNTIF(), and their plural counterparts (SUMIFS(), COUNTIFS(), AVERAGEIFS()) enable you to perform a wide array of calculations based on multiple criteria. Mastering these tools significantly enhances your ability to perform robust statistical analysis directly within your spreadsheet environment.

For a deeper dive into the specifics of the AVERAGEIF() function, including its various applications and troubleshooting tips, you can always refer to the official Google Sheets documentation. This resource provides comprehensive details to further your understanding and proficiency.

Further Resources for Google Sheets Proficiency

To continue enhancing your skills in Google Sheets and explore more advanced data manipulation techniques, consider reviewing the following tutorials. These resources cover a range of common tasks and functions that can further empower your data analysis capabilities.

  • Example Tutorial 1: How to Use SUMIF with Multiple Criteria
  • Example Tutorial 2: Creating Dynamic Dropdown Lists
  • Example Tutorial 3: Advanced Filtering Techniques in Google Sheets

Cite this article

Mohammed looti (2026). Calculate Average by Group in Google Sheets. PSYCHOLOGICAL STATISTICS. Retrieved from https://statistics.arabpsychology.com/calculate-average-by-group-in-google-sheets/

Mohammed looti. "Calculate Average by Group in Google Sheets." PSYCHOLOGICAL STATISTICS, 13 Apr. 2026, https://statistics.arabpsychology.com/calculate-average-by-group-in-google-sheets/.

Mohammed looti. "Calculate Average by Group in Google Sheets." PSYCHOLOGICAL STATISTICS, 2026. https://statistics.arabpsychology.com/calculate-average-by-group-in-google-sheets/.

Mohammed looti (2026) 'Calculate Average by Group in Google Sheets', PSYCHOLOGICAL STATISTICS. Available at: https://statistics.arabpsychology.com/calculate-average-by-group-in-google-sheets/.

[1] Mohammed looti, "Calculate Average by Group in Google Sheets," PSYCHOLOGICAL STATISTICS, vol. X, no. Y, ص Z-Z, April, 2026.

Mohammed looti. Calculate Average by Group in Google Sheets. PSYCHOLOGICAL STATISTICS. 2026;vol(issue):pages.

Download Post (.PDF)
Scroll to Top