Skip to content
BestCalculators
Free online calculators and converters

Math & Statistics

Standard Deviation Calculator: Sample and Population

Work out standard deviation, variance, mean, median and range from a list of numbers — with the sample and population figures side by side.

Paste a column from a spreadsheet, a comma-separated line, or type one per line — all three work.

Sample standard deviation

6.803361

Divides by n−1. Use this when the 7 values are a sample of something larger — the population figure is 6.298688.

Population standard deviation
6.298688

Divides by n. Use this only when your numbers are the entire population, not a sample of it.

Sample variance
46.285714
Population variance
39.673469
Count
7values
Sum
150
Mean
21.428571
Median
22

The middle value. When it sits far from the mean, the data is skewed and the mean alone will mislead.

Smallest
12
Largest
31
Range
19
Standard error of the mean
2.571429

How much the mean itself would wobble across repeated samples. It shrinks with the square root of n, which is why quadrupling a sample only halves the error.

Coefficient of variation
31.75%

Spread relative to the mean, so two datasets in different units can be compared.

How to use this calculator

  1. Paste your numbers into the Your numbers field, entering them as a comma-separated line, one value per line, or a copied spreadsheet column.
  2. Review the calculated count, sum, mean, median, smallest, largest, and range to check your raw dataset for entry errors.
  3. Examine the headline Sample standard deviation alongside the population standard deviation to see how your spread changes based on your data source.
  4. Check the sample variance and population variance values if your downstream analysis requires squared units.
  5. Use the standard error of the mean and coefficient of variation for advanced comparative tasks.

Understanding Spread and Variability

When analyzing a dataset, knowing the average only tells part of the story. Two groups of test scores can share an identical mean of 75, yet one might contain scores clustered tightly between 70 and 80, while the other features scores swinging wildly from 30 to 100. This is where standard deviation becomes essential. It measures how far individual data points typically sit from the center of the set, expressed in the exact same units as the original values.

To find this measure of spread, the calculation begins by determining the mean. Next, every individual data point has that mean subtracted from it, yielding a set of deviations. Because points fall on both sides of the center, these positive and negative differences would cancel each other out if added directly. To fix this, every deviation is squared. The variance is the average of these squared distances. Taking the square root of that variance reverses the squaring process, bringing the final metric back to the original scale of your data.

Sample Versus Population

The single most crucial distinction in applied statistics is whether your numbers represent an entire population or merely a sample drawn from it. A population includes every single member of the group you wish to study, such as every employee in a 500-person firm. A sample is a smaller subset, like a randomly selected group of 30 employees whose wages you survey to estimate the wider company's compensation profile.

When you calculate a population standard deviation, you divide the sum of squared deviations by the total count of values, denoted as n. However, when working with a sample, relying on n produces a value that systematically underestimates the true spread of the broader group. To correct this downward bias, the mathematical formula for a sample standard deviation divides by n - 1 instead of n, an adjustment known as Bessel's correction. This subtle shift scales up the result slightly to account for the uncertainty inherent in looking at only a portion of the whole.

Interpreting Secondary Metrics

Beyond primary spread figures, raw datasets require descriptive statistics to give context to outliers and central tendencies. The mean median range calculator functions built into this environment provide a complete diagnostic profile of your figures. The median pinpoints the exact middle value when data is sorted in ascending order, protecting your analysis from the skewing effect of extreme outliers that pull the mean off center.

Advanced statistical evaluations often require the standard error of the mean, which measures how far your sample mean is likely to fall from the true population mean. It is computed by dividing the sample standard deviation by the square root of the count. Meanwhile, the coefficient of variation expresses dispersion relative to the size of the mean as a percentage, allowing you to compare the relative variability of datasets with vastly different scales, such as comparing the volatility of a five-dollar item against a fifty-thousand-dollar asset.

StatisticWhat It MeasuresWhen to Use It
MeanThe arithmetic average of all valuesWhen data is symmetrically distributed without extreme outliers
MedianThe middle value in ranked orderWhen skewed distributions or extreme outliers are present
RangeThe span between smallest and largest valuesTo quickly gauge the absolute limits of your dataset
Sample VarianceThe averaged squared deviation using n - 1When analyzing a subset meant to represent a larger group

Common Pitfalls and Limitations

A frequent error in statistical data entry involves mixing formats, such as including text characters, currency symbols, or blank rows inside a spreadsheet column pasted directly into the input box. Non-numeric entries can disrupt calculations or cause parsing errors, throwing off the count and rendering the mean and variance incorrect. Always sanitize your columns to ensure every row contains pure numerical data before running computations.

Standard deviation assumes a roughly bell-shaped distribution for many common inferential shortcuts, but it can mislead analysts when applied blindly to heavily skewed or multimodal data. If a dataset contains extreme outliers, the resulting variance can balloon unrealistically, masking underlying patterns. When datasets exhibit severe non-normal characteristics, consulting a qualified statistician or utilizing non-parametric methods is recommended over relying solely on standard deviation.

The formula

mean x̄ = Σx ÷ npopulation variance σ² = Σ(x − x̄)² ÷ nsample variance s² = Σ(x − x̄)² ÷ (n − 1)standard deviation is the square root of the variancestandard error = s ÷ √n

Frequently asked questions

What is the difference between sample and population standard deviation?

The population figure divides the sum of squared differences by the total count of values, assuming you have data for every single member of the group. The sample figure divides by the count minus one, applying Bessel's correction to account for the uncertainty of estimating a wider group from a smaller subset.

Why do we square the deviations before finding the variance?

Squaring the distances prevents positive and negative deviations from canceling each other out when they are added together. Without this step, values sitting above and below the mean would sum to zero, hiding the true amount of spread present in the dataset.

When should I use the median instead of the mean?

You should use the median when your dataset contains extreme outliers or severe skewness that would artificially pull the arithmetic average in one direction. For instance, household income figures are best represented by the median because a few ultra-high earners distort the mean.

How does sample size affect the standard error of the mean?

The standard error decreases as your sample size increases because dividing by a larger square root reduces overall uncertainty. Larger datasets provide a more precise estimate of the true population mean, narrowing the expected margin of fluctuation.

Can standard deviation ever be a negative number?

No, standard deviation cannot be negative because it is defined as the principal square root of the variance. Since variance is calculated from squared deviations which are always positive, its square root must also be zero or a positive value.

Last reviewed . Results are for general guidance and are not professional advice.