#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
📐 FREE · STEP TABLE

Variance Calculator: Sample or Population, With Every Step

See how far your values spread from the mean, with the full working table.

  • 👥 Sample (n − 1) or population (n)
  • 🧾 Deviation table
  • 📏 Standard deviation too

How to use the Variance Calculator

  1. 1. Paste your valuesEnter numbers separated by commas, spaces or new lines.
  2. 2. Pick sample or populationUse sample unless your list is the whole group.
  3. 3. Read the workingSee the mean, each deviation, the squares and the result.

Formula and worked example

Variance is the average squared distance from the mean. For a population: σ² = Σ(x − μ)² ÷ n. For a sample: s² = Σ(x − x̄)² ÷ (n − 1). The standard deviation is the square root of the variance and is in the same units as your data.

Worked example: 2, 4, 4, 4, 5, 5, 7, 9 has a mean of 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. Population variance is 32 ÷ 8 = 4 (SD 2). Sample variance is 32 ÷ 7 = 4.5714 (SD 2.1381).

Sample or population?

Use the population formula only when your list includes every member of the group you care about, such as the marks of every student in one class when you only care about that class. In almost all data work you have a sample and want to describe a bigger group, so use n − 1. This is called Bessel's correction: the sample mean sits closer to its own data than the true mean does, so dividing by n would underestimate the spread.

  • Excel: VAR.S and STDEV.S for samples; VAR.P and STDEV.P for populations.
  • NumPy: np.var(x) divides by n by default; use ddof=1 for samples.
  • pandas: df.var() uses n − 1 by default.

Squaring makes big deviations count more, so variance is sensitive to outliers. Check for them with the outlier detector, or get the SD alone from the standard deviation calculator.

Frequently asked questions

Why is variance in squared units?

Because deviations are squared. That is why the standard deviation, its square root, is easier to interpret.

Can variance be negative?

No. It is a sum of squares, so the smallest possible value is 0, when every value is the same.

Is the Variance Calculator free?

Yes, the Variance Calculator is free. The first time you see your first result, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.

More free tools

See all free tools