- What's the difference between sample variance and population variance?
- The divisor. Population variance (σ²) divides the sum of squares by n. Sample variance (s²) divides by n − 1. The reason isn't arbitrary: when you only have a sample, you don't know the true mean, so you use the sample's own mean instead — and a sample's values always sit slightly closer to their own mean than to the true one. That makes the sum of squares a little too small, which would bias the variance downward. Dividing by n − 1 instead of n inflates the result by exactly the right amount to correct for it (this is Bessel's correction). Use sample when your numbers are drawn from a larger group: survey responses, test scores from one class, measurements from a production run. Use population when your numbers ARE the whole group: every employee's salary at a 12-person company, all six faces of a die.
- How is variance calculated, step by step?
- Four steps. First, add up all the values and divide by how many there are — that's the mean. Second, subtract the mean from each value to get that value's deviation; some will be negative. Third, square each deviation (this is why negatives stop mattering, and why the units end up squared) and add them all up — that total is the sum of squares, SS. Fourth, divide SS by n − 1 for sample variance or by n for population variance. The work table on this page shows steps two and three for every one of your values, and the formula line underneath shows step four with your real numbers in it rather than symbols.
- Why is the variance in squared units, and what do I do about it?
- Because step three squares every deviation. If you're measuring heights in centimetres, the variance comes out in square centimetres — a number that's mathematically useful and physically meaningless. That's the whole reason standard deviation exists: it's the square root of the variance, which puts the spread back into the original units so you can say "about 1.87 points" instead of "3.5 points squared." Variance is the quantity that behaves well in algebra (variances of independent things add together; standard deviations don't). Standard deviation is the quantity you quote to a human. This page gives you both.
- Why does 1000000.1, 1000000.2, 1000000.3 break some variance calculators?
- Because they use the algebraic shortcut: variance = the mean of the squares minus the square of the mean. It's correct on paper and one pass faster, but on a computer it subtracts two nearly identical large numbers, and almost all the meaningful digits cancel out. On that data set the shortcut returns 0.01025390625 where the true sample variance is 0.01 — about 2.5% off, from arithmetic that's supposed to be exact. This calculator uses the two-pass method instead: compute the mean, then sum the squared deviations. It costs one extra loop over your data and stays accurate no matter how large the values are. If you've ever gotten a slightly-wrong answer out of a spreadsheet or a calculator on big numbers, this is usually why.
- What happens if I enter just one number?
- In Population mode you get a variance of 0, which is correct — a single data point has no spread. In Sample mode the variance is undefined, because the formula divides by n − 1 and that's zero. The calculator shows an em-dash and tells you to switch to Population rather than printing NaN, Infinity, or a misleading 0. It's a genuinely undefined quantity, not an error on your part.
- Can I paste a column from Excel or Google Sheets?
- Yes — that's the main way people use this. Select the column, copy, paste into the box. Line breaks and tabs are both treated as separators, so a single column or a row of tab-separated cells both come through correctly. There's no limit on how many values you paste; ten thousand computes instantly, and the work table collapses to the first 20 rows with an expander so the page stays usable. Anything in the paste that isn't a number gets skipped, and the calculator tells you how many it skipped rather than silently folding a header row into your data.
- What is the sum of squares (SS), and why is it shown separately?
- SS is the total of every squared deviation — the numerator of the variance formula, before you divide by anything. It's shown separately for two reasons. Practically, most homework problems ask you to report it as an intermediate step. Conceptually, it's the quantity that actually measures total spread; the division at the end is just averaging that spread across your data points. Once you have SS, both variances are one division away: SS ÷ (n − 1) for sample, SS ÷ n for population. That's why switching the toggle on this page recomputes instantly — the expensive part is already done.
- Does the order of my numbers matter?
- No. Variance depends only on which values are in the set, not the order they arrive in, so 4, 8, 6 and 8, 6, 4 give identical results. The only thing order changes is the row order of the work table, which follows your input so you can match rows back to your source data. Duplicate values do matter, though — they're counted separately and pull the mean toward themselves, exactly as they should.
- Is my data sent anywhere?
- No. Every calculation runs in your browser. There's no request that carries your numbers off the device, no account, no saved history — refresh the page and the box is empty again. Most statistics tools that show this much working are a menu item inside a licensed package, or a page that posts your data to a server and reloads to show you six numbers. This one is just the calculator.
- How many decimal places does it show?
- Four, with trailing zeros trimmed — so a variance of exactly 3.5 shows as 3.5, not 3.5000, and a standard deviation of 1.8708286… shows as 1.8708. Large numbers are shown in full with thousands separators rather than scientific notation, because "1.2e+6" is not an answer anyone wants to copy into a homework sheet. The Copy button gives you the number without the separators so it pastes cleanly into a spreadsheet.