StatsSolve logo
Statistics & probability tools
Sample & population • Variance • Standard error • Frequency tables

Standard Deviation Calculator

Paste your numbers and get the mean and the sample and population standard deviation, with variance, standard error and every step of the working. Frequency tables work too.

Last updated October 17, 2026  •  Written by Mark, StatsSolve  •  Free, no sign-up

mean −1 SD +1 SD

Mean and Standard Deviation Calculator

Type or paste your data. Results update as you type.

StatsSolve Statistics Tool
Up to 500 numbers, separated by commas, spaces or new lines. Negatives and decimals are fine (use a period for decimals).
Quick:
Sample standard deviation—
Variance—
Mean—
Count, n—
Sum—
Sum of squares (SS)—
Standard error of the mean—
Sample SD (n − 1)—
Population SD (n)—
Minimum—
Maximum—
How many values fall near the mean
RangeFromToValues inside

Uses the standard deviation type you selected.

Your data and its spread
Each dot is a value. The orange line is the mean, and the bands reach one and two standard deviations either side.
Mean±1 SD±2 SDValues
Value—
Step-by-step workingWorking appears here.
Every deviation from the mean
Same calculation in other toolsSyntax appears here.
SummarySummary appears here.
σ
Sample and population at once

Both versions are always shown, so you can match whatever your course or spreadsheet expects.

f
Frequency tables welcome

Enter each value with its count instead of retyping hundreds of observations.

✓
Every step visible

See each deviation and squared deviation, so you can check homework instead of just trusting a number.

What Does a Standard Deviation Calculator Do?

A standard deviation calculator measures how far the numbers in a data set typically sit from their average. You enter a list of values, and it returns the mean, the variance and the standard deviation, along with the steps that connect them. A small standard deviation means the values bunch up near the mean. A large one means they are spread out.

The result is in the same unit as your data, which is why it is so widely used. If your data are test scores in points, the standard deviation is in points. If they are weights in kilograms, it is in kilograms. You can read it as a rough “typical distance from the mean.”

This calculator gives you the sample and the population version at once, lets you paste a plain list or a table of values with frequencies, and shows every squared deviation, so a homework answer can be checked line by line. It also reports the standard error and how many of your values fall within one, two and three standard deviations of the mean.

What Is the Standard Deviation Formula?

The standard deviation is the square root of the average squared distance from the mean. For a whole population the formula is:

σ = √( Σ(x − μ)² / N )

For a sample, the divisor changes from N to n − 1, and the symbols become s and x̄:

s = √( Σ(x − x̄)² / (n − 1) )

Everything under the root sign is the variance. The sum Σ(x − x̄)² is called the sum of squares, or SS. So the whole calculation is: find the mean, square every deviation from it, add them up, divide by n or n − 1, and take the square root. The squaring stops positive and negative deviations from cancelling, and the root brings the answer back to the original unit. The variance calculator shows that squared version on its own, with the sample and population forms side by side.

A shortcut version, Σx² − (Σx)²/n, gives the same sum of squares and is handy with a basic calculator. Later in this guide you will see why a computer should not use it on large numbers.

How Do You Use This Standard Deviation Calculator?

  1. Choose the input style. “List of numbers” takes values separated by commas, spaces, tabs, semicolons or new lines, so a column pasted from Excel works as is. “Values with frequencies” takes one pair per line, such as 3, 5 for the value 3 appearing five times.
  2. Pick sample or population. That choice decides which standard deviation is shown as the main answer. The other one is always displayed beside it.
  3. Read the results. You get the standard deviation, variance, mean, count, sum, sum of squares, standard error, minimum and maximum, plus the ranges one, two and three standard deviations either side of the mean.
  4. Check the working. The step list and the table of deviations show where each number came from. The dot plot marks the mean and the ±1 and ±2 standard deviation bands.

Up to 500 values are accepted, and the decimal-places menu changes only the display. The arithmetic uses full precision and a two-pass method that stays accurate even when the numbers are large.

Should You Use Sample or Population Standard Deviation?

Use the population standard deviation when your data contain every member of the group you care about. Use the sample standard deviation when your data are a subset used to learn about a bigger group, which is the usual situation.

The sample version divides by n − 1 instead of n. A sample’s own mean sits closer to its values than the true population mean would, so squared distances measured from it come out a little too small. Dividing by n − 1 corrects for that and makes the sample variance an unbiased estimate of the population variance. This is called Bessel’s correction. The sample standard deviation is still slightly low on average, by a small amount: for normal data with n = 5, it averages about 94% of the true value.

The gap between the two versions is the factor √(n / (n − 1)), and it fades fast as n grows:

nSample SD is larger than population SD by
241.4%
322.5%
511.8%
105.4%
301.7%
1000.5%

With a handful of values the choice matters a lot. With a few hundred it barely matters. If a textbook question does not say, check whether the numbers are described as “a sample of…” or “all of…”, and when in doubt, use the sample version.

How Do You Calculate Standard Deviation by Hand?

Take the eight values 2, 4, 4, 4, 5, 5, 7 and 9, and treat them as a complete population.

Step 1: mean = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) / 8 = 40 / 8 = 5 Step 2: deviations from 5: −3, −1, −1, −1, 0, 0, 2, 4 Step 3: squared deviations: 9, 1, 1, 1, 0, 0, 4, 16 (sum = 32) Step 4: population variance = 32 / 8 = 4 Step 5: population SD = √4 = 2

If the same eight numbers are a sample, step 4 divides by 7 instead: the variance is 32 / 7 = 4.5714 and the standard deviation is √4.5714 = 2.1381. A useful check on step 2: the signed deviations must add up to zero. If they do not, the mean is wrong, and every later step inherits the error.

The shortcut formula agrees. Here Σx² = 232 and (Σx)²/n = 1600 / 8 = 200, and 232 − 200 = 32, the same sum of squares.

Example 2: Standard Deviation of Exam Scores

Seven students scored 72, 85, 90, 68, 77, 95 and 81. These seven are a sample of a larger course, so use n − 1.

MeasureValue
Count, n7
Mean81.1429
Sum of squares558.8571
Sample variance93.1429
Sample standard deviation9.6511
Population standard deviation8.9351
Standard error of the mean3.6478

So a typical score sits about 9.65 points from the average of 81.14. One standard deviation either side gives 71.49 to 90.79, and five of the seven scores fall inside that band. The score of 95 is 1.44 standard deviations above the mean, and the 68 is 1.36 below it.

Example 3: Two Classes With the Same Mean but Different Spread

Both classes average 75 on a quiz, so the means hide a real difference. Class A scored 70, 72, 75, 78 and 80. Class B scored 50, 60, 75, 90 and 100.

ClassMeanSample SDRange of mean ± 1 SD
A754.123170.88 to 79.12
B7520.615554.38 to 95.62

Class B’s standard deviation is five times larger. In class A almost everyone is close to 75. In class B some students are far ahead and some far behind, and a teacher would plan quite differently for each room. This is the situation where the average alone misleads and the standard deviation earns its place.

Example 4: How Do You Find Standard Deviation From a Frequency Table?

When data are already tallied, you do not need to retype every observation. A survey of 38 people asked how many siblings they have:

Siblings (x)012345
People (f)8149421

The total count is n = Σf = 38 and the weighted sum is Σfx = 57, so the mean is 57 / 38 = 1.5. Each squared deviation is multiplied by its frequency:

SS = 8(0 − 1.5)² + 14(1 − 1.5)² + 9(2 − 1.5)² + 4(3 − 1.5)² + 2(4 − 1.5)² + 1(5 − 1.5)² = 18 + 3.5 + 2.25 + 9 + 12.5 + 12.25 = 57.5

The sample variance is 57.5 / 37 = 1.5541 and the sample standard deviation is 1.2466. As a population, 57.5 / 38 = 1.5132 and the standard deviation is 1.2301. In this calculator, choose “Values with frequencies” and type the six lines 0, 8 through 5, 1.

What Does the Standard Deviation Tell You?

It tells you how tightly the data cluster around the mean, in the units of the data. A standard deviation of 0 means every value is identical. The bigger it gets, the more scattered the values are. To find the center of the same data, use the mean, median and mode calculator, or plot every value as a dot with the strip chart maker.

For data with a roughly bell-shaped distribution, the empirical rule gives a practical reading: about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. In a simulated set of 200 normal values with a mean of 100 and a standard deviation of 15, 67% landed within one sample standard deviation of the mean and 95.5% within two, close to the rule.

Small data sets can stray from it. In Example 2, five of seven scores, about 71%, sit within one standard deviation, and the siblings survey has 23 of 38, about 61%. The rule is a guide for bell-shaped data, not a law. For skewed data such as incomes, the standard deviation is still a valid number, but the 68-95-99.7 percentages no longer apply.

If you do assume a normal shape, the normal curve calculator turns a mean and a standard deviation into exact percentiles, and the normal CDF calculator handles left-tail and right-tail probabilities.

What Is the Difference Between Standard Deviation, Variance and Standard Error?

The variance is the standard deviation squared. It is the average squared distance from the mean, so its unit is the square of the data unit, which makes it awkward to interpret but convenient in formulas. For the exam scores the sample variance is 93.1429 points squared and the standard deviation is 9.6511 points.

The standard error of the mean is a different idea. The standard deviation describes how spread out the individual values are. The standard error describes how precisely the sample mean estimates the true mean:

SE = s / √n

For the exam scores, 9.6511 / √7 = 3.6478. Collecting more data does not change the standard deviation much, but it shrinks the standard error. Quadruple the sample and the standard error is halved.

A short worked case: six fill weights of a drink, in ounces, are 12.1, 11.8, 12.4, 12.0, 12.3 and 11.9. The mean is 12.0833, the sample standard deviation is 0.2317 and the standard error is 0.0946. A 95% confidence interval for the true mean uses the t-value for 5 degrees of freedom, 2.5706, giving 12.0833 ± 0.2431, or 11.84 to 12.33. The interval is built from the standard error. The spread of single bottles is described by the standard deviation.

How Much Can One Outlier Change the Standard Deviation?

A lot, because deviations are squared and a far-away value gets heavy weight. Start with 10, 12, 11, 13, 12 and 11. The mean is 11.5 and the sample standard deviation is 1.0488. Now add one more observation, 60, perhaps a typing slip:

DatanMeanSample SD
10, 12, 11, 13, 12, 11611.51.0488
Same, plus 60718.428618.3563

One value multiplies the standard deviation by more than 17. If you see a result that looks far too large, scan the table of deviations for a value with an unusually big squared deviation.

When outliers are a genuine feature of the data, consider a measure that resists them. The five number summary calculator reports the interquartile range and flags outliers with the 1.5 × IQR rule, the quartile calculator adds the quartile deviation and Bowley skewness, and the mean absolute deviation calculator gives a spread measure that weights large deviations less heavily.

Why Do Excel, R and Python Give Different Standard Deviations?

They often differ by default, and the reason is almost always the divisor. Some tools assume a sample, others a population, and two popular ones disagree with each other.

Excel / Sheets   sample        =STDEV.S(A2:A9)      (older name: STDEV)
Excel / Sheets   population    =STDEV.P(A2:A9)      (older name: STDEVP)
TI-84            sample  Sx    population  σx   (1-Var Stats)
R                sd(x)                              # sample, n - 1
Python statistics  stdev(x)    pstdev(x)            # sample, population
NumPy            np.std(x, ddof=1)                  # sample
                 np.std(x)                          # population (ddof=0)
pandas           s.std()                            # sample (ddof=1)
                 s.std(ddof=0)                      # population
SciPy            scipy.stats.tstd(x)                # sample

The two trouble spots are NumPy, which divides by n unless you pass ddof=1, and pandas, which divides by n − 1 unless you pass ddof=0. The same eight values from Example 1 give 2.0 in np.std(x) and 2.1381 in x.std() on a pandas Series. Neither is wrong; they answer different questions.

Excel also has STDEVA and STDEVPA, which count text as 0 and TRUE as 1 inside a range. Use STDEV.S and STDEV.P for ordinary numeric data. The “Same calculation in other tools” box in the calculator prints the exact formulas for your own numbers.

Why Can the Shortcut Formula Give a Wrong Answer on a Computer?

The shortcut Σx² − (Σx)²/n is exact in algebra but unreliable in floating-point arithmetic when the values are large and close together. Both terms become enormous and nearly equal, so subtracting them wipes out the significant digits. This is called catastrophic cancellation.

Take the four values 1,000,000,004, 1,000,000,007, 1,000,000,013 and 1,000,000,016. Their true sample variance is 30, because the spread is the same as for 4, 7, 13 and 16. Applying the shortcut in ordinary 64-bit floating point can give a negative variance, which is impossible; a NumPy test returned −170.67.

The safe method, which this calculator uses, finds the mean first and then sums squared deviations from it, so the large offset disappears before anything is squared. Subtracting a typical value from every observation before using the shortcut is also safe, because shifting data does not change the standard deviation. If you ever see a negative variance from a spreadsheet formula you built yourself, this is the likely cause.

What Mistakes Cause a Wrong Standard Deviation?

  • Using n when you should use n − 1, or the reverse. This is the most common cause of an answer that is off by a little in a quiz.
  • Taking the root too early or not at all. The variance is not the standard deviation. If your answer is in squared units, you stopped one step short.
  • Rounding the mean before computing deviations. Rounding 81.1429 to 81 changes every deviation. Keep full precision until the final step.
  • Dropping a negative sign inside the squares. A deviation of −3 squared is 9, not −9.
  • Mixing units. If part of your data is in centimetres and part in metres, the result means nothing.
  • Including a header or a blank cell. Pasting a column with a label such as “Score” will fail in this calculator with a clear message, and in a spreadsheet it can be silently skipped.
  • Comparing standard deviations across different scales. A standard deviation of 5 means different things for data averaging 20 and data averaging 2,000. Use the coefficient of variation calculator to compare spread relative to the mean.

How Does Standard Deviation Compare With Other Measures of Spread?

MeasureUnitBest used when
RangeSame as dataA quick look; very sensitive to the two extreme values
Standard deviationSame as dataRoughly symmetric data; the default in most courses
VarianceSquaredFurther formulas such as pooling or ANOVA
Mean absolute deviationSame as dataAn easier average distance from the center
Interquartile rangeSame as dataSkewed data or data with outliers
Coefficient of variationNone (%)Comparing spread across different units or averages

Standard deviations also appear inside other distributions. A binomial count with n = 100 and p = 0.30 has a standard deviation of √(100 × 0.30 × 0.70) = 4.58, which you can explore in the binomial distribution calculator. A Poisson count with a mean of 4 has a standard deviation of √4 = 2, shown in the Poisson distribution calculator. If observations should count unequally, find the center with the weighted mean calculator first.

Frequently Asked Questions

How do you calculate standard deviation?

Find the mean, subtract it from every value, square each difference, add the squares, divide by n for a population or n − 1 for a sample, and take the square root. For 2, 4, 4, 4, 5, 5, 7 and 9 the sum of squares is 32, so the population standard deviation is √(32/8) = 2.

What is the difference between sample and population standard deviation?

The population version divides the sum of squared deviations by n and applies when you have every member of the group. The sample version divides by n − 1 and applies when your data are a subset. For the eight values above they give 2 and 2.1381.

What is a good standard deviation?

There is no universal good value. It is judged against the average and the context. A standard deviation of 5 is large for data averaging 10 and tiny for data averaging 1,000. The coefficient of variation expresses it relative to the mean to make that comparison easier.

Can the standard deviation be negative or zero?

It can never be negative, because it is a square root. It is zero only when every value in the data set is identical.

Why do we divide by n − 1 for a sample?

The sample mean is calculated from the same data, so it sits closer to the values than the true mean does, and squared deviations come out slightly too small. Dividing by n − 1 corrects that bias in the variance. It is called Bessel’s correction.

How is standard deviation different from variance?

The variance is the square of the standard deviation. The standard deviation is in the same unit as the data, while the variance is in squared units, so the standard deviation is easier to interpret.

How is standard deviation different from standard error?

The standard deviation measures how spread out individual values are. The standard error of the mean, s divided by √n, measures how precisely the sample mean estimates the true mean. For seven exam scores with s = 9.6511, the standard error is 3.6478.

How many data points do I need to calculate a standard deviation?

A population standard deviation can be computed from one value, though it will be 0. A sample standard deviation needs at least two values, because dividing by n − 1 with one value means dividing by zero. Very small samples give very uncertain estimates.

Sources: NIST/SEMATECH e-Handbook of Statistical Methods, section on measures of scale; NumPy documentation for numpy.std; pandas documentation for Series.std; SciPy documentation for scipy.stats.tstd; Microsoft documentation for STDEV.S and STDEV.P.