You measure the heights of 20 girls in a school and get an average of 150 cm. Measure another 20 and you might get 149. A third group might give 151. None of these is wrong. Each average is a little different because each group is a different sample. The standard error of the mean tells you how much those averages usually move.
It is one of the most used numbers in statistics and one of the most confused. It is not the same as the standard deviation, though people mix them up all the time. It sits behind confidence intervals, margin of error and hypothesis tests, so a clear idea here helps with all of them.
This tutorial explains the definition, the sampling distribution it comes from, the formula and the steps, a worked example with every number, why it shrinks as the sample grows, how it differs from the standard deviation and how to calculate it in Python.
The standard error of the mean, often written SEM, is the standard deviation of the sampling distribution of the sample mean. In plain words, it measures how much sample averages vary from sample to sample. A small value means that the sample mean is a precise estimate of the population mean.
The live page calls it a method to estimate the approximate standard deviation of a sampling distribution. It is not a method. It is the measure itself.
Take many random samples of the same size from one population. Work out the mean of each sample. Plot all those means. The result is the sampling distribution of the sample mean.
The live page explains it as the mean of the population the items come from. That is not right. The sampling distribution is the spread of the sample means across repeated samples. Its centre is near the population mean, and its spread is the standard error.
If the population is normal, the sampling distribution of the mean is exactly normal for any sample size. If the population is not normal, the central limit theorem says that it gets close to normal as the sample grows. The live page says likely, which is too vague.
The live page: a school has 1,000 girls, and you want their average height. Take random sets of 20 girls, find each set’s mean (x1 bar, x2 bar and so on up to x20 bar), and look at how those means vary. The page stops there. I finish it in the simulation below.

The live page uses the capital letter N for the sample size and writes sigma m for the standard error, and gives no formula in text. The formula above is the standard one.
The live page says that the standard error is inversely proportional to the sample size. The right statement is that it is inversely proportional to the square root of the sample size. Look at the numbers, with sigma = 8:
| Sample size | Standard error | Compared with n = 5 |
|---|---|---|
| 5 | 3.578 | Base |
| 20 | 1.789 | Half |
| 80 | 0.894 | A quarter |
| 320 | 0.447 | An eighth |
Four times the data halves the standard error. To cut it to a tenth, you need a hundred times the data. That is why very large samples bring diminishing returns.

The live page gives these steps only as an image.

The live page lists the weights of four people: Jack 72 kg, John 74, Jonny 78 and Jazz 84.
| Name | Weight (kg) | Deviation from 77 | Squared deviation |
|---|---|---|---|
| Jack | 72 | Minus 5 | 25 |
| John | 74 | Minus 3 | 9 |
| Jonny | 78 | 1 | 1 |
| Jazz | 84 | 7 | 49 |

Meaning: with only four people, the average of 77 kg could easily be off by about 2.6 kg. The live page calls the mean of the squared deviations the standard deviation. Dividing 84 by 4 gives 21, which is the population variance, and it is a variance, not a standard deviation. The page stops there and never shows a standard error.
Note that this one group of four people gives a single sample mean, so the standard error is estimated from the spread of the people with the formula. In the simulation below, the standard error is measured directly from many sample means.
| Point | Standard deviation | Standard error of the mean |
|---|---|---|
| What it measures | Spread of individual values | Spread of sample means |
| Formula | s | s divided by the square root of n |
| Gets smaller with more data? | No, it settles near the true spread | Yes, by the square root of n |
| Use it to | Describe the data | Judge how precise the mean is |
In the weights example, the standard deviation is 5.29 kg and the standard error is 2.65 kg. The first tells you how much people differ. The second tells you how much the average could be off.
I built a made up school of 1,000 girls with heights near 150 cm and a standard deviation of about 8 cm. I took 20 random sets of 20 girls and measured the spread of their 20 means. Then I repeated it with 5,000 sets. The formula says that the standard error should be 8.01 divided by the square root of 20 = 1.79.
The measured spread of the sample means, 1.81 for 20 sets and 1.78 for 5,000 sets, is very close to the formula value of 1.79. That is the standard error in action.
A 95 percent confidence interval for a mean is the sample mean plus or minus 1.96 standard errors. For the weights data, with the t value for 3 degrees of freedom, the interval is wide because the sample is tiny. With more data the standard error falls, and the interval narrows.
| Mistake | Fix |
|---|---|
| Mixing up standard deviation and standard error | One describes the data, the other describes the mean |
| Saying the error is inversely proportional to n | It is inversely proportional to the square root of n |
| Calling the mean of squared deviations the standard deviation | It is the variance. Take the square root |
| Dividing by n for a sample variance | Divide by n minus 1 |
| Using the standard error to describe the spread of people | Use the standard deviation |
| Expecting more data to remove all error | The error shrinks slowly, with the square root of n |
| Using the formula for a biased sample | It covers only random sampling variation |
Answers: 1) 12 divided by 6 = 2. 2) It halves. 3) 10 divided by 5 = 2. 4) Smaller, since you divide by the square root of n. These are my own answers, so please recheck them before publishing.
The standard error is the bridge from one sample to the whole population. It tells you how far the average can wander, and it shrinks with the square root of the sample size. Report it with every mean, and keep it apart from the standard deviation.