A teacher, ten quizzes, and one wobbly average
A teacher marks ten quizzes. The marks are 6, 8, 9, 12, 15, 7, 10, 11, 9 and 13, and their average is 10. She wants to know how much that 10 can be trusted. Another ten quizzes from the same class would not average exactly 10. They might average 9.4, or 10.6. The standard error measures that wobble. It answers one question: if I took another sample like this one, how far would its average sit from this one?
That question matters everywhere a sample stands in for a bigger group. A poll of 400 voters, a trial of 30 patients, a batch of 20 bottles off a line. Every one of them reports an average, and every average carries a wobble. This guide works the standard error out by hand, for a mean, for a share, and for the gap between two means, and finishes with the spreadsheet check.
What the standard error actually measures
Start with the pair people mix up. The standard deviation describes how much individual values vary. The standard error describes how much a sample average would vary if you repeated the study. Ten quiz marks spread from 6 to 15. That spread is the standard deviation, about 2.79. The average of those ten marks, 10, would move much less if the teacher marked a different ten quizzes. That movement is the standard error, about 0.88.
Picture it plainly. Take 100 different samples of ten quizzes from the same class and average each one. You get 100 averages, and they cluster around the true class average. Their standard deviation is the standard error. It is the precision of your estimate, not the spread of your data. Big samples pin the average down. Small samples leave it loose.
Two ingredients only. s is the sample standard deviation. n is the sample size. The square root is the whole story of why bigger samples help, and why they help slowly: to halve the error you must quadruple the sample.
The formula, in three steps
Three steps, in order. First the average. Add the values and divide by how many there are. Second the standard deviation: take each value's distance from the average, square it, add the squares, divide by n minus 1, and take the square root. Third, divide that standard deviation by the square root of n. That last division is the standard error.
Why n minus 1 in step two? A sample standard deviation divides by n minus 1, the Bessel correction, because the average it measures from is estimated from the same data. The standard deviation guide works that choice through. Here, take it as given: sample means sample standard deviation, and the standard error follows from it.
One more thing before the numbers. When the population standard deviation is genuinely known from outside the sample, from a calibrated instrument say, the formula uses that sigma instead of s: SE = σ ÷ √n. That case is rare in practice. Most of the time sigma is estimated from the same sample, so s is what goes in.
Worked example: ten quiz marks, by hand
Back to the teacher. The marks: 6, 8, 9, 12, 15, 7, 10, 11, 9, 13.
Step one, the average. They add to 100, and there are ten of them, so the mean is 10.
Step two, the standard deviation. The distances from 10 are -4, -2, -1, 2, 5, -3, 0, 1, -1 and 3. Square them: 16, 4, 1, 4, 25, 9, 0, 1, 1 and 9. Add the squares: 70. Divide by n minus 1, which is 9: 70 ÷ 9 = 7.78. Take the square root: s = 2.79.
Step three, the standard error. Divide by the square root of 10, which is 3.16: SE = 2.79 ÷ 3.16 = 0.88.
Marks 6, 8, 9, 12, 15, 7, 10, 11, 9, 13. Mean 10, squared deviations sum to 70, sample variance 70 ÷ 9 = 7.78, sample SD 2.79, standard error 2.79 ÷ √10 = 0.88. The class average is 10, give or take about 0.9 marks. The standard error calculator returns the same three figures: mean 10, SD 2.79, SE 0.88.
Read the 0.88 like this. Another ten quizzes from the same class would average somewhere near 10, typically within about a mark either way. It says nothing about how far one pupil's mark sits from 10. That is the standard deviation's job, 2.79. Mixing the two up is the most common mistake with this number, and the mistake box at the end of this guide comes back to it.
Standard error of a share
Some questions ask for a share, not an average. Polls report shares: 64% of students passed, 42% of voters back a candidate. A share has its own standard error, and the formula needs no standard deviation at all.
p̂ is the share in the sample, as a decimal. n is the number of people asked. The product p̂(1 − p̂) is biggest at 0.5, which is why a 50-50 split carries the largest standard error and needs the biggest sample.
A college tests 150 students and 96 pass. The share is 96 ÷ 150 = 0.64. Then SE = √(0.64 × 0.36 ÷ 150) = √(0.2304 ÷ 150) = √0.001536 = 0.039. The pass rate is 64%, give or take about 3.9 points. At 95% confidence the margin is 1.96 × 0.039 = 0.077, so the interval runs from 56.3% to 71.7%. The proportion confidence interval calculator runs the same arithmetic from a share and a sample size.
Notice what the formula leaves out. The size of the college never enters it. Whether the 150 students came from a college of 1,000 or a university of 40,000, the standard error is 0.039. Precision depends on the count sampled, not the share of the population. The finite-population correction, covered in the planning section below, is the only exception, and it only matters when the sample is a visible slice of the whole group.
Standard error of the gap between two means
Sometimes the question is a gap: did class A really outscore class B, or is the difference noise? Each class has its own standard error, and the gap has one built from both.
Two classes sit the same test. Class A: 25 pupils, mean 74, SD 8. Class B: 30 pupils, mean 68, SD 7. The gap is 6 marks. Its standard error is √(64 ÷ 25 + 49 ÷ 30) = √(2.56 + 1.63) = √4.19 = 2.05.
The gap is 6, and its standard error is 2.05, so the gap is about three standard errors from zero. At 95% confidence the interval for the true gap is 6 ± 1.96 × 2.05, which is 6 ± 4.01, or 1.99 to 10.01. Zero sits outside it, so the gap looks real. Had the interval crossed zero, the honest reading would be that the data cannot tell the classes apart. The two-sample t-test calculator turns the same gap and the same standard error into the t statistic and the p-value.
One detail worth knowing. This formula needs no assumption that the two classes vary the same amount. Each class brings its own variance to the sum. That is the Welch approach, the one most courses teach, and the one the calculator on this site uses by default.
Standard error from a frequency table
Data often arrives counted, not listed: how many matches ended with 0 goals, how many with 1, and so on. The standard error still comes out the same way, with the mean and the standard deviation computed from the tally first.
A football team plays 30 matches. The goals per match: 0 goals in 6 matches, 1 in 10, 2 in 8, 3 in 4, 4 in 2. The total goals are 0×6 + 1×10 + 2×8 + 3×4 + 4×2 = 46, so the mean is 46 ÷ 30 = 1.53 goals a match.
For the spread, work with the squares. The sum of f×x² is 0 + 10 + 32 + 36 + 32 = 110. The sum of squared deviations is 110 − 46² ÷ 30 = 110 − 70.53 = 39.47. Divide by 29: the sample variance is 1.36, so the sample standard deviation is 1.17. The standard error is 1.17 ÷ √30 = 1.17 ÷ 5.48 = 0.21.
The team averages 1.53 goals a match, give or take about 0.2. The grouped data mean calculator runs the same tally arithmetic for the mean, and the variance guide for grouped data covers the spread step from classes and frequencies.
How big a sample for the standard error you want
The formula runs backwards too. Pick the standard error you can live with, and it tells you the sample size. Rearrange SE = s ÷ √n and the answer is n = (s ÷ SE)².
A researcher measures waiting times with a standard deviation near 10 minutes and wants a standard error of 0.5 minutes. Then n = (10 ÷ 0.5)² = 20² = 400 people. At n = 100 the standard error would be 10 ÷ 10 = 1.0, twice as big. The quadrupling rule again: halving the error costs four times the data.
That arithmetic is also how you judge a published standard error. A study reports a standard error of 2 with a sample of 25. Then s must be about 2 × 5 = 10. If the subject's natural spread is far wider than 10, something in the report deserves a second look.
One correction for small populations. When the sample is a visible slice of the whole group, the standard error shrinks by the finite-population factor √((N − n) ÷ (N − 1)). Survey 30 of a club's 90 members and the factor is √(60 ÷ 89) = 0.82, so the standard error falls by about 18%. Survey 30 people from a city and the factor is effectively 1, so it changes nothing. The sample size calculator applies the same correction when the population is entered.
The same calculation in a spreadsheet
Excel needs one formula for the mean version. Put the ten quiz marks in A1 to A10, then in a blank cell type =STDEV.S(A1:A10)/SQRT(COUNT(A1:A10)). Excel returns 0.88, the teacher's figure. STDEV.S is the sample standard deviation, the one that divides by n minus 1. STDEV.P divides by n instead, and using it here would give 0.84, the wrong standard error for a sample.
For a share, the formula is direct: =SQRT(0.64*(1-0.64)/150) returns 0.039, the college pass-rate figure. Replace 0.64 with your share and 150 with your count. For the gap between two means, =SQRT(8^2/25+7^2/30) returns 2.05, the two-classes figure. The standard error calculator on this site checks all three against your own numbers.
Three slips cause nearly every wrong standard error. First, reporting the standard error where the reader expects the standard deviation. An SE of 0.88 looks far tighter than an SD of 2.79, and a graph labelled wrongly misleads everyone who reads it. Second, using the population standard deviation, dividing by n, when the data is a sample. Third, forgetting that the standard error measures the average, not the data: a small SE never means the pupils' marks are close together, only that their average is pinned down.
That is the whole method. Average first, standard deviation second, divide by the square root of n. The share and the gap versions follow the same pattern, and the spreadsheet check takes one formula. The standard error calculator runs it on your own numbers, the sample mean calculator pairs the same average with its confidence interval, and the margin of error calculator turns the standard error into the margin your readers actually see.
Frequently asked questions
What is the formula for standard error?
For a mean, SE = s divided by the square root of n, where s is the sample standard deviation and n is the sample size. For a share, SE = square root of (p-hat times (1 minus p-hat) divided by n). For the gap between two means, SE = square root of (s1 squared over n1 plus s2 squared over n2).
Is standard error the same as standard deviation?
No. The standard deviation describes how much individual values vary; the standard error describes how much a sample average would vary if you repeated the study. For the ten quiz marks in this guide, the standard deviation is 2.79 and the standard error is 0.88. Error bars on a graph of averages should show the standard error or the confidence interval built from it, not the standard deviation.
How do I calculate standard error in Excel?
For a mean, put the data in a column and type =STDEV.S(range)/SQRT(COUNT(range)). STDEV.S is the sample standard deviation, dividing by n minus 1. For a share, type =SQRT(p*(1-p)/n) with your share and count in place of p and n. For the gap between two means, type =SQRT(s1^2/n1+s2^2/n2).
Why does the standard error get smaller as the sample grows?
Averaging over more observations cancels more random noise. The square root of n in the denominator means quadrupling the sample halves the standard error. With a standard deviation of 10, a sample of 100 gives a standard error of 1.0, and a sample of 400 gives 0.5.
How big a sample do I need for a standard error of 0.5?
Use n = (s divided by SE) squared, with s from a pilot or earlier data. With a standard deviation near 10 and a target standard error of 0.5, n = (10 divided by 0.5) squared = 400. Without any idea of s, run a small pilot first: the sample size depends on the spread you are measuring.