# Grand Mean: Definition, Formula and How to Calculate It

The grand mean is the single average of all observations pooled across every group in your data. It is not the average of the group averages unless all groups happen to have the same sample size. When group sizes differ, you must weight each group mean by its sample size.

## Quick Answer

- The grand mean is the sum of all data values divided by the total number of values [1].
- With only group summaries available, compute it as a sample-size weighted average of the group means [1].
- Formula: $\bar{X}_G = \dfrac{\sum n_i \bar{x}_i}{\sum n_i}$, where $n_i$ is each group size and $\bar{x}_i$ is each group mean.
- It differs from the simple mean of means whenever group sizes are unequal.
- In ANOVA, the grand mean is the reference point for between-group variation [1][2].

## What the Grand Mean Means

The grand mean (also called the grand average) is the mean of all scores in a study, ignoring group membership. If you stacked every observation from every group into one long column and took the average, you would get the grand mean.

The precise statistical definition: for a set of samples, the grand mean is the total of all the data values divided by the total sample size [1]. In notation, if group $i$ has $n_i$ observations and mean $\bar{x}_i$, then the grand mean is the weighted average of the group means, with each group mean weighted by its sample size [1].

This matters because group means and the grand mean answer different questions. A group mean describes one subgroup. The grand mean describes the whole sample as a single pool. In analysis of variance, the grand mean is the baseline against which each group mean is compared to measure between-group variation [1][2].

## How It Works

The grand mean has two equivalent formulas. Use the first when you have raw data, and the second when you only have group summaries.

When you have every raw value:

$$\bar{X}_G = \frac{\sum_{i=1}^{N} x_i}{N}$$

When you only have group means and group sizes:

$$\bar{X}_G = \frac{\sum_{i=1}^{k} n_i \bar{x}_i}{\sum_{i=1}^{k} n_i}$$

Each symbol means:

- $\bar{X}_G$ is the grand mean.
- $x_i$ is a single data value.
- $N$ is the total number of observations across all groups.
- $k$ is the number of groups.
- $n_i$ is the sample size of group $i$.
- $\bar{x}_i$ is the mean of group $i$.

The numerator $\sum n_i \bar{x}_i$ reconstructs the total sum of all values, because $n_i \bar{x}_i$ is the sum of group $i$. The denominator $\sum n_i$ is the total sample size $N$. Dividing one by the other gives the pooled average.

The key idea is weighting. A group with 100 observations should influence the grand mean more than a group with 5. The weighted formula handles that automatically. The unweighted mean of group means, $\frac{\sum \bar{x}_i}{k}$, ignores group size and gives the wrong answer when sizes differ.

## Worked Example

Three lab groups measured reaction times in milliseconds, and the groups had different sample sizes.

| Lab | n | Mean (ms) |
|---|---|---|
| Lab A | 10 | 210.0 |
| Lab B | 12 | 225.0 |
| Lab C | 8 | 240.0 |

Step 1. List the group means and sample sizes.

Lab A: n=10, mean=210.0 ms. Lab B: n=12, mean=225.0 ms. Lab C: n=8, mean=240.0 ms.

Step 2. Find the total sample size.

$$N = 10 + 12 + 8 = 30$$

Step 3. Multiply each group mean by its sample size and add the results.

$$(10 \times 210.0) + (12 \times 225.0) + (8 \times 240.0) = 6720.0$$

Step 4. Divide the weighted sum by the total sample size.

$$\bar{X}_G = \frac{6720.0}{30} = 224.0000 \text{ ms}$$

The grand mean is 224.00 ms.

For comparison, the simple unweighted mean of the three group means is:

$$\frac{210.0 + 225.0 + 240.0}{3} = 225.0000 \text{ ms}$$

The two answers differ by 1 ms because Lab C has the smallest sample size but the highest mean. The weighted grand mean of 224.00 ms is the correct pooled average.

Here is the same calculation in Python:

```python
import numpy as np
means = np.array([210.0, 225.0, 240.0])
ns = np.array([10, 12, 8])
grand_mean = (means * ns).sum() / ns.sum()  # 224.0000
print(grand_mean)
```

Output:

```
224.0
```

You can check a small dataset like this by hand or with a [mean, median and mode calculator](/tools/mean-median-mode-calculator) if you have the raw values.

## How to Interpret It

The grand mean is a single summary of the center of your entire dataset. Read it as the typical value when group membership is set aside.

Its main interpretive role is as a reference point. In ANOVA, the total variation is split into between-group variation and within-group variation [1]. The between-group sum of squares measures how far each group mean sits from the grand mean [1][2]. If group means cluster tightly around the grand mean, between-group variation is small. If they spread far from it, between-group variation is large [1].

The grand mean also appears in centering. Grand-mean centering subtracts the grand mean from every value, which shifts the variable so its overall mean becomes zero [3]. This is common in multilevel models, where grand-mean centered and group-mean centered variables serve different purposes [3].

One caution on interpretation: the grand mean is not necessarily a value any group actually shows. In the example above, no lab had a mean of exactly 224 ms. It is a pooled summary, not a group result.

## When to Use It (and when not to)

Use the grand mean when you need one overall average across pooled groups, when you are computing ANOVA sums of squares [1][2], or when you are centering a variable on its overall mean [3].

Use it with the weighted formula whenever group sizes differ. If every group has the same $n$, the weighted and unweighted versions give the same number, so the distinction does not matter.

Do not use the grand mean when the groups are not comparable. If you pool reaction times from two different tasks, or test scores from two different exams, the grand mean mixes incompatible scales and describes nothing meaningful. In those cases report group means separately.

Do not use the grand mean as a substitute for a group mean when your question is about one group. If you want to know how Lab C performed, the answer is 240.0 ms, not 224.00 ms.

## Grand Mean vs Mean of Means

The closest related idea is the mean of means, the simple average of the group averages. They are identical only when all groups have equal sample sizes.

| Feature | Grand mean | Mean of means |
|---|---|---|
| What it averages | All individual values pooled | The group averages |
| Weighting | Weighted by group size | Equal weight per group |
| Formula | $\frac{\sum n_i \bar{x}_i}{\sum n_i}$ | $\frac{\sum \bar{x}_i}{k}$ |
| Equal group sizes | Same as mean of means | Same as grand mean |
| Unequal group sizes | Correct pooled average | Biased toward small groups |
| Typical use | ANOVA, centering [1][3] | Quick summary of group results |

In the worked example, the grand mean is 224.00 ms and the mean of means is 225.00 ms. The gap appears purely because the group sizes are unequal.

## Common Mistakes

- **Averaging the group means without weighting.** This is the most frequent error. Fix it by multiplying each group mean by its sample size before dividing by the total $N$ [1].
- **Dividing by the number of groups instead of the total sample size.** The denominator must be $\sum n_i$, not $k$. In the example, dividing 6720 by 3 would give 2240, which is wrong.
- **Using the grand mean to describe a single group.** The grand mean pools everyone. Report the group mean when the question is about one group.
- **Pooling groups measured on different scales.** Averaging across incompatible units produces a number with no interpretation. Check that all groups measure the same variable in the same units first.
- **Confusing the grand mean with the median of all values.** They are different statistics and will usually differ. Use the [mean, median and mode calculator](/tools/mean-median-mode-calculator) if you need both.
- **Forgetting that the grand mean changes when group sizes change.** Adding one observation to a small group shifts the grand mean more than adding one to a large group.

## Limitations

The grand mean compresses all variation into one number, so it hides differences between groups. Two datasets can share the same grand mean while having completely different group patterns. Always look at the group means alongside it.

It is also sensitive to outliers and to unequal group sizes. A single extreme value in a small group can pull the grand mean noticeably, and a large group dominates the pooled result. When groups are very unbalanced, the grand mean sits close to the largest group's mean and can look unlike most of the other groups. For a fuller picture of spread, pair it with a [variance calculation](/blog/data-analysis/how-to-calculate-variance).

## Frequently Asked Questions

### Is the grand mean the same as the overall mean?

Yes. The grand mean and the overall mean are two names for the same quantity, the sum of all values divided by the total number of values [1]. The term grand mean is used most often when data are organized into groups, to distinguish it from the individual group means.

### How do I calculate the grand mean from group means only?

Multiply each group mean by its sample size, add those products, then divide by the total sample size [1]. This weighted approach reproduces the pooled average exactly, provided you have the correct group sizes. If you only have the group means and not the sizes, you cannot compute the grand mean correctly.

### Why is the grand mean different from the average of the group means?

Because groups usually have different sample sizes. The average of group means gives every group equal weight, while the grand mean weights each group by how many observations it contains [1]. When all groups have the same size, the two values are identical.

### What is the grand mean used for in ANOVA?

In ANOVA, the grand mean is the baseline for measuring between-group variation. Each group mean is compared with the grand mean, and the squared differences are summed to form the between-group sum of squares [1][2]. This is then compared with within-group variation to test whether the group means differ.

### What is grand-mean centering?

Grand-mean centering subtracts the grand mean from every value of a variable, so the new variable has a mean of zero [3]. It is common in multilevel modeling, where grand-mean centered and group-mean centered variables are used for different purposes [3]. The centering changes the interpretation of intercepts but not the fit of the model.

If you are working through related averages, the [sample mean](/blog/data-analysis/sample-mean) and the [geometric mean](/blog/data-analysis/geometric-mean-definition-formula) cover cases where a simple pooled average is not the right summary.

## References

1. [Stats: One-Way ANOVA](https://people.richland.edu/james/lecture/m170/ch13-1wy.html)
2. [13.3.1: Calculating Sum of Squares for the Factorial ANOVA Summary Table - Statistics LibreTexts](https://stats.libretexts.org/Workbench/PSYC_2200%3A_Elementary_Statistics_for_Behavioral_and_Social_Science_(Oja)_WITHOUT_UNITS/13%3A_Factorial_ANOVA_(Two-Way)/13.03%3A_Two-Way_ANOVA_Summary_Table/13.3.01%3A_Calculating_Sum_of_Squares_for_the_Factorial_ANOVA_Summary_Table)
3. [How can I create multiple grand-mean centered or group-mean centered variables? | SPSS FAQ](https://stats.oarc.ucla.edu/spss/faq/how-can-i-create-multiple-grand-mean-centered-or-group-mean-centered-variables/)

## Further Reading

- [009: ANOVA](https://grants.hhp.uh.edu/doconnor/pep6305/Topic%20009%20ANOVA.htm)
- [NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/index.htm)
- [OpenStax. Introductory Statistics 2e](https://openstax.org/details/books/introductory-statistics-2e)

## Related Articles

- [How to Calculate the Mean: Formula and Step by Step Examples](/blog/data-analysis/how-to-calculate-the-mean)
- [Mean and Standard Deviation: Definition, Formula and Examples](/blog/data-analysis/mean-and-standard-deviation)
- [Geometric Mean: Definition, Formula and Examples](/blog/data-analysis/geometric-mean-definition-formula)
- [Sample Mean: Definition, Formula and Examples](/blog/data-analysis/sample-mean)
- [Harmonic Mean: Formula, Examples and When to Use It](/blog/data-analysis/harmonic-mean-formula)