The Mean Formula Explained
By CalcMulti Editorial Team··8 min read
The mean is the most widely used summary statistic in all of mathematics. Yet "the mean" is not a single formula — it is a family of four related measures, each designed for a different type of data. Using the wrong one produces a number that sounds precise but is mathematically meaningless.
This guide explains where each mean formula comes from, how to verify your answers, and the exact conditions under which each type applies.
Formula
Arithmetic: x̄ = Σx / n | Weighted: x̄w = Σ(wᵢxᵢ) / Σwᵢ | Geometric: GM = (x₁×x₂×…×xₙ)^(1/n) | Harmonic: HM = n / Σ(1/xᵢ)
The Arithmetic Mean — x̄ = Σx / n
The arithmetic mean is defined as the sum of all values divided by the number of values. The Greek letter Σ (sigma) means "sum of", x represents each individual value, and n is the count of values. So x̄ = Σx / n reads: "the mean equals the sum of all x values divided by n."
To see why this formula makes sense intuitively, imagine redistributing all values equally among all positions. If five students scored 60, 70, 75, 85, and 90 on a test: their total is 380 points. If those 380 points were distributed equally across 5 students, each would have 380 / 5 = 76. That equal redistribution is exactly what the arithmetic mean represents.
Worked example: Dataset {4, 8, 6, 5, 3, 2, 8, 9, 2, 5}. Step 1 — Sum: 4+8+6+5+3+2+8+9+2+5 = 52. Step 2 — Count: n = 10. Step 3 — Mean: 52 / 10 = 5.2. Verify by checking that the sum of deviations from the mean equals zero: (4−5.2)+(8−5.2)+… = (−1.2)+(2.8)+(0.8)+(−0.2)+(−2.2)+(−3.2)+(2.8)+(3.8)+(−3.2)+(−0.2) = 0. ✓
The arithmetic mean has one critical weakness: it is not resistant to outliers. A single extreme value can pull the mean far from the bulk of the data. For example, the mean of {2, 3, 4, 5, 96} is 22 — yet four of the five values are below 6. In such cases, the median is a more representative measure of centre.
The Weighted Mean — x̄w = Σ(wᵢxᵢ) / Σwᵢ
The weighted mean assigns a weight to each value, reflecting its relative importance. The formula multiplies each value by its weight, sums those products, then divides by the total weight. When all weights are equal, the weighted mean reduces to the arithmetic mean.
The most common application is grade calculation. Suppose a course has three assessments: homework (weight 20%), midterm (weight 35%), and final exam (weight 45%). A student scores 90 on homework, 72 on midterm, and 80 on the final. Arithmetic mean would give (90+72+80)/3 = 80.67 — but this ignores the different weights. Weighted mean: (90×0.20)+(72×0.35)+(80×0.45) = 18.0+25.2+36.0 = 79.2. The final exam score carries more weight, pulling the result below the arithmetic mean.
Another common application: portfolio returns. If you hold $4,000 in an asset returning 5% and $6,000 in an asset returning 10%, the weighted return is (4000×5% + 6000×10%) / 10000 = (200+600)/10000 = 8%. Simply averaging 5% and 10% to get 7.5% would be wrong because the positions are unequal sizes.
Key rule: always check that weights are meaningful. Weights should represent a genuine measure of importance, sample size, or contribution — not an arbitrary number. If you cannot justify why one value should count more than another, use the arithmetic mean instead.
The Geometric Mean — GM = (x₁ × x₂ × … × xₙ)^(1/n)
The geometric mean is the n-th root of the product of n values. It is the correct average for multiplicative processes — situations where values compound or multiply together over time, rather than adding.
The classic application is investment returns. Suppose a portfolio returns +50% in year 1 and −33% in year 2. The arithmetic mean return is (+50% + −33%) / 2 = +8.5% — which would suggest you made money. But the actual outcome: $100 × 1.50 × 0.67 = $100.50. The geometric mean captures this correctly: √(1.50 × 0.67) − 1 = √1.005 − 1 ≈ +0.25% per year, nearly zero — reflecting that you barely broke even.
Geometric mean is also correct for: population growth rates (e.g. a city grows 3%, 8%, 1%, 5% over four years — the average annual rate is the geometric mean of 1.03×1.08×1.01×1.05), price index construction, ratios and scaling factors, and any quantity where percentage change is the meaningful unit.
Important constraint: all values must be positive. Geometric mean is undefined for zero or negative inputs. If any value is zero, the product is zero and the geometric mean is zero regardless of other values. If growth rates can be negative (losses), convert to growth factors first (e.g., −20% becomes 0.80) before applying the formula.
Calculation tip for large datasets: use logarithms. GM = exp(mean of ln(xᵢ)). This avoids floating-point overflow when multiplying many numbers together, and is how most software computes it internally.
The Harmonic Mean — HM = n / Σ(1/xᵢ)
The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. It is the correct average when values represent rates — specifically, when the same quantity is measured over a fixed denominator (distance, time, or effort).
The clearest example is average speed. Suppose you drive 60 km at 60 km/h, then 60 km at 30 km/h. Your average speed is not (60+30)/2 = 45 km/h. The total distance is 120 km. The total time is 60/60 + 60/30 = 1 + 2 = 3 hours. Average speed = 120/3 = 40 km/h. The harmonic mean gives the same result: HM = 2/(1/60 + 1/30) = 2/(1/60 + 2/60) = 2/(3/60) = 2 × 20 = 40 km/h. ✓
Other applications: averaging fuel efficiency (miles per gallon), price-to-earnings ratios across a portfolio, and any rate where the same total quantity is covered at different rates.
The harmonic mean is always ≤ geometric mean ≤ arithmetic mean, with equality only when all values are identical. This inequality chain (HM ≤ GM ≤ AM) is a fundamental result in mathematics and can serve as a quick sanity check on your calculations.
| Situation | Correct Mean | Why |
|---|---|---|
| Exam scores, temperatures, measurements | Arithmetic | Values add together — equal contribution |
| Grade with different assessment weights | Weighted | Contributions are unequal — weights matter |
| Investment returns over multiple periods | Geometric | Returns multiply (compound) over time |
| Average speed over equal distances | Harmonic | Rate measured over fixed quantity |
| Population growth rates | Geometric | Multiplicative growth process |
| Average P/E ratio across a portfolio | Harmonic | Ratio — weighted by earnings |
Common Mean Calculation Mistakes
Using arithmetic mean for growth rates. If a stock rises 100% one year and falls 50% the next, the arithmetic mean return is (+100% − 50%) / 2 = +25%. But $100 → $200 → $100: you are back where you started. The correct answer is 0% — which the geometric mean gives: √(2.00 × 0.50) − 1 = √1.00 − 1 = 0%.
Averaging averages without accounting for group size. If class A (10 students) has a mean score of 80 and class B (30 students) has a mean score of 70, the overall mean is not (80+70)/2 = 75. The correct calculation weights by group size: (10×80 + 30×70) / 40 = (800+2100)/40 = 72.5.
Including zero in a geometric mean calculation. If any value in the dataset is zero, the product is zero, making the geometric mean zero regardless of all other values. This is mathematically correct but rarely meaningful. Remove zero values and account for them separately, or use the arithmetic mean if zeros are genuinely part of the distribution.
Confusing population mean (μ) with sample mean (x̄). The formula is identical — Σx/n — but the interpretation differs. μ is a fixed (unknown) parameter; x̄ is an estimate of μ derived from a sample. This distinction matters in inferential statistics when constructing confidence intervals or performing hypothesis tests.
Related Calculators
Compute all four mean types instantly
Median CalculatorResistant to outliers — often better than mean
Mean vs MedianWhen to use each measure
Variance CalculatorSpread around the mean
Standard Deviation CalculatorAverage distance from the mean
Statistics HubAll statistics calculators & guides
Frequently Asked Questions
Educational use only. Content is based on publicly documented mathematical formulas and reviewed for accuracy by the CalcMulti Editorial Team. Last updated: February 2026.