Standard Deviation Calculator

Paste your data, choose sample or population, get results with step-by-step breakdown.

Decimals, negatives, and scientific notation (1e3) accepted.

Count (n)
Mean
Std Dev
Variance
Sum
Min
Max
Range

Sample vs population: which do I use?

Use sample standard deviation (n−1) when your data represents a subset drawn from a larger group—for example, survey responses from 50 students in a class of 500, or test scores from a random sample of applicants. The n−1 divisor (called Bessel's correction) adjusts for the fact that you're estimating the population's spread using incomplete information. Dividing by n−1 instead of n gives a more accurate, unbiased estimate of the true population standard deviation.

Use population standard deviation (n) when you have data for an entire group or when you're measuring the spread of the data itself with no intention to estimate beyond it—for instance, test scores for all students in one section, or measurements of every item in a batch you control. The divisor is simply the total count.

The formulas

Sample Standard Deviation
s = √[Σ(x − x̄)² ÷ (n − 1)]
Population Standard Deviation
σ = √[Σ(x − μ)² ÷ n]

where x̄ (or μ) is the mean, Σ denotes summation, and the divisor reflects your data context—use n−1 for a sample, n for a population.

Worked example

Suppose we measure the heights of six randomly selected plants (in cm): 15.2, 18.5, 16.1, 17.8, 16.9, 18.0. Since this is a sample, we use n−1.

Count (n) 6
Sum 102.5 cm
Mean (x̄) 102.5 ÷ 6 = 17.083 cm
Σ(x − x̄)² 3.481
Variance (s²) 3.481 ÷ 5 = 0.696
Std Dev (s) √0.696 = 0.834 cm

This tells us that the plant heights typically vary by about 0.83 cm from their mean of 17.08 cm.

FAQ

Why divide by n−1 instead of n for a sample?

Dividing by n−1 (Bessel's correction) produces an unbiased estimate of the population variance. When you calculate the mean from your sample, you've already used one degree of freedom in your data, leaving only n−1 independent pieces of information to estimate spread. Dividing by n would systematically underestimate variability. For large samples the difference is small, but for small samples (n < 20) it matters.

What does "standard deviation" actually mean?

Standard deviation measures how far, on average, your data points lie from the mean. A small standard deviation means data clusters tightly around the mean; a large one means values are spread out. It's measured in the same units as your data, making it intuitive to interpret.

What's the difference between standard deviation and variance?

Variance is the average of squared deviations from the mean. Standard deviation is the square root of variance. Because variance uses squared units, standard deviation is often easier to interpret—it's in the original units of your data. In this calculator, both are shown.

Can standard deviation be zero?

Yes. If all your data values are identical, the standard deviation is exactly 0—there is no spread. This is not an error; it's a valid result. The calculator will display it correctly.

What if I have only one data point and Sample is selected?

The sample standard deviation becomes undefined (you'd divide by zero). The calculator detects this and shows a clear message asking you to either add more data or switch to Population mode, which is valid for a single value (SD = 0).

What format should my data be in?

Paste numbers however they come: comma-separated (1, 2, 3), space-separated (1 2 3), tab-separated, or one per line. The calculator automatically parses them. Decimals, negative numbers, and scientific notation (1e3 for 1000) all work. Non-numeric tokens are silently ignored, but the calculator warns you how many were skipped.

Sources