Calculators
Home › Calculators › Sample Mean

Sample Mean Calculator

Your sample's centre, and how precisely it pins down the population mean.

Published 22 November 2026

Calculate the sample mean

From your raw sample data, or from summary stats (n, x̄, s).

Quick answer: Add the sample values and divide by how many there are. For 72, 68, 75, 71, 69, 74, 70, 73, 67 and 76, the sum is 715 and n is 10, so the sample mean is 71.5. The calculator also shows the sample standard deviation, the standard error and a 95% confidence interval for the true mean: 69.33 to 73.67.

Ten exam papers and one number

A teacher I know finished marking at the end of term with ten papers on her desk. She wanted one number for the class, something she could put in the report and compare with last year. She added the marks: 72, 68, 75, 71, 69, 74, 70, 73, 67 and 76. The total came to 715. Ten papers, so she divided by 10. The answer was 71.5. That number is the sample mean: the average of the values in a sample, written x̄ and read as "x-bar". It is the simplest summary a sample has, and the first thing most analyses ask for.

The sample mean matters because it estimates the population mean. The teacher's ten papers are a sample; the whole year group is the population. She cannot mark every paper in the year group, but 71.5 is her best guess at the year group's mean. That is the job of the sample mean: take a manageable handful of values and stand in for the whole.

The sample meanx̄ = Σx ÷ n: add all the sample values, then divide by how many there are

Worked example: ten exam marks

Worked example

Ten exam marks. The marks are 72, 68, 75, 71, 69, 74, 70, 73, 67 and 76. The sum is 715 and n is 10, so x̄ = 715 ÷ 10 = 71.5. The squared deviations from 71.5 add to 82.5, so the sample standard deviation is s = √(82.5 ÷ 9) = 3.03. The standard error is SE = 3.03 ÷ √10 = 0.96. With t* = 2.2622 on 9 degrees of freedom, the margin of error is 2.2622 × 0.96 = 2.17, and the 95% confidence interval for the true mean is 69.33 to 73.67.

Read the interval as a statement about the method, not a promise about this one class. Intervals built this way capture the true mean in 95 out of 100 repeated samples. The teacher can report 71.5 and know the year-group mean plausibly sits between 69.3 and 73.7. That is a far more useful sentence than the bare average.

A second example: six waiting times

Worked example

Waiting times at a coffee counter. Six customers waited 4.2, 3.8, 5.1, 4.6, 4.0 and 4.9 minutes. The sum is 26.6 and n is 6, so x̄ = 26.6 ÷ 6 = 4.43 minutes. The sample SD is s = 0.52, so SE = 0.52 ÷ √6 = 0.21. With only 6 values, t* is 2.5706 on 5 degrees of freedom, the margin of error is 0.54, and the 95% interval is 3.89 to 4.98 minutes.

Small samples pay for their size with wide intervals. Six waits give a mean of 4.43, but the honest range runs almost a full minute either side. The data simply does not know much yet. The cure is more data, not a different formula.

Sample mean vs population mean

Two symbols, two different things. The population mean μ is the average of every value in the whole population. The sample mean x̄ is the average of the values you actually collected. You compute x̄. You want μ. The gap between them is sampling error, and it shrinks as the sample grows.

A good sample makes x̄ land close to μ. A biased sample does not. If the teacher only marked the papers of pupils who stayed after class, her sample mean would describe those pupils, not the year group. No formula fixes a bad sample. The calculator assumes the values you paste are a fair sample; the sampling itself is your job. The population vs sample guide covers what makes a sample fair.

How precise is the sample mean? The standard error

The standard error answers the question the mean alone cannot: how far might x̄ sit from μ? It is SE = s ÷ √n. On the exam marks, SE = 3.03 ÷ √10 = 0.96. That single number tells the teacher her estimate is good to about a mark either way, before any interval is built.

The square root does the work, and it sets the price of precision. To halve the standard error you must quadruple the sample. With s = 10, a sample of 25 gives SE = 2, and a sample of 100 gives SE = 1. Every extra decimal of precision costs four times the data. That is why surveys stop at a few hundred responses: the next hundred buys very little.

From summary stats: when you only have n, x̄ and s

Textbooks and research papers rarely print raw data. They print a line like "n = 40, mean 72.4, SD 8.6" and move on. The calculator's second mode takes those three numbers and does the same job: SE = 8.6 ÷ √40 = 1.36, t* = 2.0227 on 39 degrees of freedom, margin of error 2.75, and a 95% interval of 69.65 to 75.15. No raw values needed.

This mode is also the one for checking published results. A paper reports a mean of 72.4 with 40 subjects and an SD of 8.6: the interval above is what that claim is worth. If the paper's own interval disagrees, one of you has the wrong t value, and it is usually worth finding out which.

The n minus 1 rule

The sample standard deviation divides by n minus 1, not by n. On the exam marks, dividing the squared deviations (82.5) by 10 gives 2.87. Dividing by 9 gives 3.03. The 3.03 is the sample SD, and it is the one the calculator uses.

Why n minus 1? The deviations are measured from x̄, which is itself computed from the same data, and that pulls the deviations slightly inward. Dividing by n minus 1 corrects the small downward bias. The rule has a name, Bessel's correction, but the practice is simple: a sample's SD uses n minus 1. Dividing by n gives the population SD, which is right only when the values are the whole population. In Excel, STDEV.S is the sample version and STDEV.P is the population version. Pick the wrong one and every interval downstream is slightly too narrow.

When the sample mean misleads

Worked example

Eight salaries and one boss. Eight staff earn 42,000, 45,000, 47,000, 44,000, 46,000, 43,000, 48,000 and 45,000. The mean is 45,000 and the median is 45,000. They agree. Now add the boss on 250,000. The mean jumps to 67,778. The median stays at 45,000.

The mean is still correct arithmetic. It just no longer describes a typical salary. One extreme value drags it away from the centre, and the further the value, the harder the drag. For skewed data, income, house prices, waiting times with a few disasters, report the median beside the mean. If they disagree by a lot, say so, and lead with the median. The mean vs median guide works through the same choice in detail.

t or z? Use t for small samples

For the exam marks, the z value 1.96 gives an interval of 69.62 to 73.38. The t value 2.2622 gives 69.33 to 73.67. The t interval is wider, and it is the honest one: it prices in the fact that s is estimated from the same ten marks, not known from outside.

Use z only when the population SD σ is genuinely known, from a calibrated process or a test's design. In almost every real sample it is not known, so use t on n minus 1 degrees of freedom. Past n = 30 the two values are close enough that the choice barely matters, but t is never the wrong choice, so use t and stop worrying about it. The confidence interval calculator builds its intervals the same way, with t throughout.

Sample mean in Excel

Put the values in a column. =AVERAGE(range) gives x̄, =STDEV.S(range) gives s, and =COUNT(range) gives n. The standard error is =STDEV.S(range)/SQRT(COUNT(range)). For the interval, =CONFIDENCE.T(0.05, s, n) returns the margin of error at 95%, and x̄ plus or minus that is the interval. Paste the same values into the calculator above and check the spreadsheet line by line: the numbers should match to the last decimal.

Watch out

Three mistakes turn up again and again. Quoting the sample mean with no standard error or interval: a mean without its precision is half an answer. Dividing by n for the sample standard deviation: that is the population formula, and it makes every interval slightly too narrow. And using z* = 1.96 for a small sample: use t* on n minus 1 degrees of freedom instead.

What the calculator shows

Two modes, one page. In "from sample data" mode, paste your values and the calculator returns the sample mean, the sum, n, the sample SD, the standard error, the t value and the 95% confidence interval for the population mean, with the steps shown. In "from summary stats" mode, enter n, the sample mean and the sample SD, and it returns the same precision figures without needing the raw data. The confidence level switches between 90%, 95% and 99%. The standard error calculator and the central limit theorem calculator take the same ideas one step further when you need them.

Frequently asked questions

What is the sample mean?

The sample mean, written x-bar, is the average of the values in a sample: add them all up and divide by how many there are. For 72, 68, 75, 71, 69, 74, 70, 73, 67 and 76, the sum is 715 and n is 10, so the sample mean is 71.5. It is the natural estimate of the population mean.

How is the sample mean different from the population mean?

The population mean is the average of every value in the whole population; the sample mean is the average of the values you collected. You compute the sample mean to estimate the population mean. The gap between them is sampling error, measured by the standard error, s divided by the square root of n.

Why does the sample standard deviation divide by n minus 1?

Because the deviations are measured from the sample mean, which comes from the same data, and that pulls them slightly inward. Dividing by n minus 1 corrects the small downward bias. On the exam marks, dividing by 10 gives 2.87; dividing by 9 gives the correct sample SD of 3.03. In Excel, STDEV.S is the sample version.

What is the standard error of the sample mean?

The standard error is SE = s divided by the square root of n. It measures how precisely the sample mean pins down the population mean. On the exam marks, s = 3.03 and n = 10, so SE = 0.96. To halve the standard error you must quadruple the sample size.

Can I find the sample mean from summary statistics?

Yes. If a paper reports n = 40, a mean of 72.4 and an SD of 8.6, the calculator's summary mode gives SE = 1.36 and a 95% confidence interval of 69.65 to 75.15, with no raw data needed. The raw-data mode does the same job when you have the values.