Free Statistics Calculator with Steps

Enter one data set and get the mean, median, mode, range, variance, and standard deviation together — with every substitution written out, so you can see exactly how each number was produced, not just what it is.

Statistics Calculator

Paste your data set to get the mean, median, mode, range, variance, and standard deviation — with every step shown.

Separate numbers with commas, spaces, or new lines. Decimals and negatives are fine.

Variance & standard deviation type

Mean (x̄)

5

Median

4.5

Mode

4

appears 3×

Range

7

Sample variance

4.571429

divides by n − 1

Sample std. deviation

2.13809

√ of sample variance

n = 8
Sum = 40
Min = 2
Max = 9

1Count and sort the data

You entered n = 8 values. Sorted from smallest to largest:

2, 4, 4, 4, 5, 5, 7, 9

2Mean — add everything, divide by n

x̄ = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5

3Median — the middle of the sorted list

n = 8 is even, so there are two middle values: position 4 (4) and position 5 (5). Average them:

median = (4 + 5) ÷ 2 = 4.5

4Mode — the most frequent value(s)

2 ×1
4 ×3
5 ×2
7 ×1
9 ×1

4 appears 3 times — more than any other value — so it is the mode.

5Range — largest minus smallest

range = 92 = 7

6Sample variance — average squared distance from the mean

Subtract the mean x̄ = 5 from each value, square the result, then add the squares:

xx − x̄(x − x̄)²
2-39
4-11
4-11
4-11
500
500
724
9416
Σ(x − x̄)²32

Divide by n − 1 = 8 − 1 = 7 (sample data — Bessel's correction):

= 32 ÷ 7 = 4.571429

7Sample standard deviation — square root of the variance

s = √4.571429 = 2.13809

The standard deviation is in the same units as your data, which makes it easier to interpret than the variance.

The six statistics and what each one tells you

These six numbers answer two different questions about a data set. Mean, median, and mode describe the center — where the data sits. Range, variance, and standard deviation describe the spread — how far the data strays from that center. You usually need one of each to say anything useful.

The mean is the sum of all values divided by how many there are (n). The median is the middle value once the data is sorted — half the values sit below it, half above. The mode is whichever value appears most often; a data set can have one mode, several, or none at all. The range is simply the largest value minus the smallest. Variance is the average of the squared distances from the mean, and the standard deviation is the square root of the variance, which puts the spread back into the same units as your data.

  • Mean x̄ = Σx ÷ n — sensitive to outliers, since every value pulls on it
  • Median = middle of the sorted list — resistant to outliers
  • Mode = most frequent value(s) — the only one of the six that works on categories too
  • Range = max − min — quick but fragile, since it uses only two values
  • Variance = Σ(x − x̄)² ÷ n (population) or ÷ (n − 1) (sample)
  • Standard deviation = √variance — the spread in the data's own units

Sample or population? Why the calculator asks

Variance and standard deviation come in two versions, and the difference is one character in the formula: divide by n if your data is the entire population, or by n − 1 if it is a sample drawn from something larger. Ten quiz scores from a class of ten is a population. Ten shoppers surveyed out of everyone who visited the store is a sample.

The reason for n − 1 (called Bessel's correction) is that a sample's values sit closer to their own mean than to the true population mean — the sample mean is calculated from those very values, so it chases them. Dividing by n would therefore underestimate the real spread. Dividing by the slightly smaller n − 1 inflates the result just enough to correct the bias, on average.

The practical rule: if you collected the data to learn about a bigger group, use sample (n − 1). If the data is everything there is, use population (n). Most homework problems that say "a sample of..." or "a random selection of..." want n − 1, and it is the default here for that reason. The calculator labels which version it is showing, so copy the label into your answer too.

A worked example, by hand

Take the data set the calculator loads by default: 2, 4, 4, 4, 5, 5, 7, 9. There are n = 8 values and they are already sorted.

Mean: the sum is 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40, so x̄ = 40 ÷ 8 = 5. Median: with 8 values there is no single middle, so average positions 4 and 5 of the sorted list — (4 + 5) ÷ 2 = 4.5. Mode: 4 appears three times, more than any other value, so the mode is 4. Range: 9 − 2 = 7.

For the variance, subtract the mean from each value and square: (2−5)² = 9, then 1, 1, 1, 0, 0, 4, 16. The squares add to 32. As a sample, divide by n − 1 = 7: s² = 32 ÷ 7 ≈ 4.5714, and s = √4.5714 ≈ 2.1381. As a population, divide by n = 8: σ² = 4 exactly, and σ = 2. Notice the sample figures are a little larger — that is Bessel's correction doing its job.

Common mistakes that cost marks

  • Finding the median without sorting first. The median is defined on the ordered list — on unsorted data the "middle value" is meaningless.
  • Picking one mode when two values tie. If 2 and 3 both appear most often, the answer is "2 and 3 (bimodal)", not whichever you saw first. And if every value appears once, write "no mode", not the largest or the middle value.
  • Using n on sample data. Dividing by n when the question says "a sample of" gives an answer that is wrong by a factor of (n − 1)/n — small on big data sets, very noticeable on small ones.
  • Summing the deviations without squaring. The raw deviations (x − x̄) always add to zero — the positives and negatives cancel exactly. If your deviation column sums to zero, that is correct; if your squared column sums to zero, every value must be identical.
  • Rounding too early. Carry the full mean through the variance calculation and round only the final answer. Rounding x̄ = 4.5714 to 4.6 before squaring shifts every deviation.
  • Reporting variance where the question asks for standard deviation. Variance is in squared units (dollars², cm²); the standard deviation is its square root and matches the data's units.

How to check your answer

Before you hand anything in, run these quick sanity checks — they catch most arithmetic slips without redoing the whole calculation.

  • The mean must sit between the minimum and maximum. If it doesn't, the sum or the count is wrong.
  • The deviations (x − x̄) must sum to 0. This is the fastest check on your subtraction column.
  • Standard deviation is never negative, and for any data set it is smaller than the range. An SD bigger than max − min means a squaring or square-root error.
  • Sample SD is always slightly larger than population SD on the same data, because n − 1 < n. If yours came out smaller, the divisors are swapped.
  • If every value is identical, variance and SD must be exactly 0 and the range 0 — a useful edge case to test any calculator, including this one.
  • Units: SD carries the data's units, variance carries them squared. If the data is in minutes, an SD of "12 minutes²" is a sign the square root was skipped.

Related free tools

Frequently Asked Questions

When do I divide by n − 1 instead of n?

Divide by n − 1 when your data is a sample taken from a larger group, and by n when it is the entire population. Sample values sit unnaturally close to their own mean, so dividing by n would understate the true spread; the smaller divisor n − 1 corrects that bias. Homework phrasing like "a sample of 12 students" almost always means n − 1.

What if two numbers appear the same number of times?

If two or more values tie for the highest frequency, they are all modes — the data set is bimodal (or multimodal) and you list every one of them. If no value repeats at all, the data set has no mode. Never pick just one of the tied values; that is a marked error, and this calculator lists all of them for the same reason.

How do I find the median with an even number of values?

Sort the data, then average the two middle values. With n = 8, those are the 4th and 5th values of the sorted list: if they are 4 and 5, the median is (4 + 5) ÷ 2 = 4.5. The median does not have to be a value that actually appears in the data. The steps panel shows you exactly which two positions were averaged.

Why is the variance so much bigger than the standard deviation?

Because variance is measured in squared units. If your data is in centimeters, the variance is in cm², and squaring inflates any spread bigger than 1. The standard deviation is the square root of the variance, which brings the number back to the data's own units — that is why SD is the one usually reported.

Can the standard deviation be zero or negative?

It can be zero, but only when every value in the data set is identical — there is no spread to measure. It can never be negative: it is built from squared distances, which are never negative, and a square root, which is taken as the non-negative value. If you calculated a negative SD, a subtraction or squaring step went wrong.

Does the order I enter the numbers in matter?

No. The calculator (and the formulas) sort the data internally before finding the median, and the mean, mode, range, variance, and SD do not depend on order at all. You can paste values comma-separated, space-separated, or one per line, in any order — the steps panel shows you the sorted version it worked from.

Continue in the app

Use Statistics AI: Statikia for the full guided result after this quick check.

Download on the App Store
Get it on Google Play