On this page (11)
How to use this calculator#
- Paste the numbers in any formatCommas, spaces, tabs, semicolons and new lines all work, so a column copied out of a spreadsheet goes straight in. Check the reported count matches what you expected before reading anything else.
- Read the mean and the median togetherWhen they are close, the data is roughly symmetric and either summary is honest. When they diverge, something is pulling the mean — an outlier, a long tail, or a data-entry error worth finding.
- Use the range and the min/max as an error checkA range far wider than you expected usually means a typo, not a surprise. An extra zero on one value inflates both the range and the mean while leaving the median untouched, which is exactly how you spot it.
- Only trust the mode when values genuinely repeatThe mode is meaningful for categories, ratings and rounded measurements. On continuous data where every value is unique there is either no mode at all or an accidental one, and neither tells you anything.
The formula#
Measures of central tendency
Mean x̄ = (x₁ + x₂ + … + xₙ) ÷ n • Median = the value at position (n + 1) ÷ 2 in the sorted list • Range = max − min
- x̄
- The arithmetic mean, pronounced ‘x bar’
- xᵢ
- The i-th value in your list
- n
- How many values there are
- (n + 1) ÷ 2
- The median's position once the list is sorted. If it lands on a half, average the two neighbouring values
- Mode
- The value that occurs most often. A list can have none, one, or several
- Range
- Largest value minus smallest — a spread measure resting on just two data points
For a weighted mean, multiply each value by its weight, add the products and divide by the sum of the weights: x̄ = Σ(wᵢ·xᵢ) ÷ Σwᵢ. That is the correct way to combine group averages, and it is not the same as averaging the averages.
Mean, median and mode explained#
The mean adds every value and divides by how many there are: 4, 8, 15, 16, 23 and 42 sum to 108, and 108 ÷ 6 = 18. The median is the middle value once the list is sorted, and with an even count you average the two middle numbers, so here it is (15 + 16) ÷ 2 = 15.5. The mode is whichever value appears most often, and a list can have none or several.
When the mean is the wrong average#
A single extreme value drags the mean but barely moves the median. If nine people earn $40,000 and one earns $1,000,000, the mean salary is $136,000 while the median stays at $40,000 — and the median is the honest summary. Use the mean for roughly symmetric data such as test scores, and the median for skewed data such as income, house prices or server response times.
Range, minimum and maximum#
Range is the largest value minus the smallest: in 12, 19, 27 and 40 the range is 40 − 12 = 28. It is the quickest measure of spread, but it rests entirely on two data points, so one mistyped digit can inflate it wildly. Always check that the reported count matches how many numbers you meant to enter — stray commas and blank lines are the usual reason a mean looks slightly off.
Worked examples#
All four averages from one list
Six test scores: 62, 74, 74, 88, 91, 95.
- Sum = 62 + 74 + 74 + 88 + 91 + 95 = 484
- Mean = 484 ÷ 6 = 80.67
- Sorted, n = 6 is even, so the median is the average of the 3rd and 4th values: (74 + 88) ÷ 2 = 81
- Mode = 74, the only value appearing twice
- Range = 95 − 62 = 33
Mean 80.67, median 81, mode 74, range 33. Mean and median agree closely, so the scores are fairly symmetric.
One outlier destroying the mean
Ten salaries: nine people on $40,000 and one founder on $1,000,000.
- Sum = 9 × 40,000 + 1,000,000 = 360,000 + 1,000,000 = 1,360,000
- Mean = 1,360,000 ÷ 10 = 136,000
- Sorted, n = 10, so the median averages the 5th and 6th values — both are 40,000
- Median = 40,000
A mean of $136,000 and a median of $40,000 for the same ten people. Nobody earns anything near the mean, which is why pay and house-price statistics are published as medians.
Reference tables#
| Measure | What it is | Best for | Weakness |
|---|---|---|---|
| Mean | Sum divided by count | Roughly symmetric data: test scores, measurement repeats, daily temperatures | One extreme value moves it a long way |
| Median | Middle value once sorted | Skewed data: income, house prices, response times, waiting lists | Ignores the size of everything except the middle |
| Mode | Most frequent value | Categories and ratings: shirt sizes, star ratings, survey options | May not exist, or there may be several |
| Range | Maximum minus minimum | A fast sense of spread, and spotting typos | Depends entirely on the two most extreme points |
If the mean and median differ by more than a few percent, the data is skewed and the median is the safer headline number.
| Count of values | Median position | What to take |
|---|---|---|
| 5 | 3 | the 3rd value |
| 6 | 3.5 | average of the 3rd and 4th |
| 7 | 4 | the 4th value |
| 8 | 4.5 | average of the 4th and 5th |
| 9 | 5 | the 5th value |
| 10 | 5.5 | average of the 5th and 6th |
| 11 | 6 | the 6th value |
| 25 | 13 | the 13th value |
| 50 | 25.5 | average of the 25th and 26th |
| 100 | 50.5 | average of the 50th and 51st |
Sort first, every time. Taking the middle item of an unsorted list gives an arbitrary number, not a median.
| Group | Students | Group mean | Total marks |
|---|---|---|---|
| Class A | 10 | 80 | 800 |
| Class B | 30 | 60 | 1,800 |
| Combined | 40 | 65 | 2,600 |
The correct combined mean is 2,600 ÷ 40 = 65. Averaging 80 and 60 gives 70, overstating the result by five marks because Class B has three times as many students.
Common mistakes#
- Quoting the mean on skewed dataIncome, house prices, page load times and hospital waiting lists all have long right tails. The mean sits above where most of the data actually is, so a headline built on it describes a group that barely exists. Use the median, and report both if the gap is large.
- Averaging averages without weightingCombining a class of 10 averaging 80 with a class of 30 averaging 60 gives 65, not 70. Every group mean has to be weighted by its group size. This error is common in dashboards that roll up per-region figures.
- Letting blanks and zeros count as dataA blank cell pasted in as 0 drags the mean down; a stray comma splits one number into two and inflates the count. Both leave the median almost untouched, so a mean that has drifted while the median has not is a signal to check the input.
- Reporting a mode that is an accidentOn measurements recorded to two decimal places, two values matching is coincidence rather than structure. A mode is only informative when the data is genuinely discrete or has been deliberately rounded into buckets.
Frequently asked questions#
How do I calculate an average?
Add all the numbers together, then divide by how many numbers there are. That is the arithmetic mean, which is what most people mean by average.
What is the difference between mean and median?
The mean is the total divided by the count; the median is the middle value when sorted. The median is far more resistant to outliers.
Can a data set have more than one mode?
Yes. If two or more values tie for the highest frequency, the set is bimodal or multimodal. If every value appears exactly once, there is no mode at all.
What separators can I use for my list?
Commas, spaces, tabs, semicolons and new lines all work, so you can paste a column straight out of a spreadsheet.
Key terms#
- Arithmetic mean
- The sum of all values divided by how many there are. What people usually mean by ‘average’.
- Median
- The middle value of the sorted list, or the average of the two middle values when the count is even. Half the data lies on each side.
- Mode
- The most frequently occurring value. A set can be bimodal, multimodal, or have no mode at all.
- Range
- Maximum minus minimum. The simplest measure of spread, and the most fragile.
- Outlier
- A value far from the rest of the data. It shifts the mean substantially and the median barely at all, which is how you detect one.
- Weighted mean
- An average where each value carries a weight — group size, credit hours, portfolio value. Σ(w·x) ÷ Σw.
- Skew
- Asymmetry in the data. Right skew (a long high tail) pulls the mean above the median; left skew pulls it below.
Sources#
- Engineering Statistics Handbook, 1.3.5.1 Measures of Location — NIST/SEMATECH
- Introductory Statistics 2e — measures of the centre of the data — OpenStax, Rice University
- Summarizing quantitative data — Khan Academy
Figures last checked .
Put this calculator on your site
Free, no sign-up, and no attribution fee — just keep the credit line that comes with the code. The calculator stays up to date automatically.
