Mean Calculator — x̄ = Σxᵢ / n
Enter numbers separated by commas, spaces, or new lines
Step-by-Step Solution
What Is the Mean?
The mean (also called the arithmetic mean or average) is the sum of all values in a dataset divided by the number of values. It is the most widely used measure of central tendency in statistics, data analysis, business, science, and everyday life.
x̄ = sample mean (pronounced "x-bar")Σxᵢ = sum of all valuesn = number of valuesFor a population mean (when you have data on every member of the group, not just a sample), the notation changes to μ = Σxᵢ / N, where N is the population size. The formula is identical — only the notation differs.
How to Calculate the Mean — 3 Steps
Find the mean of: 4, 8, 6, 5, 3
4 + 8 + 6 + 5 + 3 =
26
There are
5 numbers in the dataset.
x̄ = 26 / 5 =
5.2
✓ Mean = 5.2. The average of 4, 8, 6, 5, 3 is 5.2.
Mean Calculator for Grouped Data
When your data is given as a frequency distribution table (class intervals with frequencies), you cannot simply average the raw values. Instead, you use the midpoint of each class interval and weight it by frequency.
f = frequency of each classx = midpoint of each class intervalΣ(f·x) = sum of all (frequency × midpoint)Σf = total frequency (= n)Student test scores — find the mean from this frequency table:
| Marks (Interval) | Frequency (f) | Midpoint (x) | f × x |
|---|---|---|---|
| 0 – 10 | 3 | 5 | 15 |
| 10 – 20 | 5 | 15 | 75 |
| 20 – 30 | 8 | 25 | 200 |
| 30 – 40 | 4 | 35 | 140 |
| 40 – 50 | 2 | 45 | 90 |
| TOTAL | Σf = 22 | — | Σ(f·x) = 520 |
Mean = Σ(f·x) / Σf = 520 / 22 = 23.64
✓ The mean mark is 23.64.
Enter the midpoint of each class interval multiplied by its frequency as your dataset. For the example above, enter: 5, 5, 5, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25, 25, 25, 25, 35, 35, 35, 35, 45, 45 — the calculator will return 23.64.
Types of Mean
There are three primary types of mean, each suited to different data situations. The arithmetic mean is the most common and is what most people mean when they say "average."
Arithmetic Mean
Sum of all values divided by count. Used for general datasets: exam scores, temperatures, sales figures. Sensitive to outliers.
Geometric Mean
The nth root of the product of all values. Used for compound growth, investment returns, and multiplicative processes. Requires all positive values.
Harmonic Mean
Number of values divided by the sum of reciprocals. Used for averaging rates like speed (distance/time) and price-to-earnings ratios. Always ≤ arithmetic mean.
For most everyday situations, use the arithmetic mean. For comparing growth rates over time (e.g., annual investment returns), use the geometric mean. For averaging rates where the denominator changes (e.g., average speed over different distances), use the harmonic mean. Always arithmetic ≥ geometric ≥ harmonic for positive values.
Mean vs Median vs Mode
Mean, median, and mode are all measures of central tendency — they each describe the "typical" value in a dataset, but in different ways. Knowing which to use is one of the most important skills in statistics.
| Measure | Definition | Best When | Affected by Outliers? |
|---|---|---|---|
| Mean (x̄) | Sum ÷ Count | Symmetric data without extreme values | Yes — strongly |
| Median | Middle value when sorted | Skewed data or data with outliers (e.g., income) | No — robust |
| Mode | Most frequent value | Categorical data or finding the most common value | No |
Why the median is better than the mean for income data
Five salaries: $30,000 · $35,000 · $40,000 · $42,000 · $1,000,000
$229,400 — misleading! The $1M outlier drags the mean far from the typical salary.$40,000 — much more representative of what a typical person earns.✓ When data has extreme outliers, use the median. For symmetric data without outliers, the mean is ideal. See our Mean vs Median vs Mode guide for more.
Sample Mean vs Population Mean
The distinction matters in inferential statistics, where you draw conclusions about a large group (population) from a smaller group (sample).
| Feature | Sample Mean (x̄) | Population Mean (μ) |
|---|---|---|
| Symbol | x̄ (x-bar) | μ (mu) |
| Formula | Σxᵢ / n | Σxᵢ / N |
| When used | Working with a subset of data | Have data on entire group |
| Purpose | Estimate the population mean | Exact description of population |
| Example | Average height of 100 surveyed students | Average height of all students in a school |
The variance formula also differs: sample variance divides by n−1 (Bessel's correction) while population variance divides by N. The calculator on this page uses the sample formula (n−1).
Common Mistakes When Calculating the Mean
Forgetting to include zeros
Zero is a valid data point. If a student scores 0 on a test, that 0 must be included in both the sum and the count. Leaving it out inflates the mean. Example: mean of 0, 5, 10 is 5, not 7.5.
Using the mean when data has extreme outliers
A single extreme value can drag the mean far from the typical value. Always check for outliers first. If they exist and aren't errors, report the median alongside the mean, or use the median as your primary measure.
Averaging means without weighting for group size
If Class A (10 students) has a mean of 70 and Class B (30 students) has a mean of 80, the combined mean is NOT (70+80)/2 = 75. The correct combined mean is (10×70 + 30×80) / 40 = 77.5. Use a weighted mean whenever groups have different sizes.
Confusing sample variance with population variance
Sample variance divides by n−1; population variance divides by N. Using the wrong denominator produces a biased estimate. Most statistical software and this calculator use n−1 by default (sample formula).
Using arithmetic mean for growth rates
If an investment grows 50% in year 1 and falls 50% in year 2, the arithmetic mean of the returns is 0% — implying you broke even. But $100 → $150 → $75 means you lost 25%. The geometric mean correctly captures this: G = √(1.5 × 0.5) − 1 = −13.4%.
How to Calculate Mean in Excel and Google Sheets
Both Excel and Google Sheets have identical functions for calculating the mean and related statistics:
| What to Calculate | Excel / Google Sheets Formula | Notes |
|---|---|---|
| Arithmetic mean | =AVERAGE(A1:A10) | Replace range with your cells |
| Geometric mean | =GEOMEAN(A1:A10) | Requires all positive values |
| Harmonic mean | =HARMEAN(A1:A10) | Requires all positive values |
| Median | =MEDIAN(A1:A10) | — |
| Mode | =MODE(A1:A10) | Returns most frequent value |
| Sample variance | =VAR(A1:A10) | Divides by n−1 |
| Sample std deviation | =STDEV(A1:A10) | Divides by n−1 |
| Weighted mean | =SUMPRODUCT(values,weights)/SUM(weights) | No built-in function |