📊

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.

Standard Deviation Calculator 2026

Compute standard deviation, variance, mean, median, mode, quartiles, and more from your dataset. Supports sample (n-1) and population (n), flexible input (comma, line, or frequency table).

σ = √( Σ(xᵢ - x̄)² / (n - 1) )
Compute standard deviation, variance, mean, median, mode, quartiles, and more from your dataset. Supports sample (n-1) and population (n), flexible input (comma, line, or frequency table).
Data Type
Use Sample if your data is drawn from a larger population (most common case).
Enter Your Data
Separate values with commas, spaces, tabs, semicolons, or newlines. Non-numeric tokens are skipped.
8 valid values
Mean (Average)
18
Median
18.5
Standard Deviation (σ)
5.2372
Variance (σ²)
27.4286
Full Statistics
Count (n)8
Sum144
Minimum10
Maximum23
Range13
Mode23 (×3)
Sum of Squared Deviations192
Coefficient of Variation29.0957%
Standard Error of Mean1.8516
Spread & Quartiles
Quartile 1 (Q1)15
Quartile 2 (Q2 / Median)18.5
Quartile 3 (Q3)23
IQR (Q3 - Q1)8
Formula Used
σ = √( Σ(xᵢ - x̄)² / (n - 1) )
x̄ = Σxᵢ / n
Variance = σ²
where n = 8, divisor = 7
Data Distribution
2241023μ=1840Histogram of values, with vertical lines marking the mean (blue) and ±1σ (orange).
How to Read These Results
Sample vs Population - which to pick?
Use Sample (n-1) when your data is a subset drawn from a larger population - this is by far the most common case. Use Population (n) only if your data covers the entire population being studied. The n-1 divisor is called "Bessel correction" and gives an unbiased estimate of the variance.
What does standard deviation tell you?
Standard deviation measures how spread out the values are from the mean. A small σ means data clusters tightly around the mean; a large σ means values are widely scattered. σ is in the same units as the original data.
The Empirical Rule (68-95-99.7)
For approximately normal distributions: ~68% of data falls within ±1σ of the mean, ~95% within ±2σ, and ~99.7% within ±3σ. This rule only applies when the data is roughly normally distributed.
When to use median instead of mean?
Use the median when your data is skewed or contains extreme outliers. The median is not influenced by extreme values, whereas the mean can be pulled toward outliers. Income data, for example, is typically reported with median.
This calculator is for educational use and quick analysis. For formal statistical analysis, use software like R, Python (NumPy/SciPy), SPSS, or consult a statistician.

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