Standard Deviation Calculator
Calculate mean, median, mode, variance, standard deviation, quartiles, IQR, and detect outliers. Enter numbers separated by commas, spaces, or newlines. All calculations happen locally — nothing leaves your browser.
What is standard deviation? Standard deviation measures how far a set of numbers typically sits from its own mean. It is the square root of the variance: subtract the mean from each value, square the differences, average them, and take the square root. Because of that square root it is expressed in the same units as the data, so a set of exam marks with a mean of 70 and a standard deviation of 8 has most results roughly 8 marks either side of 70.
How to Use the Standard Deviation Calculator
- Paste your data — Numbers can be separated by commas, spaces or newlines, so a column copied straight out of a spreadsheet works as-is. Load Sample Data fills the box with an example set if you just want to see the output format.
- Press Calculate Statistics — Everything is computed at once: both standard deviations, both variances, mean, median, mode, range, the quartiles and the interquartile range.
- Pick population or sample — Use the Population SD card when your numbers are the whole group you care about, and Sample SD when they are a sample standing in for a larger population. The sample figure is always slightly larger.
- Read the histogram — The bars show how the values are distributed. A single central hump means the mean and standard deviation describe the data well; two humps or a long tail mean they can mislead, and the median is the safer summary.
- Check the flagged outliers — Values more than 1.5 interquartile ranges beyond the first or third quartile are listed separately. Investigate them before deciding anything — an outlier can be a typing error or the single most interesting observation in the set.
- Export the results — Copy Statistics puts the summary on your clipboard as plain text and Download CSV saves it as a file you can attach to a report or reopen in a spreadsheet.
How Standard Deviation Is Calculated
Start with the mean, the sum of the values divided by how many there are. Then measure each value's distance from that mean. Those distances cannot simply be averaged, because the positive and negative ones cancel to zero by definition, so each is squared first. The average of the squared distances is the variance, and its square root is the standard deviation.
σ = √( Σ(xi − μ)² ÷ N )
That is the population form, used when your numbers are the entire group of interest — every machine on the line, every pupil in the class. When the numbers are instead a sample drawn from a larger population, dividing by N systematically underestimates the true spread, because the sample mean sits closer to its own data than the unknown population mean does. The fix is Bessel's correction: divide by n − 1 instead.
s = √( Σ(xi − x̄)² ÷ (n − 1) )
The gap between the two matters most for small sets. With ten values the sample figure is about 5% larger than the population figure; with a thousand it is a fraction of a percent. Both are shown so you never have to recompute after realising which one the assignment or report actually wanted.
Reading a Standard Deviation
For data that follows a normal, bell-shaped distribution, the standard deviation maps onto predictable proportions — the empirical rule:
| Range | Share of values | Roughly |
|---|---|---|
| Mean ± 1σ | 68.3% | About two thirds |
| Mean ± 2σ | 95.4% | All but 1 in 20 |
| Mean ± 3σ | 99.7% | All but 3 in 1,000 |
This only holds when the distribution really is approximately normal, which is why the histogram is worth a glance before quoting it. Skewed data, counts near zero and anything with a hard boundary break the rule badly. A distribution-free fallback is Chebyshev's inequality, which guarantees that at least 75% of any data set lies within two standard deviations of the mean and at least 89% within three — weaker bounds, but they hold no matter the shape.
To compare spread across different units or wildly different scales, divide by the mean to get the coefficient of variation. A standard deviation of 5 means something quite different around a mean of 20 than around a mean of 20,000.
Quartiles, IQR and Outliers
Quartiles split sorted data into four equal parts: Q1 is the value a quarter of the way through, Q3 three quarters of the way, and the median sits between them. The interquartile range is Q3 − Q1, the width of the middle half of the data. Unlike the standard deviation, it ignores the extremes entirely, which makes it the robust choice when a few unusual values would otherwise dominate.
Outliers are flagged with the standard Tukey fences:
outlier if x < Q1 − 1.5 × IQR or x > Q3 + 1.5 × IQR
Quartiles here are computed by linear interpolation between the closest ranks — the same inclusive method used by spreadsheet functions such as PERCENTILE.INC and by R's default quantile type. Other statistical packages use slightly different definitions, so a Q1 that differs in the second decimal place from another tool is usually a difference of convention rather than an error.
These figures describe the numbers you enter and nothing more. Standard deviation says how spread a set is, not whether a difference between two sets is meaningful — that needs a significance test and a clear question stated before the data was collected. Treat the output as descriptive statistics for informational use.
Frequently Asked Questions
Use population standard deviation when your data represents the entire group of interest. Use sample standard deviation when your data is a subset used to estimate the population. Sample SD uses n-1 in the denominator (Bessel's correction) to reduce bias.
This calculator uses the IQR method: any value below Q1 - 1.5×IQR or above Q3 + 1.5×IQR is considered an outlier. This is a common statistical rule of thumb, though other methods exist (z-scores, modified z-scores, etc.).
Variance is the average of squared differences from the mean. Standard deviation is simply the square root of variance, bringing the measure back to the original units of your data.
There is no universal threshold — it depends entirely on the units and the mean. A standard deviation of 5 is tiny for annual salaries and enormous for a body temperature reading. To compare across data sets, divide the standard deviation by the mean to get the coefficient of variation, which is unitless and can be compared directly.
No. Parsing, every statistic, the histogram and the CSV export are all produced in JavaScript on your device. Nothing is uploaded or stored on a server, which is why the page still works with the network off. The CSV is generated locally and saved straight to your downloads folder.
Because there is no single agreed definition of a quartile for a finite data set. This calculator interpolates linearly between the surrounding values, matching spreadsheet PERCENTILE.INC and R's default. Other packages exclude the median from each half or round to the nearest rank, which shifts Q1 and Q3 slightly on small samples. The median, mean and standard deviation are unaffected.
Not automatically. The 1.5 x IQR rule is a screening heuristic, not a verdict: in a genuinely long-tailed distribution it flags perfectly valid observations, and in a small set one legitimate extreme can drag the fences. Check whether the value is a recording error, a different measurement condition, or real. Removing real data because it is inconvenient biases every statistic that follows.
Almost always thousands separators. Commas are treated as separators between values, so 1,200 is read as two numbers, 1 and 200, which wrecks the mean and inflates the count. Currency symbols, percent signs and stray text are simply discarded, and a period is required as the decimal point. Strip the separators before pasting, then check the count shown beside the mean matches how many values you expected.
Use Cases
Grading a Class Test
A teacher pastes 28 marks to see whether a mean of 62 hides a tight cluster or two separate groups, and which scripts fall outside the outlier fences.
Reporting Repeat Measurements
A lab student runs a titration five times and quotes the mean plus the sample standard deviation as the uncertainty in the write-up.
Comparing Two Sets of Returns
Two funds with the same average monthly return look identical until the standard deviation shows one swings twice as widely as the other. Informational only, not investment advice.
Setting Process Control Limits
A production engineer takes a batch of part measurements and uses the mean plus and minus three standard deviations as the working limits for the shift chart.
Sanity-Checking a Data Export
Before charting a CSV column, an analyst pastes it here to catch a stray zero or a duplicated row, which show up immediately as flagged outliers or a skewed histogram.