Statistics
How To Calculate The Standard Error
The standard error of the mean estimates how far a sample average is likely to sit from the true population average. This page computes it from five fixed values using the sample standard deviation divided by the square root of the sample size, and shows every intermediate quantity along the way.
Last updated
Quick Answer
SE = s / sqrt(n)
- SE
- Standard error of the mean
- s
- Sample standard deviation, the square root of the sample variance
- n
- Number of observations in the sample
Compute the sample standard deviation and divide it by the square root of the number of observations. For the five values 2, 4, 4, 4 and 5 the mean is 3.8, the sample variance is 1.2 and the standard error is about 0.489898. The same calculation with identical values gives zero, and with 1, 2, 3, 4, 5 gives about 0.707107.
What Is The Standard Error?
The standard error of the mean measures how much the average of a sample would be expected to vary if you drew many samples of the same size from the same population. It is the standard deviation of the sampling distribution of the sample mean, not the spread of the individual observations. A small standard error means sample means cluster tightly around the true population mean; a large one means they wander. The quantity answers a practical question: if you repeated this survey, how far off could your average be? Because it is a standard deviation, it is measured in the same units as the data.
The formula is compact: the standard error equals the sample standard deviation divided by the square root of the sample size, written SE = s / sqrt(n). It follows from a basic property of variance: averaging n independent observations cuts the variance of their mean by a factor of n, so the standard deviation falls by a factor of sqrt(n). This is why doubling the sample does not halve the error; you must quadruple the sample to halve it. The relationship is the mathematical reason behind the familiar advice that larger samples give more precise estimates. It holds when observations are independent and drawn from a distribution with finite variance.
This calculator uses five fixed values to keep the arithmetic transparent, namely 2, 4, 4, 4 and 5. Their mean is 3.8, and the sum of squared deviations from that mean is 4.8. Because the entries are hard-coded, the expression for the mean, the squared deviations and the variance stays short enough to read directly. You can change any of the five values and watch each intermediate quantity update. The design is deliberate: a teaching tool should show every moving part rather than hide it behind a library call.
A detail that often changes the answer is the choice of divisor when computing variance. The sample variance divides the sum of squared deviations by n minus one, which here is four, giving 1.2. The population variance divides by n, giving 0.96, and is appropriate only when the five values are the entire population of interest. Dividing by n minus one corrects the downward bias that occurs when the mean is estimated from the same data. The standard error reported here uses the sample form, so it matches the usual textbook convention.
With a sample variance of 1.2, the sample standard deviation is the square root of that value, about 1.09545. Dividing by the square root of five gives a standard error of about 0.489898. Notice that the standard error is smaller than the standard deviation, because averaging five numbers smooths out some of their individual variation. Both numbers are reported on the page so you can see the gap. Confusing the two is a common mistake, and it makes the reported precision look much worse than it is.
If all five values are identical, every deviation from the mean is zero, the sum of squared deviations is zero, and the standard error collapses to zero. That result is correct: a sample with no internal variation gives exactly the same average every time you draw it. At the other extreme, a more spread-out set such as 1, 2, 3, 4 and 5 has a sample variance of 2.5 and a standard error of about 0.707107. Comparing these two cases shows that the standard error tracks the spread of the data, not merely the count. A sample of five can be precise or imprecise depending entirely on how widely its members differ.
The square-root relationship means the standard error shrinks as the sample grows, but with diminishing returns. Four times as many observations are needed to cut the error in half, and one hundred times as many to cut it by a factor of ten. This is why polling accuracy improves slowly and why marketing copy that promises dramatic gains from a slightly larger sample should be treated with suspicion. The same rule explains why small subgroups in a survey have wide margins of error. Planning a study therefore means working backwards from the precision you need to the sample size that delivers it.
The standard error is the building block of confidence intervals and hypothesis tests. A rough 95 per cent interval for a mean is the sample mean plus or minus about two standard errors, a rule that relies on the central limit theorem. That theorem says the sampling distribution of the mean approaches a normal shape as the sample grows, regardless of the shape of the underlying data, provided the variance is finite. With only five observations the approximation is crude, so the rule is illustrative here rather than authoritative. The page is teaching the arithmetic, not certifying the validity of an inference.
Several boundaries are worth keeping in mind. The formula assumes independent observations, so repeated measurements on the same subject or clustered data will give a misleadingly small error. It also assumes the data come from a distribution with a finite variance; heavy-tailed data can break the usual behaviour. The five-value layout is a deliberate simplification, not a claim that five points are enough for real research. Use the numbers to understand the mechanism, and switch to a full statistical package when the decision matters.
Formula
SE = s / sqrt(n)
Formula page →The sample standard deviation divided by the square root of the sample size. It is the standard deviation of the distribution of sample means, so it shrinks as n grows.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| SE | Standard error of the mean | same as data | The estimated spread of the sample mean around the population mean. |
| s | Sample standard deviation | same as data | The square root of the sample variance, about 1.09545 for the default values. |
| n | Sample size | count | The number of observations; five throughout this calculator. |
s^2 = sum((x_i - xbar)^2) / (n - 1)
Formula page →Sum the squared deviations from the sample mean and divide by n minus one. Dividing by four rather than five corrects the bias from estimating the mean from the same data.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| xbar | Sample mean | same as data | The average of the observations, 3.8 for the default values. |
| sum((x_i - xbar)^2) | Sum of squared deviations | squared units | The total of each squared distance from the mean, 4.8 here. |
| n - 1 | Sample degrees of freedom | count | The divisor for the unbiased sample variance, four for five values. |
xbar = sum(x_i) / n
Formula page →Add the observations and divide by how many there are. Every deviation in the variance calculation is measured from this centre.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| x_i | An individual observation | same as data | One of the five entered values x1 through x5. |
| n | Sample size | count | The count of observations, fixed at five in this tool. |
| xbar | Sample mean | same as data | The arithmetic average of all entered values. |
How To Calculate The Standard Error
- 1
List the five observations
Write down the values x1 through x5. The default set is 2, 4, 4, 4 and 5. The calculator accepts any real numbers in these five positions, so you can explore how a single extreme entry changes the spread. Keep the order consistent, although the mean and variance do not depend on it.
- 2
Compute the sample mean
Add the five numbers and divide by five. Here the total is 19, so the mean is 19 / 5 = 3.8. This centre is the reference point for every subsequent deviation. A wrong mean propagates into every squared deviation and therefore into the final answer.
- 3
Square and sum the deviations
Subtract the mean from each value and square the result. The deviations are -1.8, 0.2, 0.2, 0.2 and 1.2, whose squares are 3.24, 0.04, 0.04, 0.04 and 1.44. Adding them gives 4.8. Squaring removes the signs so that values below and above the mean both contribute to spread.
- 4
Divide by n minus one to get the variance
Divide the sum of 4.8 by n minus one, which is four, to obtain the sample variance 1.2. Dividing by five instead would give the population variance 0.96, a smaller figure used only when the five values are the whole population. The n minus one divisor is the standard choice for a sample.
- 5
Take the square root and divide by sqrt(n)
The square root of the sample variance is the sample standard deviation, about 1.09545. Divide that by the square root of five to get the standard error, about 0.489898. Equivalently, take the square root of 1.2 / 5. This last number is the primary result the calculator reports.
Examples
Example 1: The default set 2, 4, 4, 4, 5
- x1
- 2
- x2
- 4
- x3
- 4
- x4
- 4
- x5
- 5
| Step | Calculation | Result |
|---|---|---|
| Mean | — | 19 / 5 = 3.8 |
| Sum of squared deviations | — | 3.24 + 0.04 + 0.04 + 0.04 + 1.44 = 4.8 |
| Sample variance | — | 4.8 / 4 = 1.2 |
| Sample standard deviation | — | sqrt(1.2) = 1.09545 |
| Standard error | s / sqrt(n) = 1.09545 / sqrt(5) | 0.489898 |
Result: The standard error is 0.489898, with a sample standard deviation of 1.09545 and a sample variance of 1.2.
Example 2: All five values identical
- x1
- 4
- x2
- 4
- x3
- 4
- x4
- 4
- x5
- 4
| Step | Calculation | Result |
|---|---|---|
| Mean | — | 20 / 5 = 4 |
| Sum of squared deviations | — | 0 + 0 + 0 + 0 + 0 = 0 |
| Sample variance | — | 0 / 4 = 0 |
| Sample standard deviation | — | sqrt(0) = 0 |
| Standard error | s / sqrt(n) = 0 / sqrt(5) | 0 |
Result: The standard error is 0, since a sample with no variation has a standard deviation of 0.
Example 3: The evenly spaced set 1, 2, 3, 4, 5
- x1
- 1
- x2
- 2
- x3
- 3
- x4
- 4
- x5
- 5
| Step | Calculation | Result |
|---|---|---|
| Mean | — | 15 / 5 = 3 |
| Sum of squared deviations | — | 4 + 1 + 0 + 1 + 4 = 10 |
| Sample variance | — | 10 / 4 = 2.5 |
| Sample standard deviation | — | sqrt(2.5) = 1.58114 |
| Standard error | s / sqrt(n) = 1.58114 / sqrt(5) | 0.707107 |
Result: The standard error is 0.707107, larger than in the default case because the values are more spread out.
Calculator
Standard error of the mean
0.4898979485566356
- Sample standard deviation
- 1.0954451150103321
- Population variance (divide by n)
- 0.96
- Sample mean
- 3.8
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the The Standard Error calculator page.
Common Mistakes
Confusing the standard deviation with the standard error
The standard deviation describes the spread of individual observations, while the standard error describes the spread of the sample mean. The default data give 1.09545 and 0.489898 respectively. Quoting the larger figure as the uncertainty of the average overstates that uncertainty by more than a factor of two.
Dividing by n instead of n minus one
The unbiased sample variance divides by four for five values, not by five. Using five produces 0.96 rather than 1.2 here and a slightly smaller standard error. The population divisor is only appropriate when the values are the entire population rather than a sample drawn from one.
Dividing by the sample size rather than its square root
Some people divide the standard deviation by five instead of by sqrt(5). That makes the error far too small. Averaging independent observations reduces spread in proportion to the square root of the count, so the square root belongs in the denominator.
Assuming a bigger sample always gives half the error
Doubling the sample size only reduces the standard error by a factor of sqrt(2), about 0.707. To halve the error you need four times as many observations. Misreading this relationship leads to wildly optimistic plans for how much a modest increase in sample size will achieve.
Ignoring dependence between observations
The formula assumes the five values are independent. Repeated readings on the same subject, or observations clustered within a group, carry less independent information than their count suggests. Treating them as independent makes the standard error look smaller than the true uncertainty.
Treating a five-value sample as definitive
With only five observations the estimate of spread is itself very uncertain. The standard error is a useful teaching quantity here, but it is not a reliable statement about a population. The central limit approximation behind intervals needs far more data before it can be trusted.
FAQ
What does the standard error of the mean actually measure?
It measures how much the average of a sample would vary across repeated samples of the same size drawn from the same population. It is the standard deviation of the sampling distribution of the mean, so it quantifies the precision of the average rather than the spread of individual data points.
How is the standard error different from the standard deviation?
The standard deviation describes how far individual observations sit from their mean. The standard error divides that figure by the square root of the sample size and describes how far the sample mean sits from the population mean. For the default values the two are 1.09545 and 0.489898.
Why does this calculator use only five values?
Five fixed values keep every expression short enough to inspect directly. You can follow the mean, the squared deviations, the variance and the final error without a long column of numbers. The arithmetic is identical for larger samples, which are best handled by a statistical package.
Why is the sample variance divided by n minus one?
Because the mean was estimated from the same data, the deviations are slightly smaller than they would be around the true population mean. Dividing by n minus one corrects that downward bias and gives an unbiased estimate of the population variance. For five values the divisor is four, producing 1.2 rather than 0.96.
What happens to the standard error when all values are the same?
It becomes zero. Every deviation from the mean is zero, so the sum of squared deviations and the variance are both zero. A sample with no internal variation would give exactly the same average on every draw.
How is the standard error used in a confidence interval?
A common approximate 95 per cent interval for a mean is the sample mean plus or minus about two standard errors. The multiplier is more precisely a critical value from the t distribution when the sample is small. The interval relies on the central limit theorem and on the observations being independent.
References
- [1], Standard error — https://en.wikipedia.org/wiki/Standard_error
- [2], Standard deviation — https://en.wikipedia.org/wiki/Standard_deviation
- [3], Central limit theorem — https://en.wikipedia.org/wiki/Central_limit_theorem
