Sample Mean Calculator: Free Stats Tool Online
The sample mean is the average of a subset: add the values, divide by how many there are. For the ten test scores pre-filled below (72, 85, 91, 68, 74, 88, 95, 79, 83, 70) that is 805 ÷ 10 = 80.50. This calculator goes further than a bare average, reporting the median, mode, sample standard deviation with the n−1 denominator, standard error and coefficient of variation, plus a deviation table showing how far each value sits from the mean, and it can switch the headline result to a geometric or harmonic mean when your data calls for one.
| # | Value (x) | Deviation (x − x̄) | Deviation² (x − x̄)² |
|---|
Quick Answer
For the pre-filled sample of ten test scores (72, 85, 91, 68, 74, 88, 95, 79, 83, 70), the sample mean is 80.50 (sum 805 ÷ 10), the median is 81.00, the sample standard deviation is 9.35 and the standard error is 2.96. Click Calculate Mean in the calculator above to reproduce every figure, including the full breakdown and deviation table.
Key takeaways
- The sample mean x̄ describes a subset. The population mean μ describes everyone, and the two rarely match exactly.
- Sample spread uses n−1 (Bessel’s correction), so the sample SD here (9.35) is slightly larger than the population SD of the same numbers (8.87).
- Standard error (SE = s ÷ √n) estimates how far this sample mean might sit from the true population mean. More data shrinks it.
- Arithmetic, geometric and harmonic means answer different questions. Picking the wrong one is the most common sample-mean error.
- Quick Answer
- How to use the sample mean calculator
- The sample mean formula and the statistics around it
- Worked example: ten test scores, fully broken down
- Sample mean vs population mean: the distinction that matters
- Arithmetic, geometric or harmonic: which mean fits your data?
- What competing calculators miss
- Reading the spread honestly: skew, sample size and this tool’s limits
- Frequently asked questions
- Add This Calculator to Your Website
How to use the sample mean calculator
Paste your numbers, pick a precision and a mean type, and click Calculate Mean. The headline mean, three summary cards, the full breakdown and the deviation table all arrive together.
- Enter the data. Type or paste values into the data box. Commas, spaces, semicolons and line breaks all separate values; the counter under the box confirms how many values were detected. Non-numeric text is ignored, and you need at least 2 valid numbers.
- Choose decimal places (0 to 4). Every result, including the deviation table, is rounded to that precision.
- Choose the mean type. Arithmetic for ordinary data, geometric for growth and ratios, harmonic for rates and speeds.
- Click Calculate Mean. Read the hero result first, then the breakdown: n, sum, min, max, range, median, mode, sample variance and SD, population SD, standard error and coefficient of variation.
- Scan the deviation table to see which values pull the mean up or down, then copy or share the summary if it needs to travel.
The sample mean formula and the statistics around it
The headline formula is x̄ = Σx ÷ n: the sum of the sample values divided by the count. The statistics around it are what make this a sample tool rather than a plain average button.
Sample variance and standard deviation use n−1
Sample variance is s² = Σ(x − x̄)² ÷ (n − 1), and the sample standard deviation s is its square root. Dividing by n−1 instead of n is Bessel’s correction: a sample tends to sit closer to its own mean than to the population mean, so the n denominator would understate the true spread. The NIST/SEMATECH e-Handbook of Statistical Methods sets out the same distinction between sample and population standard deviation. The breakdown also prints the population SD (σ, dividing by n) so you can see both, and if spread is all you need, the dedicated sample standard deviation calculator focuses on s alone.
Standard error: how far off might x̄ be?
Standard error is SE = s ÷ √n. It estimates the typical distance between a sample mean and the population mean it stands for. Quadrupling the sample size halves the SE, which is the quantitative version of “more data, better estimate.” The SE is also the building block of a confidence interval for the mean: x̄ plus or minus a multiple of SE, which the confidence interval calculator works through in full.
Coefficient of variation: spread relative to size
CV = (s ÷ |x̄|) × 100%. Because it is a percentage, it lets you compare variability between data sets with different units or scales: a CV of 11.61% for the test scores says the typical spread is about a ninth of the mean. The tool divides by the absolute value of the mean, so CV stays positive for negative-mean data.
Geometric and harmonic means
The geometric mean is the nth root of the product of the values, computed here as exp of the average of the natural logs. The harmonic mean is n ÷ Σ(1÷x). Both are covered in the comparison section below; the headline result switches to whichever you select, while the breakdown statistics (variance, SD, SE, CV and the deviation table) always describe the arithmetic mean, because those statistics are defined around it.
Worked example: ten test scores, fully broken down
A teacher records ten scores: 72, 85, 91, 68, 74, 88, 95, 79, 83, 70. These are the pre-filled defaults, and every number in the table is the tool’s own output at 2 decimal places.
| Statistic | Result | How it is found |
|---|---|---|
| Sample size (n) | 10 | Count of values |
| Sum (Σx) | 805.00 | 72 + 85 + 91 + 68 + 74 + 88 + 95 + 79 + 83 + 70 |
| Sample mean (x̄) | 80.50 | 805 ÷ 10 |
| Median | 81.00 | Sorted middle pair (79 + 83) ÷ 2 |
| Mode | No mode | No value repeats |
| Range | 27.00 | 95 − 68 |
| Sample variance (s²) | 87.39 | 786.50 ÷ (10 − 1) |
| Sample SD (s) | 9.35 | √87.39 |
| Population SD (σ) | 8.87 | √(786.50 ÷ 10) |
| Standard error (SE) | 2.96 | 9.35 ÷ √10 |
| Coefficient of variation (CV) | 11.61% | 9.35 ÷ 80.50 × 100 |
Read together, the numbers tell a consistent story: scores center near 80, the mean (80.50) and median (81.00) nearly agree so there is no strong skew, and an SE of 2.96 says this class average is a fair estimate of the wider cohort, give or take about 3 points. The squared deviations behind the variance sum to 786.50, which the tool’s deviation table itemizes value by value.
Sample mean vs population mean: the distinction that matters
A sample mean estimates; a population mean states. Confusing the two is where most beginner errors start, so the calculator keeps the sample framing explicit in every label.
Sample (this calculator)
A subset drawn from a larger group: one class out of a school, 200 survey replies out of a city. Symbol x̄. Spread uses s with n−1. Comes with sampling error, measured by the SE.
Population
Every member of the group: all enrolled students, every transaction last year. Symbol μ. Spread uses σ with n. No sampling error, because nothing was sampled.
In practice, full population data is often impossible or too expensive to collect, which is why researchers work with x̄ and report the SE alongside it. If your data really is the whole population, the same numbers still work: read the population SD line in the breakdown and treat the mean as exact. For a broader tour of center measures on one data set, the mean, median and mode calculator compares the three side by side.
Arithmetic, geometric or harmonic: which mean fits your data?
The three mean types are not interchangeable settings. Each is correct for a different data shape, and the wrong choice quietly changes the answer.
| Mean | Formula | Use it for | Verified example |
|---|---|---|---|
| Arithmetic | Σx ÷ n | Ordinary additive data: scores, heights, prices, counts | Ten scores → 80.50 |
| Geometric | nth root of the product | Growth rates, ratios, index changes; all values must be positive | 2 and 8 → 4.00 |
| Harmonic | n ÷ Σ(1÷x) | Averaging rates over equal distances or amounts: speeds, price per unit | 60 and 40 mph → 48.00 mph |
The harmonic example is the classic trap: drive out at 60 mph and back at 40 mph over the same distance and your average speed is 48 mph, not the arithmetic 50 mph, because you spend longer at the slower speed. The calculator enforces the domain rules for you: geometric mean refuses any value at or below zero, and harmonic mean refuses zeros, each with a plain error message instead of a silent wrong answer.
What competing calculators miss
The top tools for this keyword are strong general statistics suites, but the sample framing is exactly where they cut corners:
- Calculator.net’s statistics calculator reports sample and population SD and a geometric mean, but no harmonic mean, no standard error, no coefficient of variation and no per-value deviation table, and its precision is fixed. This page carries all of those in one run.
- MiniWebTool’s sample mean calculator shows step-by-step working and a deviation analysis, but frames everything around the arithmetic mean only. Growth-rate and rate-averaging questions get no geometric or harmonic option.
- General “average calculators” (HeroYears, AJDesigner and similar) add quartiles or histograms yet bury the sample statistics: the n−1 denominator is rarely labeled, and SE is often missing entirely, so a student cannot tell whether the SD on screen is s or σ. Here every spread figure is labeled with its denominator in the worked example table.
- No honest edge cases. Rivals rarely tell you what happens at a zero mean, with negative values in a harmonic mean, or past 50 data points. The limits section below states all three for this tool.
Reading the spread honestly: skew, sample size and this tool’s limits
A mean is one number standing in for many, and three checks keep it from misleading you. First, compare mean and median: when they diverge sharply, the data is skewed and a few large values are dragging the mean; report both, as this tool does by default. Second, respect sample size: the tool accepts as few as 2 values, but an SE computed from 2 points is fragile; around 30 or more values is the usual rule of thumb for a stable estimate, a convention rooted in the central limit theorem as summarized in the OpenStax Statistics chapter on measures of the center. Third, know the tool’s stated limits:
- Deviation table cap: with more than 50 values, the table shows the first 50 rows and notes the rest. Every statistic still uses the full data set.
- CV at a zero mean: if your arithmetic mean is exactly 0, the CV line reads “Infinity%”, because dividing spread by a zero mean is undefined. Treat CV as not applicable for zero-mean data rather than as a real percentage.
- Harmonic mean and negatives: the tool blocks zeros in harmonic mode but applies the formula to negative values as written, which can return a negative mean. Harmonic mean is only meaningful for positive rates, so check your signs before trusting that result.
- Breakdown anchoring: variance, SD, SE, CV and the deviation table always describe the arithmetic mean, even when the headline shows the geometric or harmonic mean. That is by design: those statistics are defined around x̄.
Frequently asked questions
The sample mean, written x̄ and pronounced “x-bar”, is the average of a subset of a larger group: add the sample values and divide by how many there are, x̄ = Σx ÷ n. Ten test scores summing to 805 have a sample mean of 80.50. It estimates the population mean, which you would only know by measuring everyone.
The sample mean (x̄) uses a subset of data drawn from a larger group. The population mean (μ) uses every value in the entire group. In practice, researchers use sample means because collecting full population data is often impossible, and they report the standard error to show how far the sample mean might sit from μ.
Dividing by n−1 is Bessel’s correction. A sample tends to cluster closer to its own mean than to the true population mean, so dividing by n would systematically underestimate the population spread. The n−1 denominator corrects that bias, which is why this calculator’s sample SD (9.35 on the worked example) is slightly larger than its population SD (8.87) for the same numbers.
Use the geometric mean for data that multiplies rather than adds: growth rates, investment returns, ratios and index changes. It is the nth root of the product of the values, so 2 and 8 give 4.00. Every value must be positive; the calculator refuses zeros and negatives in geometric mode with an error message, because the geometric mean is not defined for them.
Use the harmonic mean to average rates over equal distances or equal amounts. Driving the same route out at 60 mph and back at 40 mph averages 48 mph, not 50, because more time is spent at the slower speed. The harmonic mean is n ÷ Σ(1÷x), and it requires non-zero values; the calculator blocks zeros in harmonic mode.
A large gap between mean and median means your data is skewed. If the mean sits well above the median, a few large values are pulling the average up; if it sits well below, small values or negative outliers are dragging it down. In the worked example the two nearly agree (80.50 vs 81.00), which is why the mean represents those scores fairly.
The calculator needs at least 2 valid values, but reliability is a different question. Larger samples produce steadier means, and 30 or more values is the common rule of thumb for most purposes. Whatever your sample size, check the standard error: it shrinks as n grows, and it tells you plainly how much trust the mean has earned.
The standard error estimates how much your sample mean might differ from the true population mean. It is the sample standard deviation divided by the square root of n, SE = s ÷ √n. A smaller SE means a more reliable estimate: on the worked example, SE is 2.96, so the sample mean of 80.50 is a fair stand-in for the wider group’s mean, give or take roughly 3 points.
The CV divides the standard deviation by the mean, so when your arithmetic mean is exactly 0 the division is undefined and the tool prints “Infinity%”. That is the honest answer rather than a bug to hide: a coefficient of variation is meaningless for zero-mean data such as balanced gains and losses. Use the standard deviation itself to describe spread in that case.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- NIST/SEMATECH. e-Handbook of Statistical Methods: What are Variables and Observations? Measures of Location (definitions of the mean and median as measures of location). Accessed October 24, 2026.
- NIST/SEMATECH. e-Handbook of Statistical Methods: Measures of Scale (standard deviation, variance, and the sample versus population denominator distinction). Accessed October 24, 2026.
- Illowsky, B. and Dean, S. (OpenStax, Rice University). Statistics 2e: Measures of the Center of the Data (mean, median and mode definitions and the sample-size rule of thumb context). Accessed October 24, 2026.
- Illowsky, B. and Dean, S. (OpenStax, Rice University). Statistics 2e: Measures of the Spread of the Data (range, variance and standard deviation with the n−1 sample formula). Accessed October 24, 2026.
- Weisstein, E. W. (Wolfram MathWorld). Arithmetic Mean (formal definition: sum of values divided by count). Accessed October 24, 2026.
- Weisstein, E. W. (Wolfram MathWorld). Geometric Mean (nth root of the product definition and positivity requirement). Accessed October 24, 2026.
- Weisstein, E. W. (Wolfram MathWorld). Harmonic Mean (reciprocal-mean definition and rate-averaging applications). Accessed October 24, 2026.
