Standard Deviation Calculator

Compute sample standard deviation ($s$), population standard deviation ($\sigma$), variance, mean, and standard error (SEM) with complete step-by-step squared deviation tables.

Input Numerical Dataset
Supports negative numbers, decimals, and positive integers.
Statistical Dispersion Analysis
Sample Standard Deviation (s)

6.2507

Uses Bessel’s correction denominator (n - 1) for unbiased sample variance

Count (n)

8

Total observations
Arithmetic Mean (x̄)

21.2500

Sum: 170.0000
Sample Variance (s²)

39.0714

SS: 273.5000
Statistical MeasureCalculated ValueMathematical Formula
Standard Error of Mean (SEM)2.2100SEM = s / √n
Sum of Squared Deviations (SS)273.5000SS = Σ(xᵢ - x̄)²
Data Range (Max - Min)18.00 (12.00 to 30.00)Range = Maximum - Minimum
Step-by-Step Deviation Breakdown
#Value (xᵢ)Deviation (xᵢ - x̄)Squared Deviation (xᵢ - x̄)²
112-9.250085.5625
215-6.250039.0625
318-3.250010.5625
420-1.25001.5625
522+0.75000.5625
625+3.750014.0625
728+6.750045.5625
830+8.750076.5625
Total Sum: 170.0000Mean: 21.2500Sum of Squares: 273.5000

Descriptive Statistics: The Foundations of Numerical Dispersion

In the discipline of statistics, summarizing a dataset requires two fundamental classes of parameters: measures of central tendency (such as the arithmetic mean, median, and mode) and measures of statistical dispersion (such as range, variance, and standard deviation). While central tendency locates the center or balance point of numerical observations, dispersion describes how tightly clustered or widely scattered those values are around that center.

Two distributions can possess identical arithmetic means while exhibiting radically different underlying structures. For example, consider two investment portfolios that both yield an average annual return of 8.0%. Portfolio A delivers annual returns of 7%, 8%, 9%, 8%, and 8% (predictable, low volatility). Portfolio B delivers annual returns of -35%, +55%, -10%, +40%, and 0% (wildly volatile, high risk). Without computing the standard deviation, an investor would erroneously perceive both assets as identical in performance.

Mathematical Formulations: Sample vs. Population Equations

The choice between sample and population formulas depends on whether your dataset comprises the complete universe of items (population census) or an observed subset drawn from that universe (sample study).

1. Population Standard Deviation (σ)
σ = √[ (1 / N) × Σ(xᵢ - μ)² ]
Population Variance (σ²) = (1 / N) × Σ(xᵢ - μ)²

Applied when every single member of the target population is measured. Examples include: test scores for all 24 students enrolled in a single private seminar, or manufacturing tolerances for 100% of ball bearings produced in an isolated batch. Here, N is total population size and μ is the true population mean.

2. Sample Standard Deviation (s)
s = √[ (1 / (n - 1)) × Σ(xᵢ - x̄)² ]
Sample Variance (s²) = (1 / (n - 1)) × Σ(xᵢ - x̄)²

Applied when the dataset represents a random sample taken from a larger, unobservable population. Examples include clinical drug trial cohorts, presidential election polling, or sampling 100 random microchips from an assembly line. Notice the denominator uses (n - 1), known as Bessel's correction.

Bessel’s Correction: Why We Divide by (n - 1) for Sample Variance

One of the most persistent questions in introductory statistics is: "Why do we divide by n - 1 instead of n when working with samples?"

When calculating the dispersion of a sample, the true population mean (μ) is unknown. Instead, statisticians must compute the sample mean (x̄) directly from the sample values: x̄ = Σxᵢ / n. By definition, the sample mean minimizes the sum of squared deviations for those specific numbers. In reality, the true population mean μ almost certainly differs slightly from x̄.

Because the sample data points are mathematically closer to their own sample mean (x̄) than they would be to the true population mean (μ), calculating deviations from x̄ introduces a systematic downward bias (the sum of squares is artificially smaller). If you divide this sum of squares by n, the resulting sample variance underestimates the true population variance by a factor of (n - 1) / n.

To correct for this bias and produce an unbiased estimator, we multiply by n / (n - 1):

Unbiased Variance s² = [ (1 / n) Σ(xᵢ - x̄)² ] × [ n / (n - 1) ] = [ 1 / (n - 1) ] Σ(xᵢ - x̄)²

As sample size n grows into thousands, the difference between dividing by n or (n - 1) becomes negligible (e.g., dividing by 1,000 vs 999). However, in small samples (e.g., n = 5 to 30), Bessel's correction is statistically critical to prevent severely underestimating risk and uncertainty.

Worked Mathematical Example: Step-by-Step Manual Calculation

To illustrate how the mathematical algorithm functions internally, let us calculate the sample standard deviation for a dataset of 5 exam scores: [10, 12, 14, 15, 19].

  1. Step 1: Compute the Arithmetic Mean (x̄):
    Sum Σx = 10 + 12 + 14 + 15 + 19 = 70
    Mean x̄ = 70 ÷ 5 = 14.0
  2. Step 2: Calculate Deviations from the Mean (xᵢ - x̄):
    10 - 14 = -4
    12 - 14 = -2
    14 - 14 = 0
    15 - 14 = +1
    19 - 14 = +5
    (Notice that the sum of un-squared deviations always equals zero: -4 + -2 + 0 + 1 + 5 = 0).
  3. Step 3: Square Each Deviation (xᵢ - x̄)²:
    (-4)² = 16
    (-2)² = 4
    (0)² = 0
    (+1)² = 1
    (+5)² = 25
  4. Step 4: Calculate Sum of Squared Deviations (SS):
    SS = 16 + 4 + 0 + 1 + 25 = 46.0
  5. Step 5: Compute Sample Variance (s²) using Bessel’s correction (n - 1 = 4):
    s² = 46.0 ÷ (5 - 1) = 46.0 ÷ 4 = 11.5
  6. Step 6: Take the Square Root to Find Sample Standard Deviation (s):
    s = √11.5 ≈ 3.3912

Result: The average test score is 14.0, with a sample standard deviation of 3.39 points.

The Empirical Rule (68–95–99.7) in Normal Distributions

When a continuous random variable is normally distributed (following Carl Friedrich Gauss's classical bell-shaped curve), standard deviation defines the exact statistical proportion of the population enclosed within specific standard deviations from the center:

Range from MeanTheoretical CoverageArea in Tails (Outliers)Real-World Example (IQ Scores: μ = 100, σ = 15)
μ ± 1σ68.27% of values31.73% beyondIQ between 85 and 115 (Normal average range)
μ ± 2σ95.45% of values4.55% beyondIQ between 70 and 130 (Encompasses 19 out of 20 people)
μ ± 3σ99.73% of values0.27% (1 in ~370)IQ between 55 and 145 (Extreme exceptional tails)
μ ± 6σ ("Six Sigma")99.9999998%3.4 defects per millionIndustrial manufacturing quality standard (Motorola / Toyota)

Standard Deviation vs. Standard Error of the Mean (SEM)

In scientific research papers and clinical medical trials, researchers frequently confuse or conflate Standard Deviation (SD) and Standard Error of the Mean (SEM). Understanding the distinction is vital:

Standard Deviation (SD)

Quantifies the variability between individual experimental subjects. If you measure the systolic blood pressure of 500 patients, the SD tells you how widely individual patient blood pressures vary across the clinic.

s = √[ Σ(xᵢ - x̄)² / (n - 1) ]
Standard Error of the Mean (SEM)

Quantifies the precision of your sample mean estimate. It answers: "If we repeated this experiment 100 times with different patient cohorts, how much would the average blood pressure fluctuate?"

SEM = s / √n

Practical Applications Across Industries

Financial Markets & Volatility

Standard deviation measures volatility. High-beta growth stocks have monthly standard deviations of 8% to 15%, while treasury bonds have standard deviations of under 1.5%. Options pricing (Black-Scholes model) directly relies on implied standard deviation (volatility σ).

Six Sigma Quality Control

In semiconductor fabrication and automotive machining, process capability indices (Cp and Cpk) measure whether component tolerances fit within ±3σ or ±6σ limits, guaranteeing fewer than 3.4 defect parts per million opportunities.

Academic Standardized Testing

Exams like the SAT, GRE, and MCAT scale raw scores onto standardized bell curves with set parameters (e.g., SAT Mean = 500 per section, SD = 100). This guarantees that a score of 700 represents exactly +2.0 standard deviations (98th percentile) across all testing years.

Frequently Asked Questions About Standard Deviation

Standard deviation is the preeminent statistical metric used to quantify the amount of variation or dispersion of a set of numerical data values. A low standard deviation indicates that data points cluster tightly around the arithmetic mean (indicating high precision, consistency, or predictability). Conversely, a high standard deviation indicates that values are widely spread across a broader numerical range (indicating high volatility, dispersion, or diversity). Unlike variance, standard deviation is expressed in the exact same physical units as the original data points, making it intuitive to interpret.

When calculating variance from a sample rather than the entire population, the sample mean (x̄) is automatically closer to the sample observations than the true unknown population mean (μ) would be. Consequently, calculating deviations from x̄ systematically underestimates the true population dispersion. Dividing by n produces a biased downward estimate. German mathematician Friedrich Bessel proved that dividing by (n - 1)—known as Bessel's correction—mathematically removes this downward bias, making the sample variance an unbiased estimator of true population variance.

In any dataset that follows a symmetric bell-shaped normal Gaussian distribution: 1) Approximately 68.27% of all data points fall within one standard deviation of the mean (μ ± 1σ); 2) Approximately 95.45% of all values fall within two standard deviations of the mean (μ ± 2σ); and 3) Approximately 99.73% of values fall within three standard deviations of the mean (μ ± 3σ). Values falling beyond three standard deviations are statistically considered rare outliers.

Standard deviation (SD) describes the natural biological or physical variability among individual data points within a single sample or population. Standard Error of the Mean (SEM = SD / √n), on the other hand, describes the precision of the sample mean itself as an estimate of the true population mean. As sample size (n) increases toward infinity, the standard deviation remains relatively constant (reflecting true population spread), whereas the SEM shrinks toward zero (reflecting increasing statistical confidence in the mean).

No. Standard deviation can never be negative. Because each deviation from the mean (xᵢ - x̄) is squared prior to summation, every squared deviation is mathematically greater than or equal to zero. Taking the principal square root of a non-negative number always produces a positive real number or zero. A standard deviation of zero occurs only in the singular scenario where every single number in the dataset is identical (e.g., [5, 5, 5, 5]).

In modern portfolio theory (MPT), standard deviation serves as the definitive proxy for investment risk and asset price volatility. A mutual fund or stock index with an annualized standard deviation of 25% exhibits wide price fluctuations, whereas a government bond fund with a 3% standard deviation offers price stability. Furthermore, standard deviation forms the denominator of the Sharpe Ratio: (Asset Return - Risk-Free Rate) ÷ Portfolio SD, which measures an investor's excess return generated per unit of total risk endured.

A Z-score (standard score) measures the exact number of standard deviations a specific raw data observation sits above or below the mean: Z = (x - μ) ÷ σ. A Z-score of +2.0 indicates the value is two standard deviations above average (placing it in roughly the 97.7th percentile of a normal distribution). Z-scores standardize different measurements into dimensionless metrics, allowing researchers to compare disparate metrics directly, such as comparing a student's SAT Math score against their GPA.

Related Mathematical & Statistical Tools

Explore Related Tools

Hand-picked utilities and calculators related to this tool.

Related Tools