Calculate Sample Variance (s2) Step by Step

Updated 5 Dec 2026 · By , HisaabHub · How we check

Quick answer: to calculate sample variance, find the mean, square each difference from the mean, add them and divide by n - 1. For 4, 8, 6, 5, 3 the mean is 5.2 and the sample variance is 3.7.

Advertisement

How to calculate variance of a sample

  1. Add the values and divide by n to get the mean.
  2. Subtract the mean from each value and square it.
  3. Add all squares.
  4. Divide by n - 1 (sample) or n (population).
  5. Square root of the variance is the standard deviation (here 1.92).

Roman Urdu: Har value ka mean se farq lein, square karein, jama karke n-1 se taqseem karein.

Calculate Sample Variance table

Quick reference values you can check your own numbers against.

Calculate Sample Variance table
Value xx - mean (5.2)(x - mean) squared
4-1.21.44
82.87.84
60.80.64
5-0.20.04
3-2.24.84
Sum014.8
Sample variance (n-1)3.7
Population variance (n)2.96

Sample variance divides by n - 1; population variance divides by n.

Advertisement

Sample vs population variance

Use n - 1 when your numbers are only a sample of a bigger group, for example 30 shops out of all shops. For a full list of numbers use the Variance Calculator, the Mean, Median, Mode Calculator and the calculators hub.

Official sources

Questions people ask

How do I calculate sample variance?
Sum the squared differences from the mean and divide by n - 1.
How do I calculate variance of a sample by hand?
Find the mean, square each difference, add them up and divide by n - 1.
Why divide by n - 1?
It corrects the bias that comes from estimating the mean from the same sample.
What is the sample variance of 4, 8, 6, 5, 3?
3.7, and the standard deviation is about 1.92.
How do I calculate the variance of a portfolio?
Weight each asset, then combine the variances and the covariances between assets. A single list of returns uses the sample formula above.
Advertisement