To find the mean, add up every value in a dataset and divide by how many values there are — that’s the entire calculation. The part that actually trips people up isn’t the arithmetic; it’s the judgment calls around it: whether a zero belongs in the sum, whether a blank cell should be counted at all, how to handle a frequency table instead of a raw list, and — the mistake that quietly corrupts more reports than any other — whether you can average a set of averages the same way you average raw numbers. You usually can’t, and this page shows exactly why with numbers you can check yourself.
What Is the Mean?
The mean is the arithmetic average of a set of numbers. It measures the center of a dataset by spreading the total equally across every value. If a teacher wanted every student to receive the same score and then added up all the scores, the score each student would get is the mean.
More precisely, the mean is the value that preserves the sum: replace every value in a list with the mean, and the total stays the same. That property is why the mean formula is defined as sum divided by count.
Statisticians write it two ways:
- x̄ (x-bar) — the sample mean, used when the data is a subset drawn from a larger population.
- μ (mu) — the population mean, used when the data covers an entire population.
Both use the same equation for average — only the symbol changes, to indicate which type of data you have.
“Mean” and “average” get used interchangeably in casual speech, but they aren’t always the same calculation — a geometric or harmonic average answers a different question than the arithmetic one this page covers.
The Mean Formula
The mean formula is:
Mean = Sum of all values / Number of values
In formal mathematical notation, the equation for average is written:
x̄ = (x₁ + x₂ + x₃ + ... + xₙ) / n
Using the summation operator Σ, the same formula for average becomes:
x̄ = Σxᵢ / n
where:
- Σxᵢ is the sum of every individual value in the dataset
- n is the total count of values
This formula for an average applies the same way whether you have 5 numbers or 5 000. Sum everything, then divide by the count. The NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.1 — Measures of Location defines the arithmetic mean as the primary measure of central tendency and confirms this formula applies to both sample and population data.
How to Find the Mean: Step-by-Step
Learning how to find the mean requires four repeatable steps. The same four steps work for any list of numbers, large or small.
Step 1: List All the Values
Write out every value in the dataset. Count repeated values separately — if the number 7 appears three times, it contributes to the sum three times and to the count three times.
Step 2: Add All the Values Together
Sum every value in the list to get the total. In the mean formula, this is the Σxᵢ term. Include every data point without skipping any.
Step 3: Count How Many Values Are in the Dataset
Count the total number of individual values. This is n in the average formula. Do not count the sum itself — count the separate data points that make up the sum.
Step 4: Divide the Sum by the Count
Divide the result from Step 2 by the result from Step 3. The quotient is the mean.
Mean = Sum ÷ Count
That is the complete process: sum then divide. The mean formula never changes; only the input data does.
Worked Example: Overnight Server Response Times
A site reliability engineer pulls five overnight API response times, in milliseconds, to check whether the service is meeting its latency target: 143, 168, 155, 201, 179.
The goal is to find the mean response time.
Step 1: List the Values
The five readings are: 143, 168, 155, 201, 179 ms.
Step 2: Add Them Together
143 + 168 + 155 + 201 + 179 = 846
Step 3: Count the Values
There are 5 readings.
Step 4: Divide
Mean = 846 / 5 = 169.2
The mean response time is 169.2 ms.
That tells the engineer that, averaged across the overnight window, requests came back in about 169.2 ms — useful for comparing this night against last night’s mean, or against a 200 ms service-level target. No single request took exactly 169.2 ms, and that’s expected: the mean represents the distribution of the total, not one observation. Think of it as the response time every request would have logged if the total milliseconds were shared equally across all five: 5 × 169.2 = 846, exactly the original sum.
Sense-Check Your Answer
A quick way to verify any mean: the result must lie between the minimum and maximum values in the dataset. Here the readings range from 143 ms to 201 ms, so 169.2 ms falls squarely inside that range. A mean outside the range of your original data always means an arithmetic error — retrace the addition step first.
Population Mean vs. Sample Mean
When statisticians talk about how to find the mean, they draw a distinction between the population mean (μ) and the sample mean (x̄). The arithmetic is identical — sum divided by count — but the notation and interpretation differ based on the scope of the data.
Population Mean (μ)
If you measure every member of a defined group, you have a population, and the mean is written μ.
μ = Σxᵢ / N
N (capital) is the total size of the entire population — for example, every student in one specific classroom of 30.
Sample Mean (x̄)
Most of the time in statistics, you work with a sample — a subset drawn from a larger population — and the mean is written x̄.
x̄ = Σxᵢ / n
n (lowercase) is the number of values in your sample — for example, 200 of the 10 000 customers in a database, used to estimate what μ would be if you surveyed everyone.
Both calculations satisfy the average formula: sum divided by count. The symbol is all that changes. The key practical point: if your data is a sample (almost always the case in research), write x̄ and acknowledge it is an estimate, not a definitive population figure.
Why You Can’t Just Average a Set of Averages
This is the mistake that gets past people who otherwise know exactly how to find the mean: averaging averages together as if they were raw data points. It only gives the right answer when every group behind those averages is the same size. The moment group sizes differ, the naive average is wrong — and it’s wrong in a specific, checkable direction.
Say a delivery company tracks average delivery time by route for one day:
| Route | Packages delivered | Mean delivery time |
|---|---|---|
| A | 40 | 22 minutes |
| B | 15 | 35 minutes |
| C | 25 | 18 minutes |
A manager who wants the company-wide average delivery time might just average the three route means:
(22 + 35 + 18) / 3 = 75 / 3 = 25 minutes
That looks reasonable, and it is wrong, because it gives Route B’s 15 packages the same influence as Route A’s 40. To get the true company-wide mean, go back to actual minutes: multiply each route’s mean by its package count to recover the minutes that route spent, sum those totals, then divide by the total packages — the same weighted-mean formula introduced above:
Total minutes = (40 × 22) + (15 × 35) + (25 × 18)
= 880 + 525 + 450
= 1 855 minutes
Total packages = 40 + 15 + 25 = 80
Correct mean = 1 855 / 80 = 23.1875 ≈ 23.19 minutes
Check it both ways: the naive average of averages gives 25 minutes; the weighted, package-count-correct average gives 23.19 minutes. The naive figure overstates the true company-wide average by almost two minutes — because it silently treats Route B, the smallest and slowest route, as if it carried a third of the company’s volume, when it actually carried less than a fifth of it.
The rule to remember: you can average a set of averages directly only when the groups behind them are equal in size. The instant the group sizes differ, weight each average by its own group size before combining them — otherwise the small, extreme group distorts the result.
Special Cases That Trip People Up
The standard mean formula handles most datasets cleanly. A few situations call for an adjusted approach.
Weighted Mean
When some values should carry more influence than others — the delivery-route case above is one instance — a weighted mean assigns a weight (wᵢ) to each value before summing:
Weighted Mean = Σ(wᵢ × xᵢ) / Σwᵢ
A course where a final exam counts 60% and homework counts 40% works the same way: a student scoring 82 on the exam and 90 on homework gets (0.60 × 82 + 0.40 × 90) / 1 = 85.2, not the simple average of 86 that ignores the weighting.
Zeros vs. Blank or Missing Values
A zero and a missing value are not the same thing, and confusing them changes the answer. A zero is a real, recorded measurement of “none” and belongs in both the sum and the count. A blank or missing entry means no measurement was taken, and belongs in neither.
Take a rain gauge logging daily rainfall (mm) over one week: Monday 0, Tuesday 0, Wednesday 12, Thursday (sensor offline — no reading), Friday 5, Saturday 0, Sunday 0. Handled correctly, the offline day is excluded from both the sum and the count, leaving six actual readings:
Sum = 0 + 0 + 12 + 5 + 0 + 0 = 17
Count = 6 (Thursday is not counted)
Mean = 17 / 6 ≈ 2.83 mm/day
Handled incorrectly — treating the missing Thursday reading as a rainfall of 0 mm — the count becomes 7 instead of 6:
Sum = 17 (unchanged)
Count = 7 (Thursday miscounted as a zero)
Mean = 17 / 7 ≈ 2.43 mm/day
The two answers differ by about 0.4 mm/day, and the error always pushes the mean too low, since a phantom zero was added to the count without adding anything to the sum. Before summing anything, decide which blanks are genuine zeros (keep them) and which are missing data (drop them from the count too).
When an Outlier Skews the Result
A single extreme value can pull the mean far from the center of most data. If nine factory workers earn $42 000 per year and the CEO earns $900 000, the mean salary is:
(9 × 42 000 + 900 000) / 10 = 1 278 000 / 10 = $127 800
That mean of $127 800 misrepresents what a typical worker earns. When outliers are present, the median is often the more informative measure of center — the mean formula is still valid, it just tells a different story.
Finding the Mean of a Frequency Table
When data appears as a frequency table — each value listed with how many times it occurs — multiply each value by its frequency, sum those products, then divide by the total count:
Mean = Σ(xᵢ × fᵢ) / Σfᵢ
This is mathematically equivalent to listing every individual value and applying the standard average formula. The frequency table form simply compresses repeated entries.
Try the Mean Calculator
Use the calculator below to find the mean of any dataset. Enter your values and it applies the average formula instantly — no arithmetic required.
To open the full calculator with additional options, visit the mean calculator page. You can also explore every available tool on the statistics calculators hub.
The Same Calculation, Written Different Ways
The mean formula appears in several notations across textbooks, software, and research. Each version expresses the same equation for average using different typographic conventions.
Sigma Notation
x̄ = (1/n) × Σᵢ₌₁ⁿ xᵢ
Σᵢ₌₁ⁿ makes explicit that the sum runs from the first value to the last; (1/n) is just division by n written as multiplication.
In Spreadsheets
=AVERAGE(range) in Excel or Sheets sums the selected cells and divides by the count of non-empty ones. That detail matters: a truly blank cell is excluded from the count automatically, but a typed 0 is counted as a real zero — which is exactly the distinction from the section above. Store missing readings as blank cells, not zeros, and AVERAGE gets it right on its own.
Research Notation
Published papers may write the sample mean as M (APA style), x̄, or simply “the mean” in prose. All three refer to the same quantity: Σxᵢ / n. Only the typographic style changes.
Common Mistakes When Finding the Mean
Even with a simple four-step process, certain errors come up repeatedly.
Counting the Sum Instead of the Values
Count the number of data points you summed, not the total itself. If 8 values add to 48, divide 48 by 8 — not by 48 or 1. Write down n = before you add anything, so the count is ready before you compute the sum.
Accidentally Including Outliers or Errors
A typo — entering 880 instead of 88 — can radically distort the mean. Scan the list for obviously wrong values before calculating; if a data point seems implausibly large or small, verify it against the original source.
Dividing by the Wrong Count When Values Are Missing
If a dataset has 10 slots but one value was never recorded, dividing by 10 instead of 9 gives a mean that is too low. Count only the values you actually summed — the same error covered above under zeros versus missing values.
Rounding Intermediate Results
Rounding the sum before dividing compounds error into the final answer. Carry full precision until the last step, then round the mean itself.
Averaging Averages Without Weighting
Covered in full above, but it belongs on this list: combining group averages by taking their plain average, instead of weighting each by group size, is one of the most common — and hardest to spot — real-world mean errors.
Frequently Asked Questions
What is the formula for average?
Average = Sum of all values / Number of values, or in shorthand, x̄ = Σxᵢ / n, where Σxᵢ is the total and n is the count.
How to calculate average when one value is unknown?
Rearrange the mean formula to solve for the missing value: since the sum must equal Mean × Count, subtract the known values’ sum from that target sum. For a mean of 80 across 4 tests with scores of 75, 82, and 79 so far, the fourth score is (80 × 4) − (75 + 82 + 79) = 320 − 236 = 84.
Does the mean formula change for large datasets?
No. Sum divided by count applies regardless of how many values you have. For large datasets you’ll use software — Excel, Python, or a calculator — but the calculation is identical to what you do by hand with five values; only the tools differ.
How to find the mean of grouped data?
When data is grouped into class intervals (e.g., “10–19”, “20–29”), use the midpoint of each interval as xᵢ and its frequency as fᵢ, then apply Mean = Σ(xᵢ × fᵢ) / Σfᵢ. This gives an estimate, since the original individual values are no longer available.
Summary
Finding the mean always comes down to one rule: Mean = Sum ÷ Count. In formal notation that is x̄ = Σxᵢ / n for a sample mean or μ = Σxᵢ / N for a population mean. The four steps — list, sum, count, divide — produce the result every time, as long as you’ve made the right calls before you start summing: whether a zero counts, whether a blank does not, and whether the “values” in front of you are raw data or averages that need weighting first.
The mean formula is the foundation of descriptive statistics. Once you can compute it reliably, you have the basis for understanding variance, standard deviation, z-scores, and every inferential test that follows. The OpenStax Introductory Statistics (2e), Section 2.3 — Measures of the Center of the Data provides worked examples and explains how the mean, median, and mode compare when data is symmetric versus skewed — a natural next step after mastering the average formula.
To put the formula into practice immediately, enter your values into the mean calculator and verify your results.