📊

Standard Deviation Calculator

Calculate mean, median, variance, standard deviation, quartiles, and IQR for any dataset, sample or population.

MATH

Calculate mean, median, mode, variance, standard deviation, quartiles, and IQR for any dataset.

Accepts comma-separated, line-separated, or frequency-table input. Toggle Sample (n-1) vs Population (n). Outputs full descriptive statistics, formula card showing the exact divisor used, and an inline histogram with mean line and one-sigma band.

Disclaimer: Skewed or bimodal datasets are better summarized by median and IQR than by mean and standard deviation. Always sanity-check inputs before drawing conclusions.
Loading calculator…
Advertisement

Calculator information

How to use this calculator

  1. Choose an input mode: CSV (comma-separated numbers), one number per line, or a frequency table (value and frequency).
  2. Paste or type your data. Example CSV: 10, 12, 15, 18, 20, 22, 25.
  3. Select the dataset type: Sample (n-1, Bessel's correction) if the data is a sample from a larger population, or Population (n) if it covers the entire population.
  4. Click Calculate to obtain the mean, median, mode, variance, standard deviation, Q1/Q3 quartiles, and IQR.
  5. Inspect the histogram to see the data distribution with a vertical line at the mean and a 1-sigma band around it.
  6. Tips: do not mix units within a single dataset (kg with grams); only drop extreme outliers when there is a methodological basis to do so.

Sample and Population Standard Deviation

s = sqrt( Sigma(x_i - x_bar)^2 / (n - 1) ) ; sigma = sqrt( Sigma(x_i - mu)^2 / N )
  • x_i = the i-th data value
  • x_bar = sample mean; mu = population mean
  • n = sample size; N = population size
  • s = sample standard deviation (uses n-1 / Bessel's correction)
  • sigma = population standard deviation (uses N)

Variance is the square of the standard deviation. IQR = Q3 - Q1 and is more robust to outliers than the standard deviation.

Worked example: Standard deviation of 7 students' exam scores

Given:
  • Data: 70, 75, 80, 85, 90, 95, 100
  • Mode: Sample (n - 1)
Steps:
  1. Compute the mean: (70+75+80+85+90+95+100) / 7 = 595 / 7 = 85.
  2. Compute squared deviations: (-15)^2, (-10)^2, (-5)^2, 0^2, 5^2, 10^2, 15^2 = 225, 100, 25, 0, 25, 100, 225.
  3. Sum of squared deviations: 225+100+25+0+25+100+225 = 700.
  4. Sample variance: 700 / (7 - 1) = 700 / 6 = 116.67.
  5. Sample standard deviation: sqrt(116.67) = 10.80.

Result: Mean 85, variance 116.67, sample standard deviation approximately 10.80 points.

Frequently asked questions

When should I use n-1 versus n?
Use n-1 (Sample) when the data is a random sample from a larger population and you want an unbiased estimator of the population variance. Use n (Population) only when you truly have every member of the population, such as the grades of every student in one specific class that is the entire object of study. The default in inferential statistics is n-1.
What is the difference between standard deviation and variance?
Variance is the average of the squared deviations from the mean, while standard deviation is the square root of the variance. Standard deviation has the same units as the original data, making it easier to interpret, whereas variance is in squared units. Both measure the spread of the data.
Why is my standard deviation zero?
Standard deviation is zero only when all data points are identical, meaning there is no spread at all. If your calculator returns zero despite non-identical data, check for typos, truncated data, or an incorrect decimal separator during parsing.
Do outliers affect the standard deviation?
Yes, significantly, because the formula squares the differences from the mean. A single extreme value can double the standard deviation. For datasets with strong outliers, use the IQR or median absolute deviation (MAD) as more robust measures of spread.
What does the 1-sigma band on the histogram mean?
The 1-sigma band marks the interval of the mean plus or minus one standard deviation. For a normal distribution, about 68 percent of the data falls within this band, 95 percent within 2-sigma, and 99.7 percent within 3-sigma (the empirical 68-95-99.7 rule). The rule holds strictly only for near-normal distributions.

Last updated: May 11, 2026

Sponsored