What this mean, median, mode calculator does
This tool takes a list of numbers β pasted from anywhere, separated by commas, spaces, semicolons or new lines β and computes all three measures of central tendency. The mean is the arithmetic average. The median is the middle value when the list is sorted. The mode is the value that appears most often (there can be more than one, or none). Alongside these three, the calculator returns the range, count, sum, minimum, maximum, and a full frequency distribution table with a bar chart, so you can see exactly how the values are spread.
The three formulas
Variable definitions
- xi β the i-th value in the list.
- n β the number of values in the list.
- Ξ£xi β the sum of all values.
- xΜ β the mean (read as "x-bar").
Worked examples
Example 1: A symmetric list β all three agree
- Sum = 40; count = 5; mean = 40/5 = 8.
- Sorted (already) = 4, 6, 8, 10, 12 β median = middle value = 8.
- Each value appears once β no unique mode.
- Range = 12 β 4 = 8.
Example 2: Even count β median averages two middle values
- Sum = 34; count = 4; mean = 34/4 = 8.5.
- Sorted = 3, 7, 9, 15. Middle two are 7 and 9.
- Median = (7 + 9) / 2 = 8.
- Mode: none.
Example 3: A list with a clear mode
- Sum = 32; count = 7; mean β 4.571.
- Median (sorted already) = position 4 = 3.
- Mode = 3 (appears three times).
- Note: mean (4.57) is pulled above the mode (3) by the high values 5, 7, 9.
Example 4: Outlier pulls the mean but not the median
- Sum = 1080; count = 6; mean = 1080/6 = 180.
- Sorted = 10, 12, 14, 16, 18, 1000. Middle two are 14 and 16.
- Median = (14 + 16) / 2 = 15.
- The mean (180) is wildly unrepresentative β the median (15) is the better answer for a typical value.
Example 5: Bimodal β two values tie for the highest frequency
- Count = 8; sum = 41; mean = 5.125.
- Median = (5 + 7) / 2 = 6.
- Modes: 2 and 7 both appear three times β bimodal.
- A distribution with two peaks often indicates two underlying populations (e.g. two classes combined).
Example 6: Class 10 marks β a real BISE-style problem
- Sum = 677; count = 10; mean = 67.7.
- Sorted = 45, 55, 58, 65, 68, 72, 72, 72, 80, 90. Middle two are 68 and 72.
- Median = (68 + 72) / 2 = 70.
- Mode = 72 (appears three times).
- The three averages (67.7, 70, 72) are all close but not identical, because the data has mild left skew (the 90 pulls the mode above the mean).
When to use mean, median or mode
All three describe the "centre" of a dataset, but they emphasise different things. The right choice depends on the data.
| Measure | Use when | Sensitive to outliers? |
|---|---|---|
| Mean | Data is symmetric and roughly bell-shaped; you want the balance point | Yes β heavily |
| Median | Data is skewed; there are outliers; you want the "typical" value | No β robust |
| Mode | Data is categorical (no numerical average possible); you want the most common value | No β just counting |
In Pakistan, median income is often quoted instead of mean income precisely because a small number of very high earners would pull the mean above the typical person's experience. Similarly, property reports quote median house prices rather than average. This is the "robustness" advantage of the median β it is not moved by extremes.
Reading the relationship between them
- Mean = Median = Mode β perfectly symmetric distribution (e.g. uniform or normal).
- Mean > Median > Mode β right-skewed (a tail of high values pulls the mean up).
- Mean < Median < Mode β left-skewed (a tail of low values pulls the mean down).
This ordering is a quick diagnostic. If your computed mean and median differ a lot, the data is skewed, and the median is usually the better single-value summary.
Common mistakes to avoid
- Forgetting to sort before finding the median. The median is defined as the middle value of the sorted list. Taking the middle of the unsorted list gives a meaningless number.
- Getting the even-count median wrong. With an even number of values, there is no single middle value β you must average the two central ones. For 3, 7, 9, 15 the median is (7 + 9)/2 = 8, not 7 or 9 alone.
- Assuming there is always a mode. If every value appears the same number of times, there is no mode (or in some conventions, all values are modes). This calculator reports "no unique mode" for a fully uniform list.
- Thinking "bimodal" means "one mode". If two values tie for the highest frequency, both are modes. Bimodal lists are common β for example, merging two classes with different averages.
- Using the mean on skewed data. A single outlier can pull the mean far away from the typical value. If your mean and median differ by more than about 10%, the median is usually more representative.
- Rounding too early. Keep full precision through the sum and division; round only at the final answer. For a long list, intermediate rounding can shift the last two decimal places.
- Confusing "average" with "mean" specifically. In everyday language "average" usually means the arithmetic mean, but median and mode are also averages in the broader statistical sense. Read the problem carefully.
FAQ
What is the difference between mean, median and mode?
The mean is the arithmetic average β add all values and divide by count. The median is the middle value when the numbers are sorted. The mode is the value that appears most often. Mean is sensitive to outliers; median is not; mode tells you which value is most common and works even for non-numeric data.
How do I find the median with an even number of values?
Sort the numbers. If the count is even, take the two middle values and average them. For example, the median of 2, 4, 6, 8 is (4 + 6) / 2 = 5. If the count is odd, the median is the single middle value: the median of 2, 4, 6, 8, 10 is 6.
What if there is no mode?
If every value appears exactly once, the list has no mode. Some textbooks say every value is the mode in this case, but most modern definitions call it 'no mode'. This calculator reports 'no unique mode' when all counts are equal.
Can a list have more than one mode?
Yes. If two values tie for the highest frequency, the list is bimodal β it has two modes. Three tied values means trimodal. The calculator reports all tied modes in these cases.
When should I use median instead of mean?
Use median when the data has extreme values (outliers) that would distort the mean. For example, house prices or incomes: one very high value can pull the mean up dramatically, while the median stays representative of the typical value. In Pakistan, this is why reports often quote 'median income' rather than 'mean income'.
Does the order of the input numbers matter?
No. Mean, median and mode all depend only on the multiset of values, not on the order you type them. The calculator sorts internally for the median but keeps the full list for the frequency table.
Related tools
Related Hira Academy resources
Practice statistics with our Class 9 notes and Class 10 notes, and track term progress with the free Student Portal.