Mean · Variance · Population & Sample SD

Standard Deviation Calculator

Enter your data set to instantly calculate mean, median, mode, variance, and standard deviation. Shows full step-by-step working for both population and sample SD.

Last updated

Mean, Median, Mode
Population & Sample SD
Step-by-Step Working
Outlier Detection
Our networkdiscount5Fresh deals. Five at a time.Price drops and coupon codes, ending soonest first.See today’s deals
σ
Standard Deviation
Enter data separated by commas or new lines
Quick examples
Test Scores
Stock Returns
Heights (cm)
Temperatures
σ

Enter your data set to calculate mean, standard deviation, variance, and more.

Standard Deviation Explained

Standard deviation measures how far values typically sit from their mean. For the data 4, 7, 13, 16, 21, 2, 8, 11, 19, 5 the mean is 10.6 and the sample standard deviation is 6.52, or 6.18 if those ten values are the whole population. Paste your own numbers above to get both versions, the variance and every step of the working.

Standard deviation measures how spread out values in a data set are from the mean. A low SD means values cluster tightly around the mean. A high SD means values are spread out widely. It is the most widely used measure of variability in statistics.

There are two versions: population SD (σ) divides by n: used when you have all values for the entire population. Sample SD (s) divides by n−1: used when your data is a sample from a larger population (the most common real-world case). Dividing by n−1 corrects for the bias that comes from estimating the population mean from a sample.

Population SD: σ = √( Σ(xᵢ − μ)² / n )
Sample SD: s = √( Σ(xᵢ − x̄)² / (n−1) )

Variance: σ² or s² = (SD)²
Mean: x̄ = Σxᵢ / n

Population vs Sample SD

Use population SD (÷n) when you have data for the entire population: e.g., all 30 students in a class. Use sample SD (÷n−1) when your data is a sample from a larger population: e.g., 30 randomly chosen people representing all adults. Sample SD is more common in research and statistics.

The 68-95-99.7 Rule

In a normal distribution: approximately 68% of data falls within 1 SD of the mean, 95% within 2 SDs, and 99.7% within 3 SDs. Values more than 2 SDs from the mean are often considered unusual; more than 3 SDs are potential outliers. This rule applies to normally distributed data.

Coefficient of Variation

CV = (SD / Mean) × 100. This expresses SD as a percentage of the mean: useful for comparing variability between datasets with different units or scales. A CV of 10% means the SD is 10% of the mean. It's unitless, making it the best tool for comparing spread across different measurements.

Real-World Uses

Finance: stock price volatility (higher SD = higher risk). Quality control: measuring product consistency. Education: grading curves and test score analysis. Sports: evaluating player performance consistency. Weather: temperature variability. Medicine: clinical trial result analysis.

Worked Example: Sample vs Population

The ten values loaded in the calculator add up to 106, so the mean is 106 ÷ 10 = 10.6. Next, subtract the mean from each value and square the result.

xx − mean(x − mean)²xx − mean(x − mean)²
4−6.643.562−8.673.96
7−3.612.968−2.66.76
132.45.76110.40.16
165.429.16198.470.56
2110.4108.165−5.631.36

The squared deviations add up to 382.4. From there the two versions split:

  • Sample: variance = 382.4 ÷ 9 = 42.49, and SD = √42.49 = 6.52.
  • Population: variance = 382.4 ÷ 10 = 38.24, and SD = √38.24 = 6.18.

How Much Dividing by n − 1 Changes the Result

For the same data the sample SD is always larger than the population SD, by a factor of √(n ÷ (n − 1)). The gap matters for small data sets and all but disappears for large ones.

Values (n)Sample SD ÷ population SDSample SD is larger by
21.41441.4%
31.22522.5%
51.11811.8%
101.0545.4%
301.0171.7%
1001.0050.5%
1,0001.0010.1%

The same choice in spreadsheets and calculators

ToolSample (n − 1)Population (n)
ExcelSTDEV.S (or older STDEV)STDEV.P (or older STDEVP)
Google SheetsSTDEV or STDEV.SSTDEVP or STDEV.P
Variance in ExcelVAR.SVAR.P
TI-84 (1-Var Stats)Sxσx

Edge Cases and Common Mistakes

  • Only one value. The sample SD is undefined because you would divide by n − 1 = 0, so the calculator asks for at least two numbers.
  • All values the same. {5, 5, 5, 5} gives an SD of exactly 0. That is correct, and usually worth a second look at the data.
  • Commas inside numbers. The calculator treats commas, spaces and new lines as separators, so 1,500 is read as two values, 1 and 500. Type large numbers without thousands separators.
  • Negative values are fine. Returns such as −3.7% work normally. The SD itself is never negative, because it is the square root of an average of squares.
  • Picking the wrong version. Use population only when you truly have every member of the group. Survey responses, lab measurements and test samples are samples.
  • Applying the 68-95-99.7 rule to skewed data. The rule only holds for data that is roughly bell shaped. For incomes, house prices and anything with a long tail, the median and interquartile range describe the data better.

For the mean, median and mode alone, the average calculator is quicker.

Method and sources. Population SD σ = √(Σ(x − μ)² ÷ n); sample SD s = √(Σ(x − x̄)² ÷ (n − 1)), the Bessel correction for estimating spread from a sample. Standard error = s ÷ √n. Definitions follow the NIST/SEMATECH e-Handbook of Statistical Methods. Every figure in the tables above was computed with the same formulas the calculator uses.

Frequently Asked Questions

Standard deviation tells you how spread out your data is. If everyone in a class scored exactly 75 on a test, the SD is 0: no spread at all. If scores ranged from 40 to 100, the SD would be high. More precisely, it measures the average distance each data point is from the mean. Low SD = data clusters near the mean. High SD = data is spread wide. It's expressed in the same units as your data: so if your data is in kg, so is the SD.

Variance is the average squared distance from the mean. Standard deviation is the square root of variance. Variance is harder to interpret because it's in squared units (e.g., kg²), while SD is in the original units (kg). Both measure spread; SD is more interpretable. Variance is used in mathematical formulas and statistical tests. The relationship: Variance = SD² and SD = √Variance.

Population SD (divides by n): Use when you have data for an entire population, all students in a school, all products from a batch. Sample SD (divides by n−1): Use when your data is a sample drawn from a larger population, survey results, lab measurements, any research data. In practice, sample SD is almost always the right choice, you rarely have complete population data. Excel's STDEV() uses sample SD; STDEVP() uses population SD.

Step 1: Find the mean, add all values and divide by n. Step 2: Subtract the mean from each value to find the deviation. Step 3: Square each deviation (this removes negatives and emphasizes outliers). Step 4: Sum the squared deviations. Step 5: Divide by n (population) or n−1 (sample) to get the variance. Step 6: Take the square root to get the standard deviation. This calculator shows all these steps with your actual data.

There's no universal "good" standard deviation: it depends entirely on the context. A body temperature SD of 0.5°C is normal; 5°C would indicate something is wrong with your data. The coefficient of variation (CV = SD/Mean × 100%) is more meaningful for comparison. In manufacturing, a CV under 1% is excellent precision. In financial returns, annual SD of 15 to 20% is typical for equities. Compare SD to your mean: if SD is larger than your mean, your data is highly variable.

In a normal (bell-curve) distribution, standard deviation defines the shape: 68% of values fall within 1 SD of the mean (mean ± 1σ). 95% fall within 2 SDs (mean ± 2σ). 99.7% fall within 3 SDs (mean ± 3σ). This is the 68-95-99.7 rule (or empirical rule). Values beyond 2 SDs are statistically unusual (~5% of the time). Values beyond 3 SDs are rare (~0.3%). This framework is used in quality control, grading curves, and statistical hypothesis testing.

Outliers significantly inflate standard deviation because SD squares the deviations: a value far from the mean contributes disproportionately. Example: the data set {1, 2, 3, 4, 100} has a mean of 22 and a sample SD of about 43.6. Without 100, mean = 2.5 and SD = 1.3. When outliers are present, median and interquartile range (IQR) are often more appropriate than mean and SD for describing the data. This calculator flags values more than 2 SDs from the mean as potential outliers.

Standard deviation measures the variability of individual data points around the mean. Standard error (SE) measures how precisely the sample mean estimates the true population mean: SE = SD / √n. As sample size increases, SE decreases (larger samples give more precise estimates), but SD doesn't change systematically. SD describes variability in your sample data. SE describes uncertainty about the true population mean. SE is used in confidence intervals and hypothesis tests; SD describes the data distribution.

In finance, standard deviation is the primary measure of investment risk (volatility). A stock or portfolio with a high SD of returns is more volatile: larger swings both up and down. Annual SD of returns: money market funds ~0.1%; bond funds ~3 to 7%; diversified equity funds ~15 to 20%; individual stocks ~25 to 50%+. The Sharpe Ratio (return / SD) measures return per unit of risk. Modern Portfolio Theory uses SD as the key risk metric for portfolio optimization. Higher expected returns come with higher SD.

A standard deviation of 0 means all values in the data set are identical, there is zero variability. Example: the data set {5, 5, 5, 5, 5} has mean = 5 and SD = 0. This happens in practice when: all measurements give the same result (perfect precision or a broken instrument); a variable is actually a constant; or there's a data entry error. SD of 0 is mathematically valid but should prompt you to check your data for errors or unusual conditions.

Because a sample’s own mean sits closer to its values than the true population mean does, so dividing by n would understate the spread. Dividing by n − 1 (Bessel’s correction) removes that bias from the variance. The effect is large for small samples, about 41% on the SD with 2 values and 5.4% with 10, and under 1% once you pass 100 values.

It can never be negative: it is the square root of an average of squared distances, so the smallest possible value is 0, when every value is identical. It can be larger than the mean, which happens when the data is very spread out or includes negative values. For {1, 2, 3, 4, 100} the mean is 22 and the sample SD is 43.6.