Standard Deviation Calculator: Sample & Population
Calculate standard deviation, variance and mean from a list of numbers. Choose whether the list represents a sample or the complete population you want to describe. Values do not need to follow a normal distribution for these descriptive calculations.
Sample vs population standard deviation
Choose Population (divide by n) when your list is the full group you want to describe. Choose Sample (divide by n - 1) when you use observations to estimate variability in a broader population under the usual sampling assumptions. The sample variance uses Bessel's correction; taking its square root does not make sample standard deviation exactly unbiased.
Sample standard deviation needs at least two values. One population value has zero variance and zero standard deviation. A list of identical values also has zero spread. These outcomes describe the supplied numbers, not uncertainty about unobserved data.
How to calculate standard deviation
First calculate the arithmetic mean: add the numbers and divide by their count n. Subtract the mean from each observation, square each difference and add the squares. This gives the sum of squared deviations.
Population variance = sum of squared deviations / n. Sample variance = sum of squared deviations / (n - 1). Standard deviation is the square root of the chosen variance. Variance has squared measurement units; standard deviation has the original measurement units.
Worked example
Enter Numbers as 2 4 4 4 5 5 7 9. Choose Calculation type Population (divide by n), then select Calculate standard deviation. Count is 8, mean is 5 and sum of squared deviations is 32. Population variance is 32 / 8 = 4, and population standard deviation is 2.
Change Calculation type to Sample (divide by n - 1) and calculate again. The same squared deviations are divided by 7. Sample variance is 4.571429 and sample standard deviation is 2.138090, rounded. The data and mean stay the same; only the divisor changes.
Negative numbers, decimals and outliers
Negative values and decimal measurements work with the same formulas. Standard deviation cannot be negative because it comes from squared differences. An unusually large or small observation can substantially increase it. Check surprising values against your source rather than removing them automatically.
These results do not test normality or produce confidence intervals, p-values or standard errors. The 68-95-99.7 rule requires an approximately normal distribution and should not be applied to an arbitrary list. For standardized values under a normal model, see the Z-Score Calculator.
Input limits and precision
Enter up to 10000 numbers, each between -1000000000000 and 1000000000000, in a list of at most 200000 characters. The tool treats every entry as one observation, including duplicates. It does not accept frequency tables or assign weights. Blank entries are separators; text such as NA must be removed or handled in your source before calculation.
The implementation shifts values before computing the mean and squared deviations to reduce cancellation when numbers share a large offset. Input values still use finite floating-point precision, so differences smaller than that precision can be lost. Very small squared differences can underflow. Use a suitable numerical analysis tool if such extremes matter to your work.
For a step-by-step walkthrough, read How to Calculate Standard Deviation: Sample and Population.
Privacy
The calculator processes entries locally in your browser and does not save or transmit your list. The hosting website may use separate analytics or advertising services.
Comments
Post a Comment