Przejdź do treści
Liczbnik

Variance and Standard Deviation Calculator

Enter numbers separated by commas, choose sample or population, and the calculator will compute variance, standard deviation and the arithmetic mean of your data set.

Reviewed byRedakcja Liczbnik
Calculator
Statistical resultsVariance4.57
Standard deviation
2.14
Arithmetic mean
5
Count
8

How we calculate variance

We compute the arithmetic mean, then sum the squared deviations of each value from the mean. Divide by N (population) or n-1 (sample). Standard deviation = square root of variance. Results are rounded to 6 decimal places.

Example: data set [2, 4, 4, 4, 5, 5, 7, 9]

For [2, 4, 4, 4, 5, 5, 7, 9]: mean = 5, population variance = 4, standard deviation = 2. For sample (n-1): variance ≈ 4.571, standard deviation ≈ 2.138.

Frequently asked questions

What is variance?

Variance is a measure of how spread out a data set is around its mean. A variance of zero means all values are identical. Higher variance indicates greater spread. It is a fundamental concept in statistics used in data analysis, finance, and science.

What is the formula for variance?

Population: sigma^2 = sum(xi - mean)^2 / N. Sample: s^2 = sum(xi - mean)^2 / (n-1). Here xi are individual values, mean is the arithmetic mean, and N or n is the count. The (n-1) denominator for samples is called Bessel's correction — it corrects the underestimation of population variance.

What is the difference between variance and standard deviation?

Variance is expressed in squared units (e.g. cm^2 if measuring length in cm), which makes interpretation harder. Standard deviation is the square root of variance and uses the same units as the data. In practice standard deviation is reported more often, while variance is an intermediate calculation step.

When should I use sample (n-1) vs population (n)?

Use population (divisor N) when your data covers the entire population — e.g. all students in a class. Use sample (divisor n-1) when your data is a random sample from a larger population — e.g. a survey of 100 people. For large data sets the difference is minimal, but for small samples the corrected formula gives a better estimate.

Why can variance never be negative?

Variance is a sum of squared deviations from the mean. Every term is non-negative (the square of any real number is >= 0), so the sum is also non-negative. Variance equals zero only when all values in the data set are identical.

How do I calculate variance step by step?

1) Compute the arithmetic mean. 2) Subtract the mean from each value. 3) Square each difference. 4) Sum all the squares. 5) Divide by N (population) or n-1 (sample). Example for [2, 4, 6]: mean=4, deviations: -2, 0, 2; squares: 4, 0, 4; sum=8; population variance = 8/3 ≈ 2.67.

Indicative result

Results are for informational purposes. The calculator assumes the entered numbers form the complete data set for analysis.
  • Standard Deviation Calculator

    Calculate standard deviation and variance for a sample or population. Enter numbers separated by commas — instant result, no signup needed.

    Statistics
  • Mean, Median and Mode Calculator

    Calculate the mean, median, mode, range, sum and count for any set of numbers. Enter values separated by commas or spaces. Free, instant, no signup required.

    Statistics