What the mean, median, mode & range calculator does
Paste in any list of numbers — test scores, prices, measurements, survey answers, anything numeric — and this mean, median, mode, and range calculator works out all four measures at once, plus the sum, the count, and the minimum and maximum. One paste, the full picture of your data set, not just an average.
Turn on the optional weighted average and give each value its own weight — handy when some numbers should count more than others, like exam grades weighted by credit hours. The calculator also draws a frequency chart of your values and lists them sorted from low to high in a collapsible table underneath the main results, so you can spot repeats and check the arithmetic at a glance.
How to use the calculator
- Enter your data. Type or paste your numbers into the “Data values” field, separated by spaces, commas, semicolons, or new lines — for example
7, 3, 9, 3, 5, 12, 3. Use a decimal point for fractional numbers (2.5, not2,5), and negative numbers work exactly the same as positive ones. - Read the result. The mean is the headline figure; underneath it you get the median, mode, range, minimum, maximum, sum, and count (n).
- Optional: turn on weighted average. Flip the “Weighted average” switch, then enter one weight per value in the “Weights” field, in the same order as your data — for example
3, 4, 2for three values. Weights must be zero or greater, and you need exactly as many weights as values. - Check the chart and table. The frequency chart shows how often each value appears; the sorted-values table underneath lists every value in ascending order.
How mean, median, mode, and range are calculated
Mean — add up all the values and divide by how many there are:
mean = sum of values ÷ count (n)
Median — sort the values from smallest to largest, then:
- if the count is odd, the median is the middle value;
- if the count is even, the median is the average of the two middle values.
Mode — the value that appears most often. If every value is unique, or if all values are tied at the same frequency, the data set has no mode. If exactly one value has the highest frequency, that value is the mode. If two or more values (but not all of them) tie for the highest frequency, the data set is multimodal, and the calculator lists every tied value.
Range — the largest value minus the smallest:
range = max − min
Step-by-step example
Take the data set 7, 3, 9, 3, 5, 12, 3 (n = 7):
- Sorted: 3, 3, 3, 5, 7, 9, 12.
- Sum = 7+3+9+3+5+12+3 = 42. Mean = 42 ÷ 7 = 6.
- Median: n is odd, so the middle (4th) value in the sorted list is the median = 5.
- Mode: the value 3 appears three times, more often than any other value, so mode = 3.
- Range: 12 − 3 = 9. Minimum = 3, maximum = 12.
Median with an even number of values
With an even count there’s no single middle value, so the calculator averages the two in the middle. Take 2, 4, 6, 8 (n = 4): sorted, the two middle values are 4 and 6, so median = (4 + 6) ÷ 2 = 5. Here mean = 20 ÷ 4 = 5 too — a coincidence of this particular set, not a rule. Every value in this set is unique, so no single value repeats more than another and the calculator reports no mode.
When there’s more than one mode, or none at all
Repeats don’t automatically produce a mode — what matters is whether one value stands out. Take 1, 1, 2, 2, 3, 3 (n = 6): every value repeats exactly twice, so nothing stands out from the rest, and this is still a no-mode result even though nothing here is unique. Compare that with 1, 2, 2, 3, 3, 4 (n = 6, mean = 2.5, median = 2.5, range = 3): here 2 and 3 both appear twice, more often than 1 and 4, which appear once each. That’s a tie for the top frequency between two (but not all) values — a multimodal result, and the calculator lists both: mode = 2 and 3.
At the other extreme, when every value in the set is the same — 5, 5, 5, 5 — there’s nothing to compare, so that one repeated value is trivially the mode, and mean = median = mode = 5, with range = 0. That’s a correct result, not an error.
Weighted average: a different kind of mean
The regular mean treats every value equally. A weighted average lets some values count more than others — the classic case is a course grade where each exam or assignment is worth a different number of credits or points:
weighted mean = Σ(value × weight) ÷ Σ(weight)
Take three exam scores, 90, 80, 70, worth 3, 4, and 2 credits respectively:
- Numerator = 90×3 + 80×4 + 70×2 = 270 + 320 + 140 = 730.
- Denominator = 3 + 4 + 2 = 9.
- Weighted mean = 730 ÷ 9 ≈ 81.11.
Compare that with the plain, unweighted mean of the same three scores: (90+80+70) ÷ 3 = 80. The weighted average is higher because the 90 carries more weight (3 credits) than the 70 (2 credits) — the credit-heavy exams pull the result up.
A weight of zero is allowed and simply removes that value’s influence: for scores 100, 50, 90 with weights 2, 0, 3, the middle value doesn’t affect the result at all — weighted mean = (100×2 + 50×0 + 90×3) ÷ (2+0+3) = 470 ÷ 5 = 94. What isn’t allowed is weights that add up to zero (for example equal positive and negative weights cancelling out): that makes the division undefined, so the calculator blocks it and asks for at least one weight greater than zero. The number of weights must also match the number of values, one-to-one, in the same order — a mismatched count is flagged rather than guessed at.
Reading the result: mean vs. median, and what the range tells you
Mean and median usually sit close together, but they answer slightly different questions. The mean takes every value into account and is pulled toward unusually large or small numbers. The median only cares about the middle of the sorted list, so a single extreme value barely moves it. In the very first example above (3, 3, 3, 5, 7, 9, 12), the mean (6) sits a little above the median (5) precisely because the single large value, 12, pulls the average upward while leaving the median almost untouched. When you’re summarizing something where a few extreme values are common — incomes, house prices, response times — the median is usually the more representative figure; the mean is the natural choice when you actually care about the total shared equally, like splitting a bill.
The mode answers a different question again: not “what’s typical overall” but “what value shows up most often” — useful for categorical-feeling data (shoe sizes sold, most common test score) where the middle or the average don’t mean much on their own.
The range gives you the full spread of the data in one number, but it only looks at the two extremes, so a single unusually high or low value can make the range look much bigger than the data set actually behaves day to day. When mean, median, and mode all come out equal, it’s a sign your data has no real skew or standout value pulling it in one direction — the clearest case being a set where every value is identical.