Standard Deviation Calculator

Share:
Mathematics

Standard Deviation Calculator

Mean, SD, variance, quartiles

By Checked against sources by Last reviewed MATH MEAN STATISTICS VARIANCE
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Standard Deviation Calculator

How commas are read: if your paste also uses newlines, tabs, spaces or semicolons, a comma in 1,234 shape (exactly three digits after it) is treated as a thousands separator — so 1,234 / 2,500 / 1,750 on three lines is 3 values, not 6. If a comma is the only delimiter in the box, every comma splits, so 1,2,3 is 3 values. Spaces always split, so 1 234 is two values — put one number per line if your values carry separators.

Sample Std Deviation (s)
—
divisor n − 1 · a sample from something larger
Excel STDEV.S · Python statistics.stdev · NumPy np.std(x, ddof=1)
Population Std Deviation (σ)
—
divisor n · the entire population
Excel STDEV.P · Python statistics.pstdev · NumPy np.std(x), its default

📈 Central tendency + spread

Count (n)
—
Sum
—
Mean
—
Median
—

🎯 Mode + range

Mode
—
Min
—
Max
—
Range (max−min)
—

📐 Variance + coefficient of variation

Variance sample (s²)
—
Variance pop (σ²)
—
CV (s / x̄)
—
Std error (s / √n)
—

📊 Quartiles + IQR

Q1 (25%)
—
Q3 (75%)
—
IQR (Q3−Q1)
—
Past 1.5 × IQR
—

🔔 How your data sits around its mean

BandYour valuesIf normalAny shape
—

"If normal" is the bell-curve share. "Any shape" is Chebyshev's minimum, which holds for every distribution. Your values far from the middle column mean the 68-95-99.7 rule does not describe this data.

Paste numbers separated by commas, spaces, or newlines
Advertisement
After results · AD-W1Responsive · Post-tool — peak engagement

How to use the Standard Deviation Calculator

Paste your dataset

Type or paste numbers separated by any combination of commas, spaces, tabs, or newlines. The parser is flexible: 85, 92, 78 works; 85 92 78 works; one number per line works; pasting a column from Excel works (newlines are treated as separators). Currency signs and a trailing % are ignored. Anything that is not a number, such as a header or a date, is skipped, and the line under the box lists what was skipped so a smaller n is never a surprise.

How commas are disambiguated. A comma is genuinely ambiguous: 1,234 may mean one value (1234) or two (1 and 234). The rule this tool applies, stated plainly: (a) if the paste contains any other delimiter — newline, tab, space or semicolon — then a comma sitting between digits with exactly three digits after it is a thousands separator and is removed, while every other comma still splits. So a spreadsheet column of 1,234 / 2,500 / 1,750 parses as 3 values, not 6. (b) If the comma is the only delimiter in the box, every comma splits — 1,2,3 is 3 values, and so is the CSV row 100,200,300. The trade-off in (b): a lone 1,234,567 with nothing else in the box parses as 3 values, because collapsing an entire comma-only paste into one number is never what a dataset paste means. Put one number per line whenever your values carry thousands separators. Note that spaces always split, so 1 234 is two values (1 and 234) — a space is never read as a thousands separator.

Read the headline: sample (s) vs population (σ) std deviation

The two boxes at the top show the sample standard deviation s (divisor n−1, Bessel's correction) and the population standard deviation σ (divisor n). The symbols are not interchangeable: s is a statistic estimated from your data, σ is a parameter of the whole population. Use SAMPLE when your data is a sample drawn from a larger population (e.g. customer satisfaction surveys, product measurements). Use POPULATION only when you have ALL the data (e.g. every employee at a company). Getting a different answer from your software? The two big defaults disagree: Excel's STDEV.S and Python's statistics.stdev divide by n − 1, while NumPy's np.std divides by n unless you pass ddof=1.

Because s is an estimate, do not feed it into a z-score calculator as though it were a known σ — at small n that produces a number which is not a true z-score. If what you actually want is the precision of the mean, use the standard error calculator (SE = s / √n), which explains the SD-vs-SE distinction in full.

Check central tendency + spread

Mean = average. Median = middle value (robust to outliers — better than mean for skewed data). Mode = most frequent value (useful for categorical / discrete data). Min, max, range give the spread of the data. The IQR (interquartile range = Q3 − Q1) is the "middle 50%" spread — robust to outliers, often preferred over standard deviation when data is skewed or has outliers. Quartiles here use linear interpolation, the method of Excel's QUARTILE.INC and R's default (type 7). Other packages use other methods, so Q1 and Q3 can differ slightly, especially on small datasets.

Use coefficient of variation to compare different-scale datasets

CV = (s / x̄) × 100% — this tool computes it from the SAMPLE standard deviation and the sample mean. It normalises spread relative to the mean, allowing comparison between datasets whose units are not comparable at all: adult heights in cm (CV around 5%) against, say, monthly sales in dollars. A direct SD comparison between those two is meaningless; a CV comparison is not. What counts as high depends on the field, so treat 30%, where the advisory speaks up, as a prompt to look rather than a standard. One caveat: CV needs a mean that is positive and on a ratio scale with a meaningful zero. This tool shows n/a if any value is negative. Do not compute it for temperatures in Celsius, and treat it with suspicion for anything whose mean sits near zero — such as stock returns, where a near-zero denominator makes CV both huge and unstable.

Advertisement
After how-to · AD-W2Responsive

Standard deviation — why n−1 vs n changes everything

Standard deviation measures how spread out a dataset is around its mean. A low std dev means values cluster tightly; a high std dev means they're scattered widely. The math is straightforward: compute the mean, subtract it from each value (the "deviation"), square those deviations (to make them positive), average the squared deviations (that's the variance), then take the square root (that's the standard deviation, in the same units as the original data). The subtlety is in that "average the squared deviations" step — do you divide by n (number of data points) or by n−1? The answer determines whether you're computing population SD or sample SD, and they differ in important ways.

Why Bessel's correction matters

When your data is a SAMPLE from a larger population, dividing the sum of squared deviations by n produces a BIASED estimator — it systematically underestimates the population variance. The correction, conventionally called Bessel's correction, is to divide by n−1 instead. This counter-intuitive adjustment compensates for the fact that the sample mean is itself estimated from the data, so the squared deviations are computed against a slightly "shifted" reference. The unbiased sample variance is s² = Σ(x − x̄)² / (n−1), and the sample standard deviation is s = √s². One subtlety: only the variance is unbiased. Taking the square root leaves s slightly low as an estimate of σ, by a factor tabulated as c4 in quality-control texts. The population formula (divide by n) is correct only when your dataset represents the ENTIRE population — every employee at a 50-person company, every patient who came through a clinic last year, every transaction processed by a small fintech.

Sample standard deviation divides by n−1. Population standard deviation divides by n. The difference is Bessel's correction, and it matters most at small n.

The 68-95-99.7 rule

For normally-distributed data (the bell curve), the standard deviation has a precise interpretation: 68% of values fall within ±1 SD of the mean; 95% fall within ±2 SD; 99.7% fall within ±3 SD. This is called the "empirical rule" or "68-95-99.7 rule" and is the foundation of most inferential statistics. A test score exactly 2 SD above the mean puts you in the top 2.3% (the upper tail beyond z = 2 is 2.275%; the familiar 2.5% figure belongs to z = 1.96, not z = 2). A manufacturing measurement 3 SD off-target in either direction is about 2.7 per thousand. That logic is what "6 Sigma" quality programs (Motorola, GE) build on: they place the specification limit 6 SD from the process mean. Note that the famous 3.4-defects-per-million figure is NOT the 6σ tail — it is the tail beyond 4.5σ, because the methodology assumes the process mean drifts up to 1.5σ over the long run. An un-shifted, two-sided 6σ tail is roughly 2 defects per billion, about 1,700 times smaller. The rule only works for normal distributions; skewed data needs different rules (e.g. Chebyshev's inequality, which gives looser bounds for any distribution).

How this calculator gets the number

The obvious way to compute variance, summing the squares and subtracting the square of the sum, takes the difference of two huge, nearly equal numbers, so on values that differ only in their last few digits most of the digits cancel. This tool uses Welford's 1962 one-pass update instead, which works with the distance from a running mean. A run of identical values therefore gives a variance of exactly 0, and very large values close together keep their spread.

Frequently Asked Questions

  • SAMPLE (divide by n−1) when your data is a sample drawn from a larger population. Use this for: A/B test results, customer surveys, product measurements, lab experiments, market research, anything where you took a subset. POPULATION (divide by n) only when you have literally ALL the data — every employee at a 50-person company, all transactions for a specific day, complete census data. When unsure, use sample. The difference matters most for small n: the two differ by a factor of √(n/(n−1)), so at n=10 the sample SD is about 5.4% larger than the population SD, and at n=1000 it is about 0.05% larger.

  • When you compute the sample mean from your data, you "use up" one degree of freedom — the sample mean is constrained to fit your data perfectly. So when you measure deviations from THAT sample mean, you systematically underestimate the spread relative to the true population mean. Dividing by n−1 instead of n compensates for this lost degree of freedom, producing an unbiased estimator of population variance. The proof is in any first-year statistics textbook (Casella & Berger, Wasserman). The edge case makes the logic plain: with n=1 the sample SD is undefined (n−1=0), because one data point says nothing about the spread of whatever it was drawn from. If that one value truly is the whole population, σ is 0, and that is what this tool shows.

  • When your data is skewed or has outliers. Mean is sensitive to extreme values — one billionaire in a town shifts the "average income" dramatically without changing what most residents actually earn. Median (middle value) is robust to outliers and better represents "typical". Almost always use median for: income, house prices, response times, web page load times, salary data. Use mean for: test scores, sensor measurements, scientific observations where outliers indicate real signal. Report BOTH when in doubt — the difference between mean and median is itself diagnostic of skew (mean > median = right skew; mean < median = left skew).

  • For normally-distributed data: ~68% of values fall within ±1 SD of the mean, ~95% within ±2 SD, ~99.7% within ±3 SD. This is the "empirical rule" or "three-sigma rule" and is foundational to inferential statistics. Example: if test scores have mean 75 and SD 10, then ~68% scored between 65-85, ~95% scored between 55-95, and ~99.7% scored between 45-105. Anything outside ±3 SD is "extreme" — only 0.3% of normal data points fall this far out. The rule ONLY works for normal distributions; for skewed or heavy-tailed distributions, use Chebyshev's inequality instead (looser but works for any distribution: at least 75% within ±2 SD, at least 89% within ±3 SD).

  • Variance = average of squared deviations from the mean. Standard deviation = square root of variance. Variance is in squared units (e.g. if data is meters, variance is m²) — mathematically convenient for theory but hard to interpret physically. Standard deviation is in original units (meters) — easier to interpret intuitively. In practice: report SD when communicating to humans; use variance when doing further math (e.g. variance is additive for independent random variables; SD is not).

  • When your data is skewed or has outliers. SD assumes a roughly symmetric distribution; with heavy outliers, SD gets inflated and stops representing typical spread. IQR (Q3 − Q1) is the spread of the middle 50% — it ignores the top 25% and bottom 25%, so outliers don't affect it. IQR is the basis for boxplot whiskers (typically 1.5×IQR beyond Q1/Q3). Common usage: SD for normally-distributed scientific data; IQR for income, response times, real-world skewed data. Many descriptive statistics reports include both: mean ± SD for symmetric data, median (IQR) for skewed.

  • CV = (standard deviation / mean) × 100%. It normalises spread relative to the magnitude of the mean, allowing comparison between datasets with very different scales. Example: adult heights (CV around 5%) versus monthly sales figures — a direct SD comparison is meaningless because one is in cm and the other in dollars, but the CVs are comparable. CV under 15% = low variability (precise / consistent). 15-30% = moderate. 30%+ = high — investigate. Those are the same bands used by the how-to section and the on-page advisory. CV requires the mean to be positive and on a ratio scale with a meaningful zero: don't compute CV for temperatures in Celsius (0°C is arbitrary; use Kelvin if you must), and don't trust it when the mean sits near zero — stock returns are the classic trap, because a near-zero denominator makes CV enormous and unstable rather than informative.

  • There is no fixed limit: the calculation is a single pass plus one sort, and a million values took about 0.2 seconds in our test on a desktop, so the text box itself is usually the slow part. For multi-million-row datasets, use desktop statistical software (R, Python+pandas, JMP, Stata, SPSS). Paste a column from Excel / Google Sheets — newlines and tabs are treated as separators automatically, and because those delimiters are present, thousands separators inside values (1,234) are stripped rather than split. Always check the "Read N values" line against the number of rows you pasted.

  • No. The numbers you paste are processed in your browser by JavaScript and are never sent to our server. The page itself still loads what any page here loads, such as ads and analytics if you allow them, but none of it is given what you type.

  • The calculator reports all values that share the highest frequency (e.g. "5, 12 (×3)" if both occur 3 times; past four it shows the first four and an ellipsis). If every value appears exactly once, "No mode" is shown, because a mode needs a value to repeat. Tied repeats in a small or rounded dataset usually mean nothing. Two real peaks in a histogram are different, and can mean the data mixes two groups worth analysing separately.

Method & sources

How it computes

Sample standard deviation s = √(Σ(x − x̄)² / (n − 1)); population σ divides by n. Both shown; s first. The sum of squares is computed by Welford's one-pass update, so nearly equal values keep their precision. Quartiles are linear interpolation (type 7, as Excel QUARTILE.INC). Median and IQR do not move with a single outlier; outliers are flagged at the NIST 1.5 × IQR fences.

What this tool implements

  • NIST/SEMATECH e-Handbook §1.3.5.6: the sample variance divides by n − 1 (Bessel's correction) so that it is an unbiased estimator of the population variance. §6.3.2: s itself is not an unbiased estimator of σ, which the page now says.
  • Standard deviation is in the units of the data; variance is in their square, which is why the former is quoted.
  • Pinned to vendor examples: Microsoft's STDEV.S and STDEV.P breaking-strength table (27.46391572, 26.05455814), QUARTILE.INC (3.5), and Python's stdev and pstdev examples.
  • Corrected 2026-11-02 (arithmetic): mean-then-square is replaced by Welford's update, and identical values now give exactly 0. Math.min(...values) threw a RangeError on a paste of about 125,000 values while the FAQ promised large pastes worked. σ of one value is 0, as STDEV.P gives, not blank.
  • Corrected 2026-11-02 (display): four-place rounding printed an SD of 0.00003 as 0.00 and a minimum of 0.125 as 0.13. Small values now keep six significant digits.
  • Corrected 2026-11-02 (parsing): parseFloat read 12abc as 12 and the date 2024-01-05 as 2024, and $1,200 was dropped outright. Tokens are now strict, currency and % are understood, and everything skipped is listed under the box. CV is refused when any value is negative.
  • Corrected 2026-11-02 (prose): men's and women's heights were said to show two modes near 165 and 180 cm, with no source, and the claim is gone. "95%+ of the time", the 15/30% CV bands as a standard, large-cap volatility ranges and the ASEAN paragraph are cut. The privacy FAQ promised zero outbound requests on a page that loads ads and analytics; it now says what is true.

Sources

Show 4 more

What can make this go out of date

  • None at runtime.
Advertisement
Pre-footer · AD-W3 728 × 90