Standard Deviation Calculator

Calculate standard deviation, variance, and other statistics for a data set

About This Tool

What this calculator does

The Standard Deviation Calculator takes a comma-separated list of numbers and returns four statistics at once: the mean, the variance, the standard deviation, and the count of values used. It supports both the population and sample formulas so you can match whatever your homework, lab report, quality-control sheet, or dataset asks for. Everything is shown to four decimal places and the result updates as you type. There is no calculate button.

If you only need the mean, median, or mode, the Mean/Median/Mode Calculator linked at the bottom of the page is the simpler tool. If you need to know how likely a result is, the Probability Calculator is also linked. This tool is specifically about how spread out a set of numbers is.

Who actually needs it

Standard deviation is one of those numbers that shows up in a surprising number of small jobs:

  • Students. Statistics homework, AP Stats, intro research methods. The sample vs. population distinction is usually the entire point of the assignment.
  • Lab work. Reporting measurement error on repeated readings, or computing the standard deviation of triplicate samples for a methods section.
  • Quality control on a shop floor. Checking whether a batch of parts is drifting in size, weight, or torque.
  • Finance and investing. Volatility of returns is just standard deviation of a return series.
  • Sports and fitness. Consistency of split times, lift weights, free-throw percentages.
  • Survey and form data. When you want to summarize a set of ratings as "average around 7 with a spread of about 1.5."

If the question you are answering is "are these numbers tightly clustered or all over the place?" — this is the right tool.

How to use it

Type your numbers into the Values (comma-separated) field, separated by commas. The placeholder text 10, 20, 30, 40, 50 is a working example. Spaces around the commas are fine. Negative numbers and decimals work — -3.5, 2, 7.25 is a perfectly valid input.

Set the Type dropdown to either Population or Sample. The dropdown defaults to whichever you last selected; the first time the page loads it shows Population as the first option. Pick Sample if your numbers are a subset meant to estimate something about a bigger group; pick Population if your numbers are the entire group you care about. The FAQ below walks through the difference if you are not sure.

The result card then shows:

  • Mean — the arithmetic average of your numbers.
  • Variance — the average squared distance from the mean (using whichever divisor Type you chose).
  • Standard Deviation — the square root of variance, in the same units as your numbers.
  • Count — how many valid numbers were actually parsed from your input.

If you only enter one number, or only entries that don't parse as numbers, the result card stays hidden. You need at least two valid numbers before anything appears.

How it works, in plain English

The math is the same routine every introductory statistics course teaches, done step by step:

  1. Split the text into numbers. Your input is split on commas, each piece is trimmed of spaces, and parsed as a float. Anything that doesn't parse as a number is silently dropped. So 10, twenty, 30 becomes [10, 30] and the calculator reports a count of 2 rather than throwing an error.
  2. Compute the mean. Sum the numbers and divide by the count.
  3. Compute the sum of squared differences. For each value, subtract the mean, square the result, and add them all up.
  4. Divide by the right number to get variance. If you chose Population, divide by n (the count). If you chose Sample, divide by n − 1. This single choice is the only thing the Type dropdown changes.
  5. Take the square root. The square root of variance is the standard deviation, in the original units.

The output is rounded to 4 decimal places for display. The underlying calculation uses full floating-point precision.

A worked example

Take the list 10, 20, 30, 40, 50.

  • The mean is (10 + 20 + 30 + 40 + 50) / 5 = 30.
  • The deviations from the mean are −20, −10, 0, 10, 20.
  • Squared, those are 400, 100, 0, 100, 400, summing to 1000.

If you pick Population, variance is 1000 / 5 = 200 and standard deviation is √200 ≈ 14.1421. If you pick Sample, variance is 1000 / 4 = 250 and standard deviation is √250 ≈ 15.8114. Those are exactly the figures you will see in the result card (rounded to four decimals).

That gap between the two answers — about 14.14 vs. about 15.81 — is bigger when you only have five points. With 50 points it shrinks; with 500 it is barely visible.

Sample vs. Population, the short version

This is the only choice that changes the answer, so it is worth getting right.

  • Pick Population when your numbers are the entire group. "The grades of all 28 students in my class, and I only care about this class" is a population.
  • Pick Sample when your numbers are a slice meant to estimate something larger. "30 customers I surveyed to learn about all customers" is a sample.

Most real-world data is a sample, which is why intro statistics courses default to dividing by n − 1. Spreadsheet functions are split on this: in Excel and Google Sheets, STDEV.S is sample (divides by n − 1) and STDEV.P is population (divides by n). If you have been using STDEV with no suffix in older Excel files, that is the sample formula too.

If you cannot decide and the data isn't obviously the whole population, go with Sample. You will rarely be marked wrong for being slightly more conservative about spread.

Common pitfalls

  • Spaces, semicolons, or tabs as separators. Only commas count as separators here. 1 2 3 with spaces is read as one big chunk that doesn't parse, so the result card will be empty.
  • Trailing commas or a stray letter. Harmless. The trailing empty piece doesn't parse as a number and is dropped. The Count tells you how many values were actually used, so check it if the answer looks off.
  • Mixing units. The calculator has no idea what your numbers represent. If half your list is in inches and half in centimeters, the standard deviation will be technically correct and practically meaningless.
  • Choosing the wrong Type. The two answers can differ a lot on small lists. If you are reporting a result for a class, match the formula your instructor specified.
  • Tiny samples. A standard deviation from three numbers is barely a hint. The formula will compute it, but don't put too much weight on it.
  • Outliers. One stray value can dominate the standard deviation because the differences are squared. If your data has obvious typos or extreme one-offs, fix those first or consider a different summary like the interquartile range.

What the standard deviation actually tells you

Standard deviation is the typical distance between a value in your list and the mean of the list. Small means tightly clustered; big means spread out; zero means every value is identical.

Because it is in the same units as the original data, you can read it directly. Test scores with a mean of 75 and a standard deviation of 4 means most students scored somewhere in the high 60s to low 80s. Daily returns of an investment averaging 0.05% with a standard deviation of 1.2% means most days move within roughly a percent or so of the average. Production parts averaging 50.0 mm with a standard deviation of 0.02 mm are very tightly toleranced.

For data that is roughly bell-shaped (the "normal" or Gaussian distribution), the rough rule of thumb is that about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. That rule is a guideline, not a law — skewed or bimodal data breaks it.

When NOT to use this

  • Categorical data. Standard deviation only makes sense for numbers you can do arithmetic on. A list of customer satisfaction ratings labeled 1–5 is borderline; a list of survey answers like red, blue, green is meaningless here.
  • Heavily skewed data. Income, web-session length, and disaster losses have long right tails. The mean and standard deviation can be misleading because a few enormous values pull both upward. The median and the interquartile range are usually more honest summaries.
  • You actually want the median or mode. Use the Mean/Median/Mode Calculator on the related-tools list.
  • You need confidence intervals or hypothesis tests. This calculator stops at descriptive statistics. It does not compute z, t, p, or any margin of error.
  • Time-series with a trend. Standard deviation of a steadily rising series mostly captures the trend, not the noise. You probably want to detrend first.

Adjacent concepts worth knowing

  • Variance. The square of the standard deviation. Same information, different units. It is convenient for some equations (like adding variances of independent variables) but harder to read.
  • Coefficient of variation. Standard deviation divided by the mean, sometimes shown as a percent. Useful when you want to compare spread across two datasets with very different scales.
  • Range. Just the max minus the min. Quick but extremely sensitive to outliers.
  • Interquartile range (IQR). The spread of the middle 50% of the data. More robust than standard deviation for skewed datasets.
  • Standard error of the mean. The standard deviation of a sample divided by the square root of the sample size. It estimates how much the sample mean would wobble if you repeated the experiment.
  • Z-score. A single value's distance from the mean, expressed in standard deviations. A z of 2 means "two standard deviations above average."

What to do if the answer looks wrong

Check three things, in this order:

  1. The Count. If it says 4 and you typed 5 numbers, one of them did not parse — usually a stray letter, missing comma, or doubled comma. Find and fix it.
  2. The Type. If your textbook's answer is a bit higher or lower than yours, you probably picked the wrong one. Sample is the larger of the two for the same data.
  3. The Mean. If the mean itself looks off, you almost certainly have a typo in the input. Standard deviation can't be right if the mean isn't.

Past those, cross-check with a spreadsheet: =STDEV.S(A1:A10) should match the Sample result and =STDEV.P(A1:A10) should match the Population result, both to within rounding.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

Should I choose Population or Sample?
Choose Population when your list contains every member of the group you care about — for example, the test scores of all 28 students in one class when you only care about that class. Choose Sample when your numbers are a subset used to estimate something about a larger group, like 30 survey responses meant to represent a whole city. When in doubt in a statistics course, Sample (dividing by n − 1) is the safer default, because real-world data is almost always a sample.
Why does Sample give a slightly bigger result than Population?
Sample divides by n − 1 instead of n, which is a smaller divisor, so the variance and standard deviation come out a bit larger. This is Bessel's correction: a sample tends to underestimate the true spread of the full population, and dividing by n − 1 compensates for that bias. The gap between the two results shrinks as your dataset grows.
What does the standard deviation actually tell me?
It's the typical distance of a value from the mean. A small standard deviation means the numbers cluster tightly around the average; a large one means they're spread out; zero means every value is identical. Because it's in the same units as your data, you can read it directly — for example, scores averaged 30 with a standard deviation of about 14 means most scores were in the mid-teens to mid-forties.
What's the difference between variance and standard deviation?
Variance is the average of the squared differences from the mean, so it's in squared units (points squared, dollars squared, and so on), which is awkward to interpret. Standard deviation is the square root of variance, putting it back into the original units. They carry the same information; standard deviation is just easier to read. This calculator shows both so you can use whichever a formula or report asks for.
Why do I need at least two numbers?
With a single value there's no spread to measure, and for the sample formula the n − 1 divisor would be 0, which is undefined. The tool requires two or more valid numbers before it shows a result, so the output is always meaningful. If you enter one number — or only entries that don't parse as numbers — the result card stays hidden.
Does the order of my numbers matter? And what about extra spaces or stray text?
Order doesn't matter. Mean, variance, and standard deviation depend only on the set of values, so 5, 1, 3 and 3, 5, 1 give the same result. Spaces around numbers are trimmed automatically, and any entry that isn't a valid number is quietly ignored rather than causing an error. Check the Count value in the result card if you suspect something got dropped.
How do I match Excel's STDEV functions?
In Excel and Google Sheets, STDEV.S divides by n − 1 (matches the Sample option here) and STDEV.P divides by n (matches the Population option). The older STDEV function with no suffix is the sample formula. Results should match this calculator to within display rounding.
Can I paste a column from a spreadsheet?
Only if you convert it to comma-separated values first. The input field only treats commas as separators, so a column copied with line breaks or tabs won't parse correctly. A quick fix is to paste it into a single cell with a formula like =TEXTJOIN(", ", TRUE, A1:A20) and copy the result, or do a find-and-replace from newlines to commas.
Why is my standard deviation so much bigger than I expected?
Almost always an outlier. Standard deviation squares the differences from the mean, so a single value far from the rest has an outsized effect. Look for typos like a misplaced decimal or an extra digit. If the outlier is real, consider whether the mean and standard deviation are even the right summary — for skewed data, the median and interquartile range are often more honest.
Does this work for negative numbers and decimals?
Yes. The parser accepts any value JavaScript's parseFloat can read, which includes negatives like -3.5 and decimals like 7.25. The math doesn't care about sign — it squares the differences from the mean, so negatives can't make the variance or standard deviation negative.