Standard Deviation Calculator: Variance, Standard Error, Mean and Median
Paste your data to get sample and population standard deviation, variance, standard error, mean, median and mode.
Your 8 values have a mean of 5.000 with a sample standard deviation of 2.138. (If treated as an entire population, σ = 2.000).
| Data Point (x_i) | Mean (x̄) | Deviation (x_i − x̄) | Squared Deviation (x_i − x̄)² | z-Score |
|---|---|---|---|---|
| 2 | 5.000 | -3.000 | 9.000 | -1.40 |
| 4 | 5.000 | -1.000 | 1.000 | -0.47 |
| 4 | 5.000 | -1.000 | 1.000 | -0.47 |
| 4 | 5.000 | -1.000 | 1.000 | -0.47 |
| 5 | 5.000 | +0.000 | 0.000 | 0.00 |
| 5 | 5.000 | +0.000 | 0.000 | 0.00 |
| 7 | 5.000 | +2.000 | 4.000 | 0.94 |
| 9 | 5.000 | +4.000 | 16.000 | 1.87 |
| Total (n = 8) | — | Σ = 0.000 | SS = 32.000 | — |
- Sample & population SD
- Variance, SE, mean, median, mode
- Step-by-step table
- Frequency & grouped data
100% free · No sign-up · Runs in your browser, nothing is uploaded
Standard Deviation and Variance Formulas
Standard deviation is the most widely applied measure of variability in statistical analysis. It quantifies how much individual data points deviate from the arithmetic mean.
Population Standard Deviation (σ) = √[ Σ(x_i − μ)² ÷ N ]
Where:
- x_i: Each individual observation or data point.
- x̄ (or μ): The arithmetic mean of the sample (x̄) or population (μ).
- n (or N): The total number of observations in the sample (n) or population (N).
- Σ(x_i − x̄)²: The sum of squared deviations from the mean (Sum of Squares, SS).
How to Use the Standard Deviation Calculator
This calculator accepts numeric data in three convenient input formats:
- Raw Data List: Enter or paste numbers separated by commas, spaces, tabs, or newlines (e.g.
2, 4, 4, 4, 5, 5, 7, 9). You can switch between Sample (n − 1) and Population (n) scopes. - Frequency Table: Enter value:count pairs (such as
85:14, 90:18) to evaluate weighted frequency distributions without entering repeating digits manually. - Grouped Classes: Enter continuous class interval ranges and frequencies (e.g.,
10-20: 5). The engine uses class midpoints to compute estimated standard deviation.
Sample vs Population Standard Deviation (Bessel's Correction)
The choice between sample and population formulas depends strictly on your data collection scope:
- Use Population (σ): When you have recorded measurements for every single member of the entire group of interest (e.g., test scores of all 24 students in a specific classroom, or all 50 states in the US). Here, N is the true population size.
- Use Sample (s): When your data represents a random or representative sample drawn from a larger target population (e.g., polling 1,000 voters to infer the sentiment of 50 million citizens). The formula divides by
n − 1rather thann.
Dividing by n − 1 is known as Bessel's correction. Because sample data tends to cluster closer to its own sample mean than to the unknown true population mean, dividing by n results in a systematically underestimated variance. Bessel's correction provides an unbiased estimator.
Standard Deviation Calculation Step by Step
Consider our default dataset: 2, 4, 4, 4, 5, 5, 7, 9 (8 values).
- Calculate the Mean (x̄):
Sum = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40.
Mean = 40 ÷ 8 = 5.000. - Calculate Deviations from the Mean (x_i − x̄):
(2 − 5 = −3), (4 − 5 = −1), (4 − 5 = −1), (4 − 5 = −1), (5 − 5 = 0), (5 − 5 = 0), (7 − 5 = +2), (9 − 5 = +4). - Square Each Deviation:
(−3)² = 9, (−1)² = 1, (−1)² = 1, (−1)² = 1, (0)² = 0, (0)² = 0, (+2)² = 4, (+4)² = 16. - Sum the Squared Deviations (Sum of Squares, SS):
SS = 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.000. - Divide by Degrees of Freedom:
For Sample Variance (s²): 32 ÷ (8 − 1) = 32 ÷ 7 = 4.571.
For Population Variance (σ²): 32 ÷ 8 = 4.000. - Take the Square Root:
Sample SD (s) = √4.571 = 2.138.
Population SD (σ) = √4.000 = 2.000.
Standard Error of the Mean (SE)
While standard deviation measures the dispersion of individual data points, the standard error of the mean (SE) measures the precision of the estimated mean itself:
For our dataset with s = 2.138 and n = 8: SE = 2.138 ÷ √8 = 2.138 ÷ 2.8284 = 0.756. As sample size grows larger, standard error decreases in proportion to √n, reflecting greater confidence in the sample mean.
Mean, Median, and Mode: Central Tendency vs Dispersion
A complete data overview pairs measures of dispersion (standard deviation, variance, IQR) with measures of central tendency:
- Mean: The arithmetic balance point (5.000).
- Median: The middle value of sorted numbers (4.500).
- Mode: The most frequently occurring value (4, appearing 3 times).
The Empirical Rule (68-95-99.7) and z-Scores
For data that follows a normal (bell-shaped) distribution, about 68%, 95% and 99.7% of values fall within 1, 2 and 3 standard deviations of the mean. With only 8 values the example data is too small to check for normality, so the ranges below show only how the rule is applied (using the sample SD):
- About 68% within 1 standard deviation:
5.000 ± 2.138 = [2.862, 7.138]. - About 95% within 2 standard deviations:
5.000 ± 4.276 = [0.724, 9.276]. - About 99.7% within 3 standard deviations:
5.000 ± 6.414 = [−1.414, 11.414].
An observation with a z-score greater than +3.0 or less than −3.0 is commonly flagged as an extreme statistical outlier.
Coefficient of Variation (Relative Dispersion)
The coefficient of variation (CV) standardizes variability relative to the magnitude of the mean:
For our example: (2.138 ÷ 5.000) × 100% = 42.76%. CV is particularly useful when comparing the volatility of assets priced in different currencies or across different orders of magnitude.
Frequency Tables and Grouped Data
When observations repeat or are summarized in bins, weighted formulas avoid typing out every value individually:
Sample Variance (s²) = Σ[ f × (x − x̄)² ] ÷ (Σf − 1)
- Frequency Table (value:count): Each distinct value
xis multiplied by its countf. The total sample size isn = Σf, and every result is exact. - Grouped Classes (low-high:count): Each class interval is represented by its midpoint
(low + high) ÷ 2. Because raw individual positions inside each bin are unknown, grouped standard deviation and variance are reported as estimates.
For non-parametric outlier analysis, explore our IQR Calculator. For comparing two sample means, see our T-Test Calculator, or check statistical significance for conversion rates with our A/B Test Significance Calculator.
Frequently Asked Questions
Standard deviation is a fundamental statistical metric that quantifies the dispersion or spread of data points around their arithmetic mean. A low standard deviation indicates that values cluster tightly near the mean, while a high standard deviation reveals greater dispersion and variability across the dataset.
Population standard deviation (σ) is used when you possess the complete dataset for an entire group, dividing the sum of squared deviations by N. Sample standard deviation (s) applies when your data is a random subset of a larger population, dividing by n − 1 (Bessel’s correction). That makes the sample variance an unbiased estimate of the population variance; the sample SD is still very slightly low on average.
When estimating population variance from a sample, the sample mean naturally sits closer to sample observations than the true population mean does. Dividing by n would systematically underestimate variance. Dividing by n − 1 (the degrees of freedom) expands the calculated variance slightly, correcting this negative bias.
Variance is the average of squared deviations from the mean (s² or σ²). Standard deviation is simply the positive square root of variance: s = √s². While variance measures dispersion in squared units (e.g., dollars squared), standard deviation restores the measurement to the original unit (e.g., dollars), making it directly interpretable.
Standard error of the mean (SE = s ÷ √n) measures the precision of the sample mean as an estimate of the true population mean. It reflects how much the sample mean would vary if you repeatedly drew new random samples of size n from the population.
For data that follows an approximately bell-shaped normal distribution, approximately 68.27% of observations fall within one standard deviation of the mean (μ ± 1σ), approximately 95.45% fall within two standard deviations (μ ± 2σ), and approximately 99.73% fall within three standard deviations (μ ± 3σ).
A z-score (standard score) indicates how many standard deviations an individual observation lies above or below the mean: z = (x − x̄) ÷ s. A z-score of 0 is exactly at the mean, +2.0 indicates two standard deviations above the mean, and −1.5 indicates 1.5 standard deviations below the mean.
Standard deviation can never be negative because squared deviations and square roots are non-negative in real numbers. Standard deviation is zero if and only if all numbers in the dataset are completely identical (e.g., 7, 7, 7, 7), representing zero dispersion.
The coefficient of variation (CV = (s ÷ x̄) × 100%) expresses standard deviation as a percentage of the mean. It allows researchers to compare relative variability between datasets with vastly different scales or measurement units.
First calculate the arithmetic mean (x̄). Subtract the mean from each data point to get its deviation, square every deviation, and sum all squared deviations (SS). Divide SS by n − 1 for a sample (or N for a population) to get the variance, then take the square root of the variance.
To find the mean, sum all values and divide by the count n. To find the median, sort the values from lowest to highest and take the middle value (or the average of the two middle values when n is even). The mode is the value that appears most frequently; a dataset can have one mode, multiple modes, or no mode if every value appears equally often.
For a frequency table, multiply each value x by its frequency f to find the weighted mean (x̄ = Σfx ÷ Σf), then sum f(x − x̄)² and divide by Σf − 1 (sample) or Σf (population) before taking the square root. For grouped class intervals such as 10–20, use each interval’s midpoint as x and treat the resulting standard deviation as an estimate.
Standard deviation incorporates every data value and is sensitive to extreme outliers. The interquartile range (IQR = Q3 − Q1) measures the middle 50% of sorted data and is highly robust against outliers. For skewed distributions, IQR and median often summarize spread better than standard deviation and mean.
How This Calculator Works: Formula, Defaults & Sources
Formula
- Sample Standard Deviation: s = √[ Σ(x_i − x̄)² ÷ (n − 1) ]
- Population Standard Deviation: σ = √[ Σ(x_i − μ)² ÷ N ]
- Sample Variance: s² = Σ(x_i − x̄)² ÷ (n − 1)
- Population Variance: σ² = Σ(x_i − μ)² ÷ N
- Standard Error of the Mean: SE = s ÷ √n
- Coefficient of Variation: CV = (s ÷ x̄) × 100%
- z-Score: z = (x_i − x̄) ÷ s
Default values (you can change them)
- Spec Worked Example: 2, 4, 4, 4, 5, 5, 7, 9 (n=8): mean=5, s=2.138, σ=2.000, SE=0.756
- Sample Variance: s² = 32 ÷ 7 = 4.571
- Population Variance: σ² = 32 ÷ 8 = 4.000
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods — Section 1.3.5.6: Measures of Dispersion — Standard Deviation and Variance
- Bessel’s correction (divide by n − 1) — standard result: makes the sample variance an unbiased estimate of the population variance
Results are planning estimates, not engineering advice. Confirm quantities with your supplier and follow your plans and local building code. Last updated: November 25, 2026. Spotted a wrong number? Email us or use the contact page.