Tools Math & Science Variance Calculator

Variance Calculator: Sample and Population

Math & Science Active

Measures how spread out a list of numbers is, showing both variance types and the sum of squared deviations.

Variance Calculator

📊 Variance Calculator

Separate values with commas, spaces, semicolons or line breaks. A comma is always a separator, so thousands separators like 1,200 are not supported (type 1200).

Variance Statistics
Sample Variance (s²)
74.666667
Population Variance (σ²)
64
Sum of Squared Deviations (SS)
448
Number of Values (N)
7

Rate This Tool

Your feedback helps others discover great tools

–
out of 5
No ratings yet

Tap a star to rate:

About This Tool

How spread out are your numbers? Two classes can share the same average score and still look very different. The Variance Calculator measures that spread for any list of numbers.

It is made for statistics students, researchers, and anyone comparing consistency in scores, prices, or measurements. It shows both sample variance and population variance side by side.

Table of Contents

  • What the Variance Calculator Does
  • How to Use It, Step by Step
  • The Variance Formulas
  • Worked Examples
  • How to Read the Results
  • Sample or Population Variance
  • Entering Numbers Correctly
  • Limitations and Assumptions
  • FAQs About the Variance Calculator

What the Variance Calculator Does

The tool reads one list of numbers and shows four results under the heading Variance Statistics.

  • Sample Variance (s²): the sum of squared deviations divided by N - 1.
  • Population Variance (σ²): the sum of squared deviations divided by N.
  • Sum of Squared Deviations (SS): the total of each number's squared distance from the mean.
  • Number of Values (N): how many numbers the tool read.

It does not show the mean or the standard deviation. All results are shown with up to six decimals.

How to Use It, Step by Step

  1. Click the box labeled Enter Dataset Numbers (comma or space separated). It starts with a sample list of seven numbers.
  2. Replace the sample with your own numbers. Separate them with commas, semicolons, spaces, or line breaks.
  3. Enter at least two numbers.
  4. Watch the results update as you type, or press Calculate Variance or Ctrl+Enter.
  5. Pick the variance that fits your data, then edit the list to try again.

Plain Enter adds a line break, which also separates numbers.

The Variance Formulas

The tool measures each number's distance from the mean, squares it, and adds the squares to get SS. It uses Welford's single pass method, which stays stable on large or close values. The result equals the textbook two step formula.

Sum of (Value - Mean) Squared÷N - 1 (Sample) or N (Population)=Variance
  • Mean = (x1 + x2 + ... + xN) ÷ N.
  • SS = (x1 - mean)² + (x2 - mean)² + ... + (xN - mean)².
  • Sample variance s² = SS ÷ (N - 1).
  • Population variance σ² = SS ÷ N.

Worked Examples

Omar records how many emails he answers on six days: 4, 8, 6, 5, 3, 7. The numbers add up to 33, so the mean is 5.5.

NumberMinus MeanSquared
4-1.52.25
82.56.25
60.50.25
5-0.50.25
3-2.56.25
71.52.25

The squares add up to 17.5, so SS is shown as 17.5. Sample variance is 17.5 ÷ 5, shown as 3.5. Population variance is 17.5 ÷ 6, shown as 2.916667. N is 6.

A classic textbook list is 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5 and SS is 32. The tool shows a population variance of 4 and a sample variance of 4.571429.

The sample list gives a mean of 20 and an SS of 448. Its sample variance is 74.666667, and its population variance is 64.

How to Read the Results

A larger variance means the numbers are more spread out. A variance of 0 means all numbers match. Results show up to six decimals, with extra zeros removed.

Values below 0.0001 or from 1e15 upward appear in exponent form. The pair 0.001 and 0.002 gives a sample variance of 5e-7 and a population variance of 2.5e-7. For 1e11 and 2e11 the sample variance shows 5e+21.

Variance is in squared units. If your data is in dollars, the variance is in squared dollars. This is why many people take the square root and report the standard deviation instead.

Sum of Squared Deviations is the building block for both variances. Number of Values (N) lets you confirm every number was read.

Sample or Population Variance

Use population variance when your list holds every member of the group, such as all students in one class. Use sample variance when your list is a sample from a larger group.

A sample tends to understate the spread of the full group. Dividing by N - 1 corrects for that. The two results get closer as N grows.

For the square root, use the standard deviation calculator. To find the mean first, use the average calculator.

The z-score calculator shows how far one value sits from the mean. The confidence interval calculator uses spread to estimate a range for a mean.

To study how two lists move together, try the correlation coefficient calculator. You can also browse the math and science calculators hub.

Entering Numbers Correctly

The tool splits your text at commas, semicolons, spaces, and line breaks. A comma is always a separator, so 1,200 is read as two numbers, 1 and 200. The page says this under the box. Type 1200 with no comma.

Use a period for decimals and a hyphen or unicode minus sign for negatives. Exponent forms like 1e3 also work.

Every entry must be a plain number. If one is not, a red message appears. It names the first bad entry, such as Could not read "12kg" as a number. The results card is hidden until you fix it.

Entries like 5-3, 1/3, Infinity, and NaN are rejected the same way. One number shows Needs at least 2 values. An empty box asks for at least two numbers.

Limitations and Assumptions

  • The tool needs at least two numbers. With fewer, it shows a message and hides the results.
  • The tool cannot take weights, frequencies, or grouped data.
  • It uses the mean of your list. It cannot use a known true mean that you supply.
  • Extremely large numbers can overflow. Then you see Result too large to display, as with 1e200 and -1e200.
  • There is no copy button and no reset button.

FAQs About the Variance Calculator

What is the difference between sample and population variance?

Population variance divides by N and treats your list as the whole group. Sample variance divides by N - 1 and treats it as a sample.

Why does the tool need two numbers?

Sample variance divides by N - 1, which would be zero for a single number. The tool therefore asks for at least two.

Is a bigger variance better or worse?

Neither. It only describes spread. A large variance means less consistency, which can matter for quality control or investing.

Can variance be negative?

No. Every squared deviation is zero or positive, so variance is never negative. A result of 0 means no spread.

Why are the units squared?

The tool squares each distance from the mean. Squared distances are measured in squared units, so variance of meters is in square meters.

Does the tool show standard deviation?

No. Take the square root of either variance to get it, or use the standard deviation calculator linked above.

This calculator gives general estimates only and is not professional advice. Reviewed for general accuracy by Prof. Dr. Khalil Mudassar, PhD.

Category: Math & Science

You May Also Like

View All