Skip to content

Standard Deviation Calculator

Written by Dr. Andrew Chen Dr. Andrew Chen, PhD in Computer Science
Reviewed by Prof. Omar Farooq Prof. Omar Farooq, PhD in Mechanical Engineering

Last updated 2026-08-15 · 4 cited sources

Standard deviation is a single number that reports how far the values in a data set typically fall from their own mean. A small standard deviation means the values sit close to the average and the average describes them well; a large one means they scatter, and the average alone hides more than it tells.

One field does the work. Type or paste at least two numbers — commas or spaces separate them — and the panel returns the sample standard deviation as its headline figure, followed by n, the mean, the sum of squared deviations, the population standard deviation, and both variances. Every intermediate quantity is printed, so the whole calculation can be reproduced on paper.

Two cautions. Sample (÷ n − 1) and population (÷ n) answer different questions, and choosing the wrong one is the most common mistake in intro statistics. And because the measure is built from squared distances, a single extreme value moves it hard: the outlier in the limits section below multiplies the result by more than nine.

Standard Deviation Calculator

Enter your values below.

Standard Deviation

Enter your details and press “Calculate” to see your results.

Standard deviation measures spread — the typical distance of values from their mean. The calculator shows both forms: sample s (dividing by n − 1, the default for measured data, correcting for the mean being estimated from the same data) and population σ (dividing by n, for when your list IS the entire group). Variance is each one squared, shown alongside with the running quantities (n, mean, sum of squared deviations) so the whole computation is checkable by hand.

What Is Standard Deviation?

Every data set has a center and a width. The mean reports the center. Standard deviation reports the width — in the same units as the data — by answering one question: how far from the center does a typical value lie?

Two Data Sets, One Mean, Two Different Stories

Six students score 70, 72, 74, 76, 78 and 80. Six others score 50, 55, 60, 90, 95 and 100. Both classes average exactly 75, so the mean cannot tell them apart. Standard deviation can: the first list returns a sample s of 3.7417, the second returns 22.3607.

ClassnMeanΣ(x − mean)²Sample sPopulation σ
A — 70, 72, 74, 76, 78, 80675703.74173.4157
B — 50, 55, 60, 90, 95, 100675250022.360720.4124

The difference is born in the sum of squared deviations: 70 against 2,500 across the same number of students. Squaring is what lets the far-flung scores dominate. A student 25 marks from the mean contributes 625 to that total; one 2 marks away contributes 4. Distance from the average is not counted linearly, and that is a deliberate property rather than a quirk — it is what makes the measure respond to genuine outliers instead of shrugging at them.

Variance and Standard Deviation Are the Same Fact, Twice

Variance is the average of those squared deviations; standard deviation is its square root. Run the default list 2, 4, 4, 4, 5, 5, 7, 9 and the panel reports s² = 4.5714 beside s = 2.1381, and σ² = 4 beside σ = 2. Nothing new is measured between the two — the second is simply the first brought back to a readable scale.

That scale is the whole point of the square root. Variance carries squared units: squared dollars, squared centimeters, squared marks, none of which describes anything in the physical world. Standard deviation lands back in the units of the data, so σ = 2 can be compared directly against values that average 5. Variance keeps its place in the mathematics because variances of independent quantities add together and standard deviations do not, which is why almost every statistical test is built on variance and almost every plain-English summary quotes the standard deviation.

Standard Deviation Is Not the Range

The range — largest minus smallest — uses two values and discards everything between them. Standard deviation uses all of them, which is why it survives a single unusual reading better than the range does and why it is far more work to compute by hand. For the heights 160, 165, 170, 172, 175, 180 and 185 cm the range is 25 cm while the sample standard deviation is 8.5412 cm.

The two are linked by a hard ceiling: the population standard deviation can never exceed half the range, a result known as Popoviciu's inequality on variances, and it reaches that ceiling only when every value sits at one extreme or the other. Enter 10, 20 and σ comes back exactly 5 — half of the 10-point range, the equality case. For the seven heights, σ = 7.9076 against a ceiling of 12.5. That makes a fast error check on homework: any population standard deviation larger than half the range is arithmetically impossible.

The center that every deviation is measured from, along with the median and the mode, has its own tool — the Average Calculator.

What Is the Standard Deviation Formula?

There are two formulas and they differ by one character: the divisor. Everything before the division is identical, which is why the calculator can report both from a single pass over your numbers.

The Sample Standard Deviation Formula

This is the form the calculator leads with, written the way the result panel labels its own quantities. The symbol for it is s, and its square, s², is the sample variance.

s = √[ Σ(x − mean)² ÷ (n − 1) ]

mean = Σx ÷ n

Read right to left: subtract the mean from every value, square each difference, add the squares, divide by one less than the count, take the square root. In textbook notation the mean of a sample is written x̄ ("x-bar") and the standard deviation s, so the same line appears as s = √[ Σ(x − x̄)² / (n − 1) ].

The Population Standard Deviation Formula

Identical arithmetic up to the division, where the divisor is the plain count. In textbook notation the population mean is μ ("mu") and the population standard deviation σ ("sigma"), and neither symbol implies a different calculation — only a different claim about what the numbers represent.

σ = √[ Σ(x − mean)² ÷ n ]

For 2, 4, 4, 4, 5, 5, 7, 9 the sum of squared deviations is 32, so σ = √(32 ÷ 8) = √4 = 2 exactly, while s = √(32 ÷ 7) = 2.1381. Same eight numbers, two divisors, two correct answers to two different questions.

The Shortcut Formula for the Sum of Squares

Subtracting the mean from every value is tedious by hand and invites rounding errors whenever the mean is not a whole number. An algebraically identical shortcut needs only two running totals — the sum of the values and the sum of their squares — so the data can be worked through in a single pass.

Σ(x − mean)² = Σx² − (Σx)² ÷ n

For 2, 4, 4, 4, 5, 5, 7, 9: Σx = 40 and Σx² = 232, so the sum of squared deviations is 232 − (40² ÷ 8) = 232 − 200 = 32, matching the 32 the calculator prints. The shortcut is exact rather than approximate. Its one weakness is numerical: with very large values it subtracts two nearly equal totals, which loses significant digits, and that is why statistical software — including the code behind this page — computes the deviations directly instead.

What Each Symbol Means

Every quantity in the formulas appears in the result panel, so the notation and the output line up one to one. The right-hand column is the default data set 2, 4, 4, 4, 5, 5, 7, 9.

SymbolMeaningValue for the default data
nhow many values you entered8
x̄ or μthe mean, Σx ÷ n5
Σ(x − mean)²sum of squared deviations32
sample variance, ÷ (n − 1)4.5714
ssample standard deviation2.1381
σ²population variance, ÷ n4
σpopulation standard deviation2

Results are rounded to four decimal places. That is more precision than most reporting needs and enough that a hand check will agree digit for digit.

How Do You Calculate Standard Deviation?

Six steps, in the order the calculator runs them. Working through one set by hand is the fastest way to see why the answer behaves the way it does.

Step by Step

  • Count the values. For 2, 4, 4, 4, 5, 5, 7, 9 that gives n = 8.
  • Add them and divide by n. The total is 40, so the mean is 40 ÷ 8 = 5.
  • Subtract the mean from each value. The eight differences are −3, −1, −1, −1, 0, 0, 2 and 4.
  • Square each difference: 9, 1, 1, 1, 0, 0, 4 and 16.
  • Add the squares. The sum of squared deviations is 32.
  • Divide, then take the square root. For a sample, 32 ÷ 7 = 4.5714 and √4.5714 = 2.1381. For a population, 32 ÷ 8 = 4 and √4 = 2.

The calculator performs all six in one pass and prints n, the mean and the sum of squared deviations alongside the answer, so any single step can be checked without redoing the rest.

Worked Example: 2, 4, 4, 4, 5, 5, 7, 9

This is the set the calculator loads by default, and it is the one most textbooks use, because the population answer comes out as a whole number. The middle column is the deviation from the mean of 5; the right column squares it.

Value xx − 5(x − 5)²
2−39
4−11
4−11
4−11
500
500
724
9416
Σ = 40Σ = 0Σ = 32
What the result panel returns
s = 2.1381 · n = 8 · mean = 5 · Σ(x−mean)² = 32 · σ = 2 · s² = 4.5714 · σ² = 4

The middle column summing to zero is not a coincidence in this data set — it happens for every data set, because the mean is defined as the balance point of the values. That zero is precisely why the deviations must be squared before they are added: without squaring, the positives and negatives cancel and every list on earth would appear to have no spread at all.

Three Checks That Catch a Wrong Answer

Standard deviation has predictable behavior under simple transformations, and each of these takes a few seconds to verify in the calculator.

  • Adding a constant to every value must leave the answer unchanged. Shift the example up by 10 — 12, 14, 14, 14, 15, 15, 17, 19 — and the mean moves from 5 to 15 while s stays at 2.1381. Spread is about distances, and sliding the whole set along the number line changes no distance.
  • Multiplying every value by a constant multiplies the answer by that same constant. Double the example — 4, 8, 8, 8, 10, 10, 14, 18 — and s doubles to 4.2762 while σ goes from 2 to 4. This is why converting units rescales the standard deviation but never reshapes the data.
  • The population σ can never be larger than half the range. Here half the range is (9 − 2) ÷ 2 = 3.5 and σ = 2, comfortably inside. A result above that ceiling means a step went wrong, usually a dropped square or a mistyped value.

A fourth check needs no calculation: the sample s is always slightly larger than the population σ for the same numbers, because it divides by a smaller number. If yours came out the other way around, the two have been swapped.

Standard Deviation Examples Worked in Full

Three data sets from different fields, each run through the calculator. The arithmetic is identical every time; what changes is what the resulting number is worth knowing.

Exam Scores: 70, 72, 74, 75, 76, 78, 80

Seven students, n = 7, mean 75, sum of squared deviations 70. The calculator returns a sample s of 3.4157 and a population σ of 3.1623, with variances of 11.6667 and 10.

A student who scored 80 is 5 marks above the mean, which is 5 ÷ 3.4157 = 1.46 standard deviations — around the 93rd percentile if the class follows a normal curve. Drop that same 80 into class B from earlier, where the mean is also 75 but s is 22.3607, and it sits just 0.22 standard deviations above the mean, barely out of the middle. The raw mark has not moved. The spread it is being read against has, and that is the entire reason standardized tests report positions rather than raw scores.

Lab Measurements: 9.8, 9.9, 10.0, 10.1, 10.2 Grams

Five weighings of the same object. The mean is 10, the sum of squared deviations is 0.1, the sample standard deviation is 0.1581 g and the sample variance 0.025. Relative to a mean of 10 g, that spread is 1.58% — tight enough that the fourth decimal place of the result is doing real work.

What this number describes is repeatability, not correctness. A scale reading half a gram heavy on every single weighing would produce these exact same deviations and the exact same 0.1581, because the deviations are measured from the data's own mean rather than from the true weight. Precision and accuracy are separate claims, and standard deviation only ever speaks to the first.

Annual Returns: Two Funds With the Same Average

Fund A returns 6, 7, 8, 5 and 9 percent across five years. Fund B returns 22, -8, 15, -3 and 9. Both average exactly 7%, and negative values are handled as ordinary numbers — typed with a plain hyphen, which is the only minus sign the field reads. Fund A's sample standard deviation is 1.5811; fund B's is 12.4298, nearly eight times larger.

Data setnMeanSample sPopulation σs ÷ mean
Exam scores (marks)7753.41573.16234.55%
Lab weighings (grams)5100.15810.14141.58%
Fund A returns (%)571.58111.414222.59%
Fund B returns (%)5712.429811.1176177.57%

Read as bands one standard deviation wide around the mean, fund A spans 5.42% to 8.58% and fund B spans −5.43% to 19.43%. That gap is what the finance world calls volatility, and it is the same statistic under a different name. The more important caveat is the sample size: five numbers produce a standard deviation that is itself a rough estimate, and neither fund has been characterized by this exercise — only described.

The final column is the coefficient of variation, and it is the only column in that table whose entries can be compared with each other. Marks, grams and percentage returns share no units; the ratio of spread to mean does.

Sample or Population: Which One Do You Need?

The calculator reports both, so nothing is lost either way — but only one of them answers your question, and the choice depends entirely on what your list of numbers is standing in for.

SituationUseDivide by
Survey of 200 customers out of many thousandsSample sn − 1
Test scores of your whole class, describing that classPopulation σn
Repeated lab measurements estimating a true valueSample sn − 1
All 12 months of one year's sales, describing that yearPopulation σn
Any data feeding a t-test, confidence interval or regressionSample sn − 1
Not sure, or the data represents something largerSample sn − 1

Why Divide by n − 1?

Deviations are measured from the sample's own mean, and that mean is pulled toward whatever values happen to be in the sample. The distances therefore come out systematically too small, and dividing by n would carry that shrinkage straight into the estimate. Dividing by n − 1 inflates the result by just enough to remove the bias on average, a fix known as Bessel's correction.

Wolfram MathWorld notes the name is a misattribution — the correction factor was used by Gauss as early as 1823. The practical reading is simpler than the theory: with n − 1 you are admitting that one piece of information has already been spent on estimating the mean, so only n − 1 independent deviations remain. That count is what statisticians call the degrees of freedom, and it reappears in every t-test that follows.

How Much the Two Answers Differ

The ratio between them is fixed by sample size alone: s is always √(n ÷ (n − 1)) times σ. That factor is large when the data are few and negligible once the data are many, which is the real reason the choice matters most on small homework data sets and least on production data.

ns is larger than σ byExample data 1 to nSample sPopulation σ
322.47%1, 2, 310.8165
511.80%1 … 51.58111.4142
105.41%1 … 103.02772.8723
301.71%1 … 308.80348.6554
1000.50%1 … 10029.011528.8661
5000.10%1 … 500144.4818144.3373

At n = 2 the gap is at its widest — 41.42% — which is why a standard deviation quoted from two measurements should be treated as a placeholder rather than a finding. The calculator accepts two values because the arithmetic is defined there, not because two values describe anything.

Standard Deviation Chart: The 68–95–99.7 Bands

Once data are roughly bell-shaped, the standard deviation stops being an abstract width and becomes a ruler. The share of values falling inside each band is fixed by the normal curve, and the figures below come from the standard normal distribution rather than from any particular data set.

Band around the meanInsideOutsideRoughly
± 1 SD68.27%31.73%1 value in 3 falls outside
± 1.645 SD90.00%10.00%1 in 10
± 1.96 SD95.00%5.00%1 in 20
± 2 SD95.45%4.55%1 in 22
± 2.5 SD98.76%1.24%1 in 81
± 3 SD99.73%0.27%1 in 370

The rule of thumb is usually quoted as 68, 95 and 99.7, and the exact areas are 68.27%, 95.45% and 99.73%. Note the row that does not get taught: the familiar 95% threshold sits at 1.96 standard deviations, not 2, which is where the 1.96 in confidence-interval formulas comes from.

Where Each Band Edge Sits as a Percentile

The same curve read cumulatively answers a different question: not how much falls inside a band, but what share of values fall below a given point. These are the figures a normal table supplies, and they are what turns a standard deviation into a rank.

Distance from meanPercentileReading
−3 SD0.13lowest 1 in 740
−2 SD2.28bottom 2%
−1 SD15.87bottom 16%
mean50.00the midpoint
+1 SD84.13top 16%
+2 SD97.72top 2%
+3 SD99.87top 1 in 740

These match the cumulative normal table published in the NIST/SEMATECH e-Handbook of Statistical Methods, which lists 0.34134 for the area from the mean out to 1 SD, 0.47725 out to 2 SD and 0.49865 out to 3 SD. Double those and you have the band percentages in the table above.

What the Bands Do on Real, Small Data

The percentages describe an infinite normal population. A short list of real measurements approximates them loosely at best. Take the seven heights 160, 165, 170, 172, 175, 180 and 185 cm: the mean is 172.4286 and s is 8.5412, so the one-standard-deviation band runs from 163.89 to 180.97 cm and holds 5 of the 7 values, or 71%.

The two-standard-deviation band, 155.35 to 189.51 cm, holds all 7. Neither figure lands on 68% or 95%, and neither should — with seven values the smallest possible step is one seventh, or 14 percentage points. Treat the empirical rule as a description of shape that becomes reliable at large n, and as a rough sanity check below that.

How to Read Your Result

The number the calculator returns has no meaning on its own. It acquires one from the mean it belongs to, from the units, and from the question that made you compute it.

Big or Small Depends on the Mean

A standard deviation of 2 is trivial on values averaging 500 and enormous on values averaging 5. Dividing the standard deviation by the mean strips the units out and gives a figure that can be compared across data sets — the coefficient of variation, quoted as a percentage.

coefficient of variation = s ÷ mean × 100%
Data setMeanSample ss ÷ meanWhat that says
Lab weighings, grams100.15811.58%highly repeatable
Exam marks, 7 students753.41574.55%a tightly grouped class
Heights, cm172.42868.54124.95%typical of adult height data
The default data set52.138142.76%spread comparable to the values themselves
Six incomes with one large earner70166.666788146.2799125.62%the mean is not describing anyone

The ratio only behaves when the mean is positive and well away from zero. On data that straddle zero — temperature changes, profit and loss, the fund B returns above at 177.57% — it inflates without limit and should be dropped in favor of quoting the standard deviation directly.

Placing a Single Value: the z-Score

Once the mean and standard deviation are known, any individual value can be expressed as a number of standard deviations from the center. That is a z-score, and it is the bridge between your result and the percentile table above.

z = (value − mean) ÷ s

For the seven exam marks, a score of 80 gives z = (80 − 75) ÷ 3.4157 = 1.46. For the wide class B, the same 80 gives z = (80 − 75) ÷ 22.3607 = 0.22. A z beyond ±2 is conventionally treated as unusual and beyond ±3 as rare, which follows directly from the band table: only 4.55% of a normal distribution lies outside ±2, and 0.27% outside ±3.

Zero, and Why the Answer Is Never Negative

A result of 0 means every value you entered is identical — enter 5, 5, 5, 5, 5 and the panel returns s = 0, σ = 0 and a sum of squared deviations of 0. That is a real answer, not an error, and it is the only case where the mean describes the data perfectly.

A negative result is impossible. The quantity being square-rooted is a sum of squares divided by a positive count, so it cannot fall below zero. A negative standard deviation on a homework page is always an arithmetic slip, most often a subtraction carried out after the squaring instead of before it.

If some of your values should count for more than others — credit hours, portfolio weights, unequal group sizes — the spread has to be weighted too, and the place to start is the Weighted Average Calculator.

Limits: When Standard Deviation Misleads

Standard deviation is the right measure of spread for roughly symmetric data and the input to nearly every statistical test. It is not a universal summary, and these are the situations where it either breaks down or quietly returns something other than what you meant.

  • One outlier dominates it. The seven values 18, 19, 21, 22, 23, 24 and 26 give s = 2.7946. Add a single 95 and s becomes 25.989 — 9.3 times larger — while the mean moves from 21.8571 to 31. Nothing about the original seven changed.
  • Skewed data defeats it. Six incomes of 30,000, 32,000, 35,000, 36,000, 38,000 and 250,000 have a mean of 70,166.67, which is higher than five of the six values, and a standard deviation of 88,146.28 — larger than the mean itself. The median of 35,500 and a set of percentiles describe that data honestly; the mean and standard deviation do not.
  • The 68–95–99.7 percentages assume a bell shape. On skewed or bimodal data the bands still compute, but the shares inside them drift away from the published figures and should not be quoted.
  • It is not the margin of error. The standard error of the mean is s ÷ √n — for the seven exam marks, 3.4157 ÷ √7 = 1.2910 — and it shrinks as data accumulate, while the standard deviation converges to the true spread and stays there.
  • Numbers with thousands separators are read as separate values. Entering 1,000, 2,000, 3,000 produces n = 6 and a mean of 1, because each comma splits a number in two. Strip the separators before entering data — this returns a confident wrong answer rather than an error.
  • Anything that is not a number rejects the whole list. Currency symbols, percent signs and semicolon separators all return "Enter at least two numbers, separated by commas" rather than skipping the offending entry.
  • The list must hold at least 2 values and no more than 500. One value has no spread to measure and 501 returns "Up to 500 values".
  • Output is rounded to four decimal places, so data an order of magnitude below that display as zero. The set 0.00001, 0.00002, 0.00003 has a genuine standard deviation, but the panel shows a mean of 0 and s = 0. Rescale such data — work in micrograms rather than grams — before calculating.

None of this makes the measure fragile; it makes it specific. Standard deviation answers one question precisely — how far from the mean does a typical value sit — and the failures above are all cases where that question was the wrong one to ask.

Frequently Asked Questions

What is the standard deviation formula?

s = √[ Σ(x − mean)² ÷ (n − 1) ] for a sample, and σ = √[ Σ(x − mean)² ÷ n ] for a population. Both subtract the mean from every value, square the differences and add them; only the divisor changes.

How do I calculate standard deviation step by step?

For 2, 4, 4, 4, 5, 5, 7, 9: the mean is 40 ÷ 8 = 5; the squared deviations are 9, 1, 1, 1, 0, 0, 4, 16, which total 32; dividing by n − 1 gives 32 ÷ 7 = 4.5714 and the square root is s = 2.1381. Dividing by n instead gives 32 ÷ 8 = 4 and σ = 2.

Should I use the sample or the population standard deviation?

Sample (÷ n − 1) whenever your numbers stand in for something larger — surveys, experiments, measurements, anything feeding a t-test or confidence interval. Population (÷ n) only when the list is genuinely complete. When unsure, use the sample figure; it is the larger of the two and the default in every statistics package.

Why do you divide by n − 1 instead of n?

Because the deviations are measured from the sample's own mean, which sits closer to the data than the true mean does, making the sum of squares too small. Dividing by n − 1 corrects the bias. The effect is 22.47% at n = 3, 5.41% at n = 10 and 0.50% at n = 100, so it matters on small data sets and disappears on large ones.

What is the difference between variance and standard deviation?

Variance is the average squared deviation and carries squared units; standard deviation is its square root, back in the units of the data. For 2, 4, 4, 4, 5, 5, 7, 9 the sample variance is 4.5714 and the sample standard deviation is 2.1381. This calculator prints both, in both the sample and population forms.

What counts as a high standard deviation?

Compare it to the mean. Five lab weighings averaging 10 g with s = 0.1581 give a ratio of 1.58%, which is precise; the default data set averaging 5 with s = 2.1381 gives 42.76%, which is very wide. There is no universal threshold, only the ratio and the context.

What exactly does the 68-95-99.7 rule say?

For normally distributed data, 68.27% of values fall within 1 standard deviation of the mean, 95.45% within 2 and 99.73% within 3. The often-quoted 95% figure actually sits at 1.96 standard deviations, not 2. On skewed or small data sets these shares drift and should not be relied on.

Can the standard deviation be zero or negative?

Zero, yes: entering 5, 5, 5, 5, 5 returns 0, because there is no spread. Negative, never — it is the square root of a sum of squares divided by a positive count. A negative answer by hand means a step was reversed, usually subtracting after squaring.

How many values can I enter, and how do I separate them?

Between 2 and 500 values, separated by commas or spaces. Do not use thousands separators: 1,000, 2,000, 3,000 is read as six values (1, 0, 2, 0, 3, 0) and returns a mean of 1 with no warning.

Sources & References

  1. [1] Weisstein, E.W. Standard Deviation — Wolfram MathWorld
  2. [2] Weisstein, E.W. Bessel's Correction — Wolfram MathWorld
  3. [3] NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.6 — Measures of Scale — National Institute of Standards and Technology
  4. [4] NIST/SEMATECH e-Handbook of Statistical Methods §1.3.6.7.1 — Cumulative Distribution Function of the Standard Normal Distribution — National Institute of Standards and Technology

Methodology. This calculator uses standard, peer-reviewed mathematical formulas. It is reviewed and maintained by the Vast Calculators editorial team.

Last updated ·

Results are estimates for general use; verify critical figures independently.

What to Work Out Next

See all Math Calculators