Standard Error Calculator

Paste your data, or enter a standard deviation and sample size, and get the standard error of the mean with every step shown: the sample SD, SE = s divided by the square root of n, and the 95% confidence interval it unlocks. A poll mode handles proportions.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Standard Error Calculator.

SD or SE: two different questions

These two get mixed up constantly, in classrooms and in published papers, and the fix is one clean distinction. The standard deviation describes your data: how much individual values differ from one another. Collect more data and it does not shrink; it just gets measured more accurately. The standard error describes your mean: how far the sample average likely sits from the true average you are trying to estimate, and it does shrink, by the square root of the sample size, because averaging lets random errors partly cancel.

Watch it happen. Sample the same population, one whose standard deviation is 20 points, at three sizes. At n = 25 the standard error is 20 / 5 = 4. At n = 100 it is 20 / 10 = 2. At n = 400 it is 20 / 20 = 1. The spread of the data never moved; the precision of the mean halved and halved again, because the square root of n quadrupled from 5 to 10 to 20. That is the whole relationship in three lines, and it is also the honest price list: each halving of the error costs four times the work.

If the spread itself is your question, our standard deviation calculator is the page that owns it. This page is about what happens after you average.

The formula

SE = s ÷ √n
SE of a proportion = √( p(1 − p) ÷ n )

Here s is the sample standard deviation (computed with n − 1 in the divisor), n is the sample size, and p is a poll result written as a decimal, so 52% is 0.52. Both formulas produce a number in the same units as the thing being estimated: points for a mean of points, percentage points for a proportion.

Worked example

Take the data set 2, 4, 4, 4, 5, 5, 7, 9 (n = 8). The mean is 40 ÷ 8 = 5, and the squared deviations from it sum to 32.

Sample standard deviation: s = √(32 ÷ 7) ≈ 2.1381. We divide by 7, not 8, because the mean was computed from these same eight values and pinned one of them down.

Standard error: SE = 2.1381 ÷ √8 = 2.1381 ÷ 2.8284 ≈ 0.7559. The sample mean of 5 is typically about 0.76 away from the true mean.

And the payoff: mean ± 1.96 × SE gives 5 ± 1.4816, so the 95% confidence interval runs 3.5184 to 6.4816. With a sample this small the 1.96 should really be a t-value, which widens things a little; the confidence interval calculator applies that correction properly.

Polls: where everybody meets standard error

A poll result is a mean in disguise: every answer is a 0 or a 1, and the reported percentage is their average. So the same machinery applies, with the tidy shortcut that the spread of yes/no data is fully determined by the split: SE = √( p(1 − p) ÷ n ). A poll finding 52% among 1,000 people has SE = √(0.52 × 0.48 ÷ 1,000) ≈ 0.0158, which is about 1.6 percentage points, and 1.96 times that is the plus or minus 3 you see in the fine print. Two things worth knowing: a 50/50 split is the noisiest a poll can be, so anything more lopsided is measured slightly better for free; and if you want to run this backwards (how many people for a target margin of error), that is exactly what our sample size calculator does.

Error bars: which story are they telling?

When a chart shows error bars, they may be standard deviations or standard errors, and the two tell different stories. SD bars describe the data: they say how much individuals varied, and they stay the same size no matter how many observations were collected. SE bars describe the estimate: they say how well the mean is known, and they shrink with sample size. That shrinking looks like precision, and it partly is; it is also partly just persistence, because any spread at all can be averaged down to tiny SE bars if someone collects enough data. Neither bar is wrong. The reading mistake is comparing one kind against the other, so before you judge two figures side by side, find the sentence in the caption that says which kind you are looking at.

Degrees of freedom, in plain words

Degrees of freedom count the values that are still free to vary once your summary statistics are pinned down. If five numbers must average 10, you can choose four of them however you like, but the fifth is then forced: the mean ate one degree of freedom. That is the real reason the sample standard deviation divides by n − 1. Measuring spread means measuring distance from the mean, and since the mean came from the sample itself, only n − 1 of those distances carry independent information; divide by n and you flatter yourself about the spread every single time.

The common formulas all follow the same logic: one sample estimating one mean has n − 1 degrees of freedom; two samples estimating two means have n1 + n2 − 2; a chi-square table with r rows and c columns has (r − 1)(c − 1), because the row and column totals pin the rest. Each estimated quantity costs one degree, and what remains is what your variance and t-values are actually built on.

Comparing spread across scales: the coefficient of variation

A standard deviation carries units, which makes it awkward to compare across different scales. Is a spread of 10 points a lot? On a 100-point test it is substantial; on a 1,000-point scale it is barely a wobble; the raw SD of 10 cannot tell those situations apart. The coefficient of variation fixes that by dividing the standard deviation by the mean: 10 / 100 = 10% versus 10 / 1,000 = 1%, and now the comparison is direct. The raw-data mode above reports it automatically. One honest caveat: the CV divides by the mean, so when the mean sits at or near zero the percentage explodes into something that describes nothing, which is why the calculator declines to show it in that case rather than printing a silly number.

Frequently asked questions

How do you calculate standard error?

Divide the sample standard deviation by the square root of the sample size: SE = s / sqrt(n). If you are starting from raw data, first find the mean, then the sample standard deviation (dividing the summed squared deviations by n minus 1), then divide that by the square root of n. For example, a sample of 25 values with a standard deviation of 20 has a standard error of 20 / 5 = 4. The calculator above walks every step with your own numbers.

What is the difference between standard deviation and standard error?

The standard deviation describes the spread of the data: how much individual values differ from one another, and it does not shrink as you collect more of them. The standard error describes the precision of the mean: how far the sample average likely sits from the true average, and it shrinks with the square root of the sample size. They answer different questions, which is why a paper can have a large SD and a tiny SE at the same time.

Why divide by the square root of n?

Because averaging cancels noise, but only partially. Each value arrives with its own random error, and when you average n of them, the errors partly offset one another rather than adding up. Work the algebra through and the spread of an average of n independent values comes out to the spread of one value divided by the square root of n. That square root is the reason precision is expensive: to halve the standard error you need four times the data.

What are degrees of freedom?

The number of values that are still free to vary once your summary statistics are pinned down. If five numbers must average 10, you can pick four of them freely but the fifth is forced, so there are 4 degrees of freedom. That is why the sample standard deviation divides by n minus 1: computing the mean from the sample used up one degree of freedom, leaving only n minus 1 independent pieces of information about the spread.

Does a bigger sample lower the standard error?

Yes, but by the square root, which is an honest diminishing return. Going from 25 to 100 observations (four times the work) only halves the standard error, and going from 100 to 400 halves it again. The standard deviation, meanwhile, does not move at all: more data measures the spread better, it does not reduce it.

What is the coefficient of variation?

The standard deviation divided by the mean, expressed as a percent. It puts spread on a common scale so you can compare data sets with different units or sizes: a 10-point SD is large on a 100-point test and trivial on a 1,000-point scale, and the CV (10% versus 1%) says so directly. It only makes sense when the mean is comfortably above zero; divide by a mean near zero and the percentage stops describing anything.

Do error bars show standard deviation or standard error?

Either, and the figure caption should say which. SD bars describe the data and stay the same size however many observations were collected; SE bars describe the mean and shrink with sample size, so they look more precise partly because someone was persistent. When comparing bars across studies, check which kind you are looking at first, because SE bars from a big study will always look tighter than SD bars from a small one.

Related calculators