Standard deviation measures how much numerical values vary around their mean. It is one of the most widely used measures of dispersion in statistics, research, finance, quality control and data analysis.
This Standard Deviation Calculator lets you enter a dataset and calculate either sample or population standard deviation, variance, standard error and coefficient of variation. It also provides a step-by-step variance table, interactive visualizations, a box plot for distribution and outlier analysis, and additional tools for comparing two datasets and calculating a confidence interval.
The important distinction is whether your numbers represent an entire population or a sample drawn from a larger population. A sample standard deviation uses n − 1 in the denominator, while population standard deviation uses N. The calculator keeps those two methods separate so you can see exactly how the choice affects the result.
How Standard Deviation Is Calculated
Sample and population standard deviation use the same basic sequence but different denominators.
What Is Standard Deviation?
Standard deviation is a measure of the spread of a dataset around its mean.
A small standard deviation means the observations tend to stay relatively close to the mean. A larger standard deviation means the observations are more widely spread.
σ = √[Σ(xᵢ − μ)² / N]
s = √[Σ(xᵢ − x̄)² / (n − 1)]
The resulting standard deviation is expressed in the same units as the original data, unlike variance, which is expressed in squared units.
How to Use the Standard Deviation Calculator
Enter your numerical observations in the input box. Values can be separated by commas, spaces or line breaks.
Then choose:
- Sample SD (n − 1)
- Population SD (σ, N)
The calculator immediately derives the mean, variance, standard deviation and other available statistics from the same dataset.
You can then inspect the variance table to see each observation's deviation from the mean and its squared deviation.
Use the visual tabs to inspect the Bell Curve or Box Plot, and use the additional analytical sections when you need a two-dataset comparison or a confidence interval.
Sample Standard Deviation vs Population Standard Deviation
The choice between sample and population standard deviation is not just a different display setting. It changes the denominator used to estimate variance.
Population standard deviation assumes the dataset contains the entire population of interest:
Sample standard deviation is used when the observed values are treated as a sample from a larger population:
The n − 1 denominator is commonly called Bessel's correction. It compensates for the fact that the sample mean is estimated from the same observations being used to measure variability.
That distinction is why a sample standard deviation is normally slightly larger than the population standard deviation for the same non-degenerate dataset.
Table 1: Sample vs Population Comparison
| Feature | Sample | Population |
|---|---|---|
| Notation | s | σ |
| Denominator | n − 1 (Bessel's correction) | N (Census count) |
| Use | Sample drawn from a larger population | Entire population of interest |
| Units | Original measurement units | Original measurement units |
If you need a broader set of descriptive statistics in addition to standard deviation and variance, use the Statistics Calculator.
Why the Mean Comes First
Standard deviation is calculated from deviations around the arithmetic mean, so the mean is the starting point for the calculation.
For n observations:
The mean represents the arithmetic center of the dataset.
Every observation is then compared with that center. Observations farther from the mean contribute more strongly to the variance because their deviations are squared.
For example, a deviation of 2 contributes 4 to the sum of squared deviations, while a deviation of 10 contributes 100.
This is why a few extreme values can have a substantial effect on standard deviation.
How Is Standard Deviation Calculated Step by Step?
The calculation follows a repeatable sequence.
- Calculate the mean: Add all observations and divide by the number of observations.
- Calculate each deviation: Subtract the mean from every observation: xᵢ − x̄.
- Square each deviation: (xᵢ − x̄)². Squaring removes negative signs and gives larger deviations greater weight.
- Add the squared deviations: This total is commonly called the sum of squared deviations, or SS.
- Divide by the appropriate denominator: For a sample, SS / (n − 1); for a population, SS / N.
- Take the square root: The square root of variance gives standard deviation.
The calculator exposes this process in its step-by-step variance table so you can audit how the final number was produced.
Standard Deviation Example
Consider the dataset:
There are 5 observations.
Mean: (10 + 12 + 16 + 22 + 25) / 5 = 17
The deviations from the mean are: −7, −5, −1, +5, +8
Squaring them gives: 49, 25, 1, 25, 64
Sum of squared deviations: 49 + 25 + 1 + 25 + 64 = 164
Sample variance: 164 / (5 − 1) = 41
Sample SD: √41 ≈ 6.4031
Population variance: 164 / 5 = 32.8
Population SD: √32.8 ≈ 5.7271
The PDF's worked example uses this same five-value dataset, making it a useful regression example for the live calculator.
What Is Variance?
Variance is the average squared distance from the mean, using the appropriate sample or population denominator.
Variance is useful because it is the quantity directly produced after summing squared deviations. However, because the deviations were squared, variance is expressed in squared units.
If the original data is measured in meters, standard deviation is measured in meters while variance is measured in square meters.
Taking the square root of variance returns the measure to the original units.
What Is Standard Error?
Standard deviation describes variability among observations. Standard error describes the variability of a sample statistic, such as the sample mean, across repeated samples.
For a sample mean, the commonly used standard error is:
where s is sample standard deviation and n is sample size.
As sample size increases, the standard error generally decreases because the mean becomes more stable across repeated samples.
Standard deviation: How spread out are the observations?
Standard error: How variable is the estimated sample mean?
Do not use standard error as a synonym for standard deviation.
Table 2: Core Statistics Overview
| Statistic | What It Describes |
|---|---|
| Mean | Arithmetic center of the observations |
| Variance | Average squared spread from the mean |
| Standard Deviation | Average dispersion in original measurement units |
| Standard Error | Sampling variability/uncertainty of an estimated statistic |
| Coefficient of Variation (CV) | Relative variability expressed as a percentage of the mean |
What Is the Coefficient of Variation?
The coefficient of variation, or CV, expresses variability relative to the magnitude of the mean.
A common sample form is:
This produces a percentage rather than a value in the original measurement units.
CV can be useful when comparing relative variability across datasets measured on the same ratio scale but with substantially different means.
CV becomes undefined when the mean is zero, because division by zero is not meaningful. This calculator therefore displays N/A rather than producing an infinite or misleading percentage.
For a broader view of location statistics such as mean, median and mode, use the Mean, Median, Mode & Range Calculator.
What Does the Bell Curve Show?
The Bell Curve visualization provides a visual reference for standard-deviation distance around the mean.
For a normal distribution, observations are approximately distributed around the center in a characteristic symmetric shape.
The visualization can show the mean and standard-deviation boundaries so you can see how far observations lie from the center.
The important limitation is that the familiar 68–95–99.7 rule applies to data that are approximately normally distributed.
It does not mean that every dataset automatically has:
- 68% within ±1 SD
- 95% within ±2 SD
- 99.7% within ±3 SD
For arbitrary distributions, those percentages are not guaranteed by the standard deviation alone.
What Is the 68–95–99.7 Rule?
For an approximately normal distribution:
- About 68% of observations fall within one standard deviation of the mean.
- About 95% fall within two standard deviations.
- About 99.7% fall within three standard deviations.
This is known as the empirical rule.
It is a property of the normal distribution, not a universal rule for every dataset.
For strongly skewed, heavy-tailed or otherwise non-normal data, relying on the empirical rule can be misleading.
The calculator's Bell Curve visualization is therefore best treated as a normal-distribution reference rather than proof that your dataset itself is normally distributed.
What If the Data Is Not Normally Distributed?
When the distribution is not approximately normal, Chebyshev's inequality provides a distribution-free lower bound.
For k > 1 standard deviations from the mean, at least:
of observations must lie within k standard deviations of the mean.
These are guarantees under the inequality and are much weaker than the 68–95–99.7 rule for a normal distribution.
That distinction is important when interpreting standard-deviation bands for real-world data.
How Does the Box Plot Help?
A box plot summarizes the center and spread of a dataset using the median, quartiles and range-related information.
The key components are:
- Q1: lower quartile (25th percentile)
- Median: middle value (50th percentile)
- Q3: upper quartile (75th percentile)
- IQR: Q3 − Q1 (Interquartile Range)
The box spans Q1 to Q3, while the median appears inside the box.
A commonly used outlier rule marks observations outside:
as potential outliers.
The box plot is useful because it emphasizes the middle of the distribution while also making extreme observations easier to spot.
A box plot and standard deviation therefore complement each other rather than being interchangeable summaries.
How Do Outliers Affect Standard Deviation?
Standard deviation is sensitive to extreme observations because the calculation squares each deviation from the mean.
Suppose most values are close together but one observation is extremely large. That observation can contribute a disproportionately large amount to the sum of squared deviations.
As a result:
- mean can shift
- variance can increase
- standard deviation can increase
This is why visual tools such as the Box Plot are useful alongside numerical standard deviation.
An outlier is not automatically an error.
It may represent a legitimate observation, a rare event, a different population or a data-entry problem.
Always investigate the observation before removing it.
How Is Standard Deviation Related to a Z-Score?
A z-score expresses how far an observation is from the mean in standard deviation units.
For a population-style formulation:
For a sample-based context, the appropriate estimated standard deviation may be used depending on the analysis.
For example, z = 2 means the observation is two standard deviations above the reference mean.
A z-score therefore uses standard deviation as a scale for comparing distances from the center.
When you need to convert observations into standardized z-scores or work with the normal distribution, use the Z-Score Calculator & Normal Distribution Suite.
Can You Compare the Variability of Two Datasets?
Yes.
The calculator includes a two-dataset comparison mode.
You can enter Dataset A and Dataset B and compare their:
- means
- sample standard deviations
- variance ratio
- pooled standard deviation
The comparison is useful when two groups need to be examined side by side before further statistical analysis.
Dataset A: 10, 12, 15, 18, 20 → Mean = 15, Sample var = 17, Sample SD ≈ 4.1231
Dataset B: 14, 16, 19, 22, 25 → Mean = 19.2, Sample var = 19.7, Sample SD ≈ 4.4385
Variance ratio: F = 17 / 19.7 ≈ 0.8629
Pooled standard deviation: ≈ 4.2837
These are descriptive comparison quantities. An F ratio by itself is not a complete hypothesis test.
Table 3: Dual Dataset Metrics
| Metric | Meaning |
|---|---|
| Mean A / B | Arithmetic center of each respective dataset |
| SD A / B | Within-dataset spread of each group |
| F ratio | Ratio of sample variances (s₁² / s₂²) |
| Pooled SD | Weighted common SD estimate under the equal-variance model |
What Is the Variance Ratio?
The calculator defines its displayed variance ratio as:
where s₁² and s₂² are the selected sample variances.
The ratio compares the magnitude of variability in Dataset A with Dataset B.
- An F ratio near 1 indicates that the two sample variances are similar in magnitude.
- A ratio below 1 means the numerator variance is smaller than the denominator variance.
- A ratio above 1 means the numerator variance is larger.
The interpretation of an F statistic as a formal statistical test requires additional assumptions and an appropriate reference distribution. A displayed variance ratio should not automatically be interpreted as proof that two population variances differ.
What Is Pooled Standard Deviation?
Pooled standard deviation combines information from two samples to estimate a common within-group standard deviation when the equal-variance model is appropriate.
For two independent samples:
The weighting depends on each sample's degrees of freedom rather than simply averaging the two standard deviations.
Pooled standard deviation is therefore appropriate only when the statistical model supports a common variance assumption.
When equal variances are doubtful, an analysis designed for unequal variances may be more appropriate.
How Does the Confidence Interval Calculator Work?
The confidence-interval section estimates a range for a population mean from a sample mean, sample standard deviation and sample size.
For the calculator's z-based 95% example:
Mean = 50 | Standard deviation = 10 | N = 30
Critical z-score = 1.96
Standard error: 10 / √30 ≈ 1.82574
Margin of error: 1.96 × 1.82574 ≈ 3.5785
Interval: 50 ± 3.5785 = [46.4215, 53.5785]
A confidence interval should not be interpreted as a 95% probability that the fixed population mean is inside this particular interval.
The 95% refers to the long-run coverage property of the interval-producing method under its assumptions.
For small samples or situations where population variability is estimated from the sample, a t-based interval may be more appropriate than a fixed z critical value. The calculator's displayed method should therefore be interpreted according to the model and confidence option selected.
What Is Margin of Error?
The margin of error describes the amount added and subtracted from the point estimate to construct the reported interval.
For a z-based mean interval:
A larger standard error produces a wider margin of error.
A larger sample size generally reduces the standard error, which tends to make the interval narrower when other quantities are held constant.
A more variable dataset produces a larger standard error and therefore a wider interval.
What Standard Deviation Can — and Cannot — Tell You
Standard deviation describes spread.
It does not by itself tell you:
- whether a difference is statistically significant
- whether a measurement is clinically important
- whether one treatment is better
- whether a process is acceptable
- whether a result proves causation
Those conclusions require an appropriate statistical design and, when relevant, formal inference.
The calculator is designed to make the arithmetic transparent, not to replace the statistical reasoning required for a study.
Why Does Sample Size Matter?
Sample size affects several statistical quantities.
For the sample standard error of the mean:
As n increases, the standard error decreases, all else equal.
Standard deviation itself measures spread in the observed values and does not simply become smaller because more observations are collected. What generally becomes more precise with more observations is an estimate such as the sample mean.
What Units Does Standard Deviation Use?
Standard deviation uses the same units as the original observations.
- If the data is in centimeters, standard deviation is in centimeters.
- If the data is in dollars, standard deviation is in dollars.
- If the data is in kilograms, standard deviation is in kilograms.
Variance uses squared units (centimeters², dollars², kilograms²).
This is one reason standard deviation is often easier to interpret directly than variance.
When Should You Use Standard Deviation?
Standard deviation is useful when you want to quantify the overall spread of numerical observations around their mean.
Common uses include:
It is especially useful when observations are measured on a meaningful numeric scale and the mean is an appropriate center.
When Is Standard Deviation Not Enough?
Standard deviation is only one summary of a dataset.
It can be misleading when:
- the distribution is strongly skewed
- the data contains major outliers
- the measurement scale makes the mean inappropriate
- multiple populations have been mixed together
- the sample is too small to support the intended inference
For skewed distributions, consider reporting the median and interquartile range alongside standard deviation.
For unusual distributions, visualize the data before interpreting a single spread statistic.
Where Is Standard Deviation Used?
Standard deviation appears across many fields because nearly every quantitative discipline needs a way to describe variability.
Finance
Standard deviation can describe variability in investment returns and is commonly used as a volatility measure.
It can also appear in risk calculations and portfolio analysis.
However, a Sharpe ratio is not calculated from standard deviation alone; it combines excess return with a measure of return variability [(R_p − R_f) / σ_p].
Manufacturing and Quality Control
Measurements such as product dimensions, process times and material properties can be summarized with standard deviation to understand process consistency.
Six Sigma uses standard-deviation-based process terminology, but actual process capability analysis involves additional quantities such as specification limits and process capability indices.
Science and Research
Researchers use standard deviation to describe variation in measured observations and to summarize experimental datasets.
Education
Test scores and assessment measurements can be summarized using mean and standard deviation to describe central tendency and spread.
Common Standard Deviation Mistakes
Using N instead of N − 1 for a sample: This changes the sample variance and standard deviation.
Calling standard deviation standard error: They measure different concepts (raw spread vs mean uncertainty).
Applying the 68–95–99.7 rule to every dataset: The empirical rule depends on approximate normality.
Removing every outlier: An unusual observation is not automatically incorrect.
Rounding too early: Intermediate rounding can change the final result. The calculator's step table therefore keeps the underlying arithmetic precise and rounds primarily for display.
Mixing sample and population formulas: Always identify whether the dataset represents the complete population or a sample from a larger population.
Worked Example With Eight Values
Use the dataset:
Sample variance: 164.875 / 7 = 23.553571...
Sample SD: ≈ 4.853202
Sample standard error: ≈ 1.715866
Sample CV: ≈ 28.3399%
Population variance: 164.875 / 8 = 20.609375
Population SD: ≈ 4.539755
This example is useful because it demonstrates why sample and population standard deviations differ even though the underlying observations are identical.
How to Read the Variance Table
The variance table exposes the intermediate calculations rather than hiding them behind a single final result.
For each observation it shows the relationship between:
- value
- deviation from mean
- squared deviation
For the default dataset, the first row is:
The next row is:
Adding every squared deviation produces:
That same SS then feeds both the sample and population variance calculations.
Why Does Your Calculator Show Different Decimal Places?
Statistical calculations are performed using full numerical precision, while the interface may round values for readability.
For example, 17.125 may be displayed as 17.13 depending on the field.
That does not mean the underlying calculation has changed.
Exported results and step-by-step calculations may use more decimal places so that the arithmetic remains auditable.
What Data Can I Enter?
The calculator accepts numerical observations separated by commas, spaces, or line breaks.
For example, these forms represent the same five observations:
12
16
22
25
The calculator normalizes valid delimiter variations before calculation.
Non-numeric entries should be rejected or handled through the calculator's validation behavior rather than silently converted into zero.
How Can I Save or Export a Calculation?
The calculator provides several ways to keep a record of your work.
Save: stores a calculation for later reference.
Copy: creates a text summary of the current result.
CSV: exports structured numerical information for use in spreadsheet software.
Share: preserves the calculation state where supported.
PDF / Print: creates a printable report of the calculation.
These exports should represent the current calculator state rather than an old example dataset.
If your analysis starts with standard deviation but you need a broader descriptive-statistics workflow, the Statistics Calculator can provide a wider set of summary measures.
Should I Use Sample or Population Standard Deviation?
Use population standard deviation when the values represent the complete population you are describing.
Use sample standard deviation when the observed values are treated as a sample from a larger population and you want the usual unbiased estimator of population variance.
All machines produced in a complete production run: population may be appropriate.
100 machines selected from ongoing production: sample may be appropriate.
Every employee in a company: population may be appropriate.
A survey sample of employees: sample may be appropriate.
The correct choice depends on how the data was collected and what population you intend to describe.
Statistical References
The mathematical definitions, unbiased estimators, and distributional properties implemented in this calculator adhere to established national and academic standards:
- NIST/SEMATECH e-Handbook of Statistical Methods — Measures of DispersionNational Institute of Standards and Technology. Explains sample standard deviation, variance, and degrees of freedom.
- Penn State Online Statistics — Sample Mean / Standard DeviationPennsylvania State University STAT 500 course notes on sample variability, Bessel's correction, and sum of squares.
- Penn State Online Statistics — Sampling Distributions / Standard ErrorDistinguishes sample standard deviation from the standard error of the mean across repeated sampling.
- NIST — Exploratory Data Analysis / Box PlotsTukey 1.5×IQR outlier detection methodology and five-number order summary properties.
- NIST — Confidence Limits for the MeanFormulations for margin of error and interval bounds under normal and t-distributions.
Standard Deviation Calculator FAQ
30 AnswersRelated Statistics Calculators
Statistics Calculator
Calculate a broader set of descriptive statistics from your dataset.
Z-Score Calculator & Normal Distribution Suite
Standardize observations with z-scores and explore normal-distribution calculations.
Mean, Median, Mode & Range Calculator
Calculate common measures of central tendency and basic numerical range.
Mathematical & Educational Reference Notice:
This calculator is provided for computational, research, and educational purposes. Statistical modeling and inferences derived from sample data require verifying underlying distributional assumptions (such as independence, normality, and homoscedasticity) appropriate to the specific study design.