Calculate mean, median, mode and range instantly, with full step-by-step working. Supports a raw data list, a frequency table, or grouped class-interval data.
Quick Answer: How Do You Calculate Mean, Median, Mode and Range?
Mean: add all values, divide by how many there are. Median: sort the values and take the middle one (or average the two middle values if there's an even count). Mode: the value that appears most often. Range: the highest value minus the lowest. Mean is pulled around by extreme values; median usually isn't — which is exactly why house-price and income statistics use median, not mean.
Enter Data
Separate values with commas, spaces or new lines. Repeated values are fine and expected.
Example: 5:3 means the value 5 appears 3 times. Also accepts 5, 3 or 5 3.
Example: 10-20:8 means the class from 10 to 20 has a frequency of 8. Classes should be continuous and non-overlapping.
ℹ️ Mean, median and mode for grouped data are estimates — individual values inside each class are unknown, so standard interpolation formulas are used instead of exact calculation.
Results
Mean, Median, Mode & Range
—
Statistic
Value
Quick Formula Summary
Mean: x̄ = Σx / n
Median (odd n): middle value of sorted data | Median (even n): average of the two middle values
Mode: the most frequently occurring value(s) — can be one, several, or none
Range: max − min
Grouped mean: Σ(f × midpoint) / Σf
Grouped median: L + ((N/2 − CF)/f) × h
Grouped mode: L + ((f₁−f₀)/((f₁−f₀)+(f₁−f₂))) × h
Mean, Median, Mode & Range Guide
What Is the Mean?
The mean (average) is the sum of all values divided by how many values there are. It's the most familiar measure of central tendency, but it has a real weakness: a single extreme value can drag it far from what most of the data actually looks like.
Mean = (sum of all values) / (count of values)
What Is the Median?
The median is the middle value when the data is sorted from smallest to largest. With an odd number of values, it's the single middle one. With an even number, it's the average of the two middle values. The median doesn't care how extreme the highest or lowest value is — only its position matters.
Odd count: middle value | Even count: average of the two middle values
What Is the Mode?
The mode is the value that occurs most often. A data set can have exactly one mode (unimodal), two (bimodal), three or more (multimodal), or none at all if every value occurs the same number of times.
What Is the Range?
The range is the simplest measure of spread: the highest value minus the lowest. It's easy to calculate but very sensitive to a single extreme value, the same weakness the mean has.
Why Mean and Median Can Tell Very Different Stories
This is the single most important idea on this page, and it's easiest to see with real numbers. Take six house sale prices, in thousands: 250, 275, 280, 290, 300, and 2500 (that last one is a mansion sale in the same suburb).
Mean vs median with one extreme value
Mean = (250+275+280+290+300+2500) / 6 = 649.17 (thousand)
Median = (280+290) / 2 = 285 (thousand)
Every single one of the other five houses sold for under 300 — the mean of 649 doesn't represent a single one of them. The median of 285 is a genuinely typical price. This is exactly why real estate reports and government income statistics use median, not mean.
The mode and range behave differently again: removing the mansion changes the range enormously (from 2250 down to 50) but might not touch the mode at all. All four statistics measure something different, and a full picture needs all of them, not just one.
When There's No Mode, or More Than One
Students often expect every data set to have exactly one mode, but that's not guaranteed:
No mode: if every value appears exactly once (or all values appear the same number of times), there is no mode at all — not zero, just genuinely absent.
Bimodal: exactly two values tie for the highest frequency. Example: shoe sizes 7, 8, 8, 8, 9, 9, 9, 10 — both 8 and 9 appear three times each, so this data set is bimodal (8 and 9).
Multimodal: three or more values tie for the highest frequency.
ℹ️ A calculator that silently reports only the first mode it finds is misleading with bimodal or multimodal data. This calculator always reports every tied mode explicitly, and says so clearly when there isn't one at all.
Mean, Median and Mode for Grouped Data
When data is already summarised into class intervals (for example, "10–20 years old: 8 people"), you no longer know the exact individual values — only which class they fall into. The formulas below are the standard estimation method used across statistics courses worldwide:
Mean = Σ(f × midpoint) / Σf
Median = L + ((N/2 − CF)/f) × h (L = lower boundary of the median class, CF = cumulative frequency before it, f = its frequency, h = class width)
Mode = L + ((f₁−f₀)/((f₁−f₀)+(f₁−f₂))) × h (L = lower boundary of the modal class, f₁ its frequency, f₀ and f₂ the frequencies of the classes before and after it)
A few very high values would drag the mean far from what's typical
Test scores with one very low or missed test
Median
One zero or missed exam shouldn't dominate a whole term's average
Categorical or non-numeric-feeling data (shoe size, favourite colour)
Mode
Mean and median may not even make practical sense
Real-World Applications
Field
Use
Education
Class average test scores (mean), the "typical" student's mark (median), the most common grade (mode)
Economics
Median household income and median house price, specifically to avoid a handful of very high earners or very expensive properties distorting the picture
Sports statistics
Batting averages, point averages (mean); most frequent final score in a season (mode)
Quality control
Range monitors how much a measured dimension varies across a production run
Retail
Mode identifies the best-selling size or variant; mean/median inform typical basket value
Common Mistakes
Mistake
Fix
Forgetting to sort the data before finding the median
The median is a position in sorted order, not the middle of however the data happened to be typed in
Reporting only one mode when a data set is bimodal
Check for ties at the highest frequency — there can genuinely be two or more modes
Assuming every data set has a mode
If every value is unique, there is no mode at all — that's a valid, expected result
Using the mean on heavily skewed data
For income, prices, or anything with a long tail of extreme values, median is usually more representative
Using exact ungrouped formulas on grouped data
Grouped data needs the interpolation formulas — individual values inside a class interval are genuinely unknown
⏱️ Last Updated: August 2026 | Reviewed by Mohsin Iqbal
🔑 Key Takeaways
Mean uses every value but is easily pulled off-centre by extreme values
Median only depends on position in sorted order — far more resistant to outliers
A data set can have zero, one, two, or more modes — check for ties, don't assume there's exactly one
Range is simple but extremely sensitive to a single extreme value, just like the mean
Grouped data needs interpolation formulas — individual values inside a class interval are genuinely unknown, not estimated by guesswork
Practice Questions
Beginner (with answers)
Find the mean, median and range of {4, 8, 6, 5, 3}.
Find the mean and median of {12, 15, 12, 18, 20, 12}. What is the mode?
Find the median of {1, 2, 3, 4, 5, 6}.
A data set is {7, 7, 8, 8, 9}. Is it unimodal, bimodal, or does it have no mode?
What is the range of {100, 102, 98, 250, 101}?
Show answers
1) mean=5.2, median=5, range=5 2) mean≈14.83, median=13.5, mode=12 3) median=3.5 (even count, average of 3 and 4) 4) Bimodal — 7 and 8 both appear twice 5) range=250−98=152
Advanced (with answers)
Find the mean and median of {5, 7, 7, 9, 10, 20}. Which is more representative, and why?
A frequency table shows value 5 with frequency 3, and value 8 with frequency 2. Find the mean.
Using the same grouped data as Q3, find the median.
Using the same grouped data as Q3, find the mode.
Show answers
1) mean≈9.67, median=8 — median is more representative since 20 is an outlier pulling the mean up 2) mean=(5×3+8×2)/5=6.2 3) mean=27 4) median=28 5) mode≈30.91
Formula Cheat Sheet
Quick Reference
Mean: x̄ = Σx / n | Median (odd n): middle value | Median (even n): average of two middle values
Mode: most frequent value(s) | Range: max − min | Midrange: (max + min) / 2
Grouped mean: Σ(f×midpoint) / Σf | Grouped median: L + ((N/2−CF)/f)×h | Grouped mode: L + ((f₁−f₀)/((f₁−f₀)+(f₁−f₂)))×h
Glossary
Central tendency
A single value that attempts to describe the "centre" or typical value of a data set — mean, median and mode are the three standard measures.
Outlier
A data point far removed from the rest of the data set, capable of dramatically shifting the mean and range while barely affecting the median or mode.
Bimodal / multimodal
A data set with two (bimodal) or three-plus (multimodal) values tied for the highest frequency.
Class interval
A range of values (e.g. 10–20) used to group continuous data into a frequency table when individual values aren't recorded separately.
Midrange
The average of the maximum and minimum values — a quick, rough measure of centre, distinct from the mean or median.
Frequently Asked Questions
The mean (average) is calculated by adding all values in a data set and dividing by how many values there are. It's the most commonly used measure of central tendency, but it can be skewed by extreme values (outliers).
The median is the middle value in a data set when the values are sorted from smallest to largest. If there's an even number of values, the median is the average of the two middle numbers. It's resistant to outliers, unlike the mean.
The mode is the value that appears most frequently in a data set. A data set can have one mode, multiple modes (bimodal or multimodal), or no mode at all if every value appears the same number of times.
The range is the difference between the highest and lowest values in a data set: maximum minus minimum. It's the simplest measure of spread but very sensitive to a single extreme value.
The mean is the arithmetic average of all values; the median is the middle value when sorted. The mean is affected by outliers and extreme values, while the median stays representative of the typical value even when the data contains extreme highs or lows.
They're the same thing — "average" in everyday language almost always refers to the mean. Statisticians use "mean" specifically because "average" can informally refer to any measure of central tendency, including median or mode.
Add up every value in the data set, then divide by the number of values. For {2, 4, 6}, the mean is (2+4+6)/3 = 4.
Sort the values from smallest to largest. If there's an odd number of values, the median is the middle one. If even, average the two middle values.
Count how many times each value appears. The value (or values) with the highest count is the mode. If every value appears the same number of times, there is no mode.
Subtract the smallest value from the largest value. For {3, 8, 5}, the range is 8 − 3 = 5.
Yes — this is called a bimodal data set. It happens when exactly two values are tied for the highest frequency, such as {1,1,2,2,3}, which is bimodal at 1 and 2.
Yes — this is called multimodal. Any time three or more values tie for the highest frequency, all of them are reported as modes.
Yes — if every value in the data set appears exactly once (or all values share the same frequency), there is no mode at all. That's a valid result, not an error.
Use the median when the data contains extreme values or is heavily skewed — income, house prices, or any data set where a few very large or small values would distort the mean. The median stays representative of the typical value in these cases.
Use the mean for roughly symmetric data without extreme outliers, since it uses every value in the data set and is more statistically efficient than the median in that situation.
The median. Skewed data has a long tail of extreme values on one side, which pulls the mean toward that tail — the median stays anchored to the middle of the data regardless.
An outlier is a data point that differs significantly from the rest of the data set. Outliers can dramatically shift the mean while barely affecting the median, which is why the median is often preferred for skewed real-world data like income or house prices.
Significantly — because every value contributes to the mean, one very large or very small value can pull it far away from what most of the data actually looks like. Six house prices of 250, 275, 280, 290, 300 and 2500 (thousand) have a mean of 649, even though five of the six sold for under 300.
Only slightly, and often not at all. The median only depends on which value sits in the middle position once sorted — an extreme value at either end usually doesn't change that position.
Rarely. Since the mode is based on frequency, not magnitude, a single unusual extreme value that only appears once has no effect on which value is most common.
Multiply each class's midpoint by its frequency, sum those products, then divide by the total frequency: Mean = Σ(f×midpoint) / Σf.
Find the class where the cumulative frequency first reaches half the total, then interpolate within it: Median = L + ((N/2 − CF)/f) × h, where L is the class's lower boundary, CF the cumulative frequency before it, f its frequency, and h its width.
Identify the modal class (highest frequency), then interpolate: Mode = L + ((f₁−f₀)/((f₁−f₀)+(f₁−f₂))) × h, using the frequencies of the modal class and its two neighbours.
Ungrouped data lists every individual value directly. Grouped data summarises values into class intervals with a frequency count, meaning individual values inside each class are no longer known exactly — which is why grouped statistics use interpolation formulas rather than exact calculation.
Yes — numbers separated by commas, spaces, tabs or new lines are all accepted, so a column or row copied directly from a spreadsheet pastes in correctly.
Yes — every calculation includes a step-by-step working section showing exactly how the mean, median, mode and range were derived from your specific data.
Yes — negative numbers and decimal values are fully supported in the raw data and frequency table modes.
Median household income and median house prices avoid distortion from a small number of very high earners or expensive properties. Mean is used for class test averages and sports statistics like batting averages. Mode identifies the best-selling product size or most common survey response.
Because a small number of very expensive properties or very high earners would pull the mean far above what's actually typical for most people. The median stays representative of the middle of the distribution regardless of how extreme the highest values get.
Mean, median and mode are typically introduced in upper primary or early secondary school (around ages 10–13 in most curricula) and remain a foundational topic through GCSE, A-Level, and introductory statistics courses at every level afterward.