Standard Deviation & Variance Calculator
Paste a numerical dataset and calculate population or sample standard deviation with transparent steps. Compare variance, mean, range, sum of squared deviations, denominator choice, and individual deviations from the mean.
Additional
Controls displayed significant digits only; the calculation itself is not rounded to this setting.
Very large and very small nonzero values switch to scientific notation so useful digits are not hidden.
How to use the Standard Deviation Calculator
Enter or paste the dataset into the calculator. Values can be separated with commas, spaces, semicolons, or line breaks, and negative and decimal numbers are supported.
Choose Population when the entered observations are the complete group you want to describe. Choose Sample when those observations are being used to estimate variation in a wider population or ongoing process.
The main result shows the selected standard deviation along with variance, mean, count, and observed range. Open the calculation details to inspect the denominator, sum of squared deviations, other standard-deviation result, and individual deviations from the mean.
Display precision is available under Additional. It changes only how many significant digits are shown; it does not round the statistics before calculation.
| Value | Value − mean | Squared deviation |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 0 | SS = 32 |
Sample or population depends on the question
Whether data are a sample or population is not determined simply by the number of observations or by whether additional observations could theoretically exist.
Use the population calculation when the observations constitute the entire group that the statistic is intended to describe.
Use the sample calculation when the observations are being used to estimate variability in something larger than the entered dataset.
The same numerical dataset can therefore legitimately use either formula in different analyses because the intended target has changed.
| Situation | Use | Reason |
|---|---|---|
| All scores in one completed class, describing only that class | Population | The entered students are the complete group of interest |
| A selection of students used to study a wider school system | Sample | The observations are intended to estimate a broader population |
| Every transaction from one completed day, summarizing only that day | Population | The complete set for that day is the target |
| Measurements taken from an ongoing manufacturing process | Sample | The measurements represent a wider process including unobserved output |
| Every member of one fixed small team | Population | The complete team is being described |
Why population and sample standard deviation differ
Both calculations begin with the same mean and the same sum of squared deviations from that mean.
Population variance divides that sum by n, the number of observations.
Conventional sample variance divides by n − 1 instead. For the same nonconstant dataset, this produces a larger variance and therefore a larger standard deviation.
Switching the Population/Sample selector changes which result the calculator emphasizes; it does not alter the entered observations, mean, or sum of squared deviations.
What n − 1 corrects
The sample mean is estimated from the same observations whose variation is being measured. Once the sample mean is fixed, only n − 1 deviations are free to vary independently because their total must equal zero.
Dividing the squared-deviation sum by n − 1 is commonly called Bessel's correction.
Under the standard independent-sampling assumptions with finite population variance, the n − 1 formula makes sample variance an unbiased estimator of population variance.
That statement applies to variance. Taking the square root is nonlinear, so the conventional sample standard deviation itself is not perfectly unbiased, particularly for small samples.
Variance and standard deviation use different units
Standard deviation has the same unit as the observations. If the dataset is measured in seconds, its standard deviation is also measured in seconds.
Variance uses the square of the original unit because each deviation is squared before the values are combined. A dataset measured in seconds therefore has variance in seconds squared.
This is one reason standard deviation is often easier to interpret beside a mean: both remain on the same measurement scale.
Changing measurement scale also changes spread. Converting metres to centimetres multiplies standard deviation by 100 and variance by 10,000.
How the spread overview should be interpreted
The calculator's spread overview places the observed minimum, mean, and maximum on one scale and marks the interval from mean − 1 selected standard deviation to mean + 1 selected standard deviation.
That visualization is intended to make the numerical result easier to inspect. It is not a histogram and does not show how observations are distributed between the minimum and maximum.
The shaded mean ± 1 SD interval is descriptive. It is not a confidence interval and it does not establish that a particular percentage of observations falls inside it.
A dataset can have a valid mean and standard deviation without resembling a normal distribution.
The 68–95–99.7 rule is not universal
For an approximately normal distribution, the familiar empirical rule places roughly 68% of observations within one standard deviation of the mean, about 95% within two, and about 99.7% within three.
Those percentages are properties of the normal distribution, not a definition of standard deviation itself.
Do not automatically apply the rule to strongly skewed, multimodal, bounded, seasonal, discrete, or heavy-tailed data.
This calculator does not perform a normality test or fit a normal distribution to the entered values.
Extreme values can strongly affect standard deviation
Standard deviation is based on squared distances from the mean, so distant observations receive disproportionately greater influence.
An observation two units from the mean contributes four squared units. An observation ten units away contributes 100.
A large standard deviation may therefore reflect broad ordinary variation, one or more extreme observations, skewness, or a mixture of different groups.
The calculator does not decide whether an unusual value is a measurement error or a legitimate observation. Investigate the context before deleting data.
| Measure | What it uses | Effect of extremes | Useful when |
|---|---|---|---|
| Standard deviation | Every squared distance from the mean | High | Spread around the arithmetic mean is the quantity of interest |
| Variance | The same squared distances | High | Statistical models or calculations need spread in squared units |
| Range | Minimum and maximum only | Extremely high | You need a quick statement of the full observed span |
| Interquartile range | The middle 50% of ordered observations | Lower | The distribution is skewed or central spread matters more than the tails |
| Median absolute deviation | Distances from the median | Lower | A robust measure is preferred because extreme observations should have less influence |
Standard deviation is not a measure of accuracy
A low standard deviation means observations are relatively concentrated around their own mean.
It does not prove that measurements are correct, unbiased, calibrated, representative, or close to a desired target.
A measurement process can produce almost identical values every time and still be systematically wrong.
Accuracy, precision, bias, measurement uncertainty, and statistical spread answer different questions.
How the calculator gets the sum of squared deviations
For each observation, the mean is subtracted from the value. That difference is the deviation from the mean.
Every deviation is squared, which removes its sign and gives larger departures greater numerical influence.
Those squared deviations are added to produce the sum of squared deviations, written here as SS.
Population and sample variance use the same SS. Only their denominators differ.
Why the calculator uses a numerically stable method
A tempting computational shortcut calculates variance from the average of squared values minus the square of the average.
Although mathematically equivalent in exact arithmetic, that form can lose substantial floating-point precision when the observations share a very large offset but differ from one another by only a small amount.
This calculator updates the running mean and corrected squared-deviation total as observations are processed, using the approach commonly associated with Welford's method.
The displayed formulas remain the ordinary statistical definitions. The stable running algorithm changes how the computer obtains the result, not the statistic being calculated.
Why the sum is calculated separately
The calculator also reports the arithmetic sum of the dataset.
Its running total uses compensated summation to reduce some floating-point error when values differ greatly in magnitude or positive and negative values partly cancel.
The sum is not used as a shortcut for calculating variance, so improving the sum does not replace the stable running variance calculation.
If a dataset produces a total, range, or squared-deviation result outside the calculator's finite numeric range, the calculation is rejected rather than displaying Infinity or NaN.
Display precision does not change calculation precision
The Additional control selects how many significant digits are displayed in results and calculation details.
The underlying JavaScript-number calculation is performed before that formatting is applied.
Displaying more digits can reveal more of the computed value, but it does not make low-quality source measurements more accurate.
Very large and very small nonzero results may be shown in scientific notation so meaningful digits remain visible.
A single value is a special case
If the dataset contains one value, its population variance and population standard deviation are both zero because there is no spread within that one-value population.
Sample variance and sample standard deviation are unavailable with one observation because the sample denominator would be n − 1 = 0.
This difference is mathematical rather than a display limitation.
Input and interpretation boundaries
The calculator accepts finite unweighted numerical observations and treats them as one dataset in the order entered.
It does not interpret frequency tables, weights, measurement units, sampling design, clusters, repeated-measure structure, missing-value codes, or categorical information.
It also does not test normality, identify outliers, calculate confidence intervals, or decide whether population or sample statistics are appropriate for the research question.
The arithmetic can be computed from the numbers alone; interpreting that arithmetic still depends on how the data were collected and what they are meant to represent.
Standard deviation and variance formulas
Population and sample calculations use the same mean and sum of squared deviations. Population variance divides SS by n, while sample variance divides SS by n − 1.
- Each entered observation
- Arithmetic mean
- Number of observations
- Sum of squared deviations from the mean
- Population variance
- Population standard deviation
- Sample variance using n − 1
- Conventional sample standard deviation
- The population or sample standard deviation selected for display
Examples
Canonical population dataset
2, 4, 4, 4, 5, 5, 7, 9
Count = 8; sum = 40; mean = 5; SS = 32; population variance = 4; population standard deviation = 2.
Use the population result when these eight values are the complete group being described.
The same observations treated as a sample
2, 4, 4, 4, 5, 5, 7, 9
Sample variance = 32 ÷ 7 ≈ 4.571428571; sample standard deviation ≈ 2.138089935.
The mean and sum of squared deviations do not change. Only the denominator changes.
Large offset with small spread
1,000,000,001; 1,000,000,002; 1,000,000,003
Mean = 1,000,000,002; population variance ≈ 0.6666666667; population standard deviation ≈ 0.8164965809.
Adding one billion to each observation changes the mean but does not change the variance or standard deviation.
Changing measurement scale
1, 2, 3 metres compared with 100, 200, 300 centimetres.
The standard deviation in centimetres is 100 times the standard deviation in metres, while the variance is 10,000 times as large numerically.
Spread statistics remain tied to the measurement scale.
One extreme observation
10, 10, 10, 10, 50
Mean = 18; SS = 1,280; population variance = 256; population standard deviation = 16.
The value 50 alone contributes 1,024 of the 1,280 squared-deviation units.
One entered observation
42
Population variance = 0 and population standard deviation = 0. Sample variance and sample standard deviation are unavailable.
For a sample of one observation, n − 1 equals zero.
Frequently Asked Questions
Should I use sample or population standard deviation?
Use population standard deviation when the observations are the complete group you want to describe. Use sample standard deviation when those observations are intended to estimate variability in a wider population or process.
Does a small dataset automatically mean I should use sample standard deviation?
No. Dataset size alone does not determine the choice. A small dataset can be the complete population of interest, while a very large dataset can still be a sample of a larger process.
What is the difference between population and sample standard deviation?
They use the same deviations from the mean. Population variance divides their squared sum by n, while conventional sample variance divides by n − 1 before the square root is taken.
Why is sample standard deviation usually larger?
For the same nonconstant dataset, dividing the same sum of squares by n − 1 instead of n produces a larger variance and therefore a larger standard deviation.
Does n − 1 make sample standard deviation unbiased?
Not exactly. Under standard sampling assumptions, dividing by n − 1 makes sample variance unbiased for population variance. Taking the square root introduces some bias into the conventional sample standard deviation.
What is variance?
Variance measures spread using squared deviations from the mean. Population variance averages them using n; sample variance uses the corrected denominator n − 1.
What is the difference between variance and standard deviation?
Variance is expressed in squared measurement units. Standard deviation is the square root of variance, so it returns to the original measurement unit.
What is SS in the calculation details?
SS is the sum of squared deviations from the mean. It is the numerator used in both the population and sample variance formulas.
Can standard deviation be negative?
No. Variance is formed from squared deviations and therefore cannot be negative. Standard deviation is defined as the non-negative square root of variance.
Can standard deviation be zero?
Yes. Standard deviation is zero when every observation in the dataset has exactly the same value.
Why is sample standard deviation unavailable for one value?
Sample variance requires division by n − 1. With one observation, that denominator is zero.
Does low standard deviation mean the values are accurate?
No. A low standard deviation means the observations are close to their own mean. They can still all be biased or systematically incorrect.
Do outliers affect standard deviation?
Yes. Because deviations are squared, observations far from the mean can have a large effect on the result.
Should I remove an outlier before calculating standard deviation?
Not automatically. First determine whether the observation is an error, a legitimate extreme event, or evidence about the underlying distribution or process.
Does mean ± one standard deviation always contain 68% of the data?
No. The approximately 68% figure belongs to an approximately normal distribution. The calculator's mean ± 1 SD interval is descriptive and does not assume normality.
Is the spread overview a distribution graph?
No. It shows the observed minimum, mean, maximum, and mean ± one selected standard deviation on a common scale. It does not show frequencies or estimate the distribution's shape.
Does the calculator test whether my data are normally distributed?
No. It calculates descriptive statistics but does not perform a normality test or fit a probability distribution.
Why can a large offset cause problems in some variance formulas?
Computing variance by subtracting two very large, nearly equal quantities can lose floating-point precision. This calculator instead updates the mean and squared-deviation total incrementally.
What does the display precision setting do?
It changes how many significant digits are shown. It does not round the underlying dataset or intermediate statistical calculation.
Why are some results shown in scientific notation?
Scientific notation keeps very large or very small nonzero results readable and avoids making small values appear to be zero because of display formatting.
What separators can I use?
Values can be separated with commas, spaces, semicolons, or line breaks.
How many values can I enter?
The calculator supports up to 100,000 finite numerical observations in one dataset.
Why does the deviation table stop after 100 rows?
The detailed table is limited to the first 100 observations to keep a large result usable. Every entered observation is still included in the statistical calculation.