Statistics Calculator

Mean, median, mode, standard deviation, variance and quartiles — calculated live, with the step-by-step working your teacher wants to see.

Flat vector illustration of charts and graphs for statistics

Step-by-step working

—

The quick answer, with the training dataset everyone learns on

Take the classic dataset 2, 4, 4, 4, 5, 5, 7, 9 (it’s already loaded above). Its mean is exactly 5, its median is 4.5, its mode is 4, and its population standard deviation is exactly 2 — a clean set for checking you understand each idea before trusting the calculator with real data.

Mean = sum of values ÷ count  ·  σ = √( Σ(x − mean)² ÷ N )

Mean is the balance point. Median is the middle value once sorted — immune to one huge outlier. Mode is the most frequent value. Standard deviation measures spread: roughly, how far a typical value sits from the mean. Those four numbers describe almost any dataset’s story.

Population vs sample standard deviation: the one real confusion

The formulas differ in exactly one place: what you divide by. If your numbers are the entire group you care about (every student in the class, every day this month), divide by N — that’s the population SD, written σ. If your numbers are a sample meant to describe a bigger group, divide by N − 1 — the sample SD, written s. Dividing by N − 1 makes the estimate a little bigger, correcting the fact that a sample usually hugs its own mean tighter than it hugs the true mean.

Rule of thumb: describing the data you have → population. Predicting beyond it → sample. Exam questions tell you which one they want; real reports should state it too. This calculator shows both, labelled, every time.

Quartiles and IQR, briefly

Sort the data. The median splits it in half; the median of the lower half is Q1, and of the upper half is Q3. The gap between them — the interquartile range (IQR) — is where the middle 50% of your data lives. Box plots are built from exactly these five numbers (min, Q1, median, Q3, max), and statisticians flag outliers as anything below Q1 − 1.5×IQR or above Q3 + 1.5×IQR.

Common mistakes to avoid

  • Reporting the mean for skewed data. One billionaire walks into a bar and the “average wealth” explodes. For incomes, house prices and wait times, the median usually tells the truth.
  • Mixing up σ and s on an exam. The difference between dividing by N and N − 1 is a classic lost mark. Read the question: “sample” is the trigger word for N − 1.
  • Forgetting that “no mode” is an answer. If every value appears once, there is no mode — and a dataset can also have two modes (bimodal). Both are real findings, not errors.
  • Averaging averages. The mean of two group means is only the overall mean if the groups are the same size. Combine the raw data, or weight by group size.

Pro tips

  • Read the step-by-step box. It shows the sorted data, the sum, and the squared-deviation total — exactly the working a teacher wants to see, and the fastest way to catch a typo in your data.
  • Sanity-check spread: the SD is almost always smaller than the range and bigger than the IQR. If yours isn’t, a data-entry slip is likely.
  • Z-scores come next: once you have a mean and SD, any value’s z-score is (value − mean) ÷ SD — how many standard deviations from average it sits.

The complete guide

Why did statistics settle on these particular numbers? What does a standard deviation actually feel like, and when does the median beat the mean? The complete guide explains the ideas with real datasets.

Read: Statistics Calculator — The Complete Guide →

Frequently asked questions

How do I calculate the standard deviation?

Find the mean, subtract it from every value, square each difference, and average the squares — dividing by N for a population or N − 1 for a sample. Then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9: mean 5, squared differences sum to 32, population variance = 32 ÷ 8 = 4, so σ = 2.

What is the difference between population and sample standard deviation?

Population SD (σ) divides by N and describes a complete group. Sample SD (s) divides by N − 1 and estimates the spread of a larger group from a sample — the smaller divisor corrects the sample’s natural under-estimate. Both are shown above for every dataset.

How do I find the median?

Sort the numbers and take the middle one. With an even count, average the two middle values: 2, 4, 4, 4, 5, 5, 7, 9 has middle values 4 and 5, so the median is 4.5.

What if my data has two modes?

Then it’s bimodal, which the calculator reports by listing both. Two modes often hint that your data mixes two groups — for example heights of adults and children measured together.

What are quartiles and the IQR?

Q1 is the median of the lower half of sorted data, Q3 the median of the upper half. The IQR (Q3 − Q1) covers the middle 50% of values and is the standard way to spot outliers: anything more than 1.5 × IQR beyond the quartiles is flagged.

Why is my mean and median different?

Because the data is skewed. Values far from the centre pull the mean toward them but leave the median untouched. A mean well above the median signals high outliers (like incomes); well below signals low ones.