Davided.

Mean, Median, Mode & Range Calculator

Calculate the mean, median, mode, and range of any data set — plus an optional weighted average — with a frequency chart and sorted-values table.

✓ Last reviewed: Sources: NIST/SEMATECH e-Handbook of Statistical Methods — 1.3.5.1 Measures of Location

Report a correction

Spotted a wrong result, label or typo? Tell us — we review every report.

Values recognized: 0

Enter your numbers separated by spaces, commas, semicolons, or new lines — e.g. 7, 3, 9, 3, 5, 12, 3

Advanced options

Weighted average

Your result

Fill in the fields above to see your result.

Related calculators

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

  1. 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, not 2,5), and negative numbers work exactly the same as positive ones.
  2. Read the result. The mean is the headline figure; underneath it you get the median, mode, range, minimum, maximum, sum, and count (n).
  3. 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, 2 for three values. Weights must be zero or greater, and you need exactly as many weights as values.
  4. 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):

  1. Sorted: 3, 3, 3, 5, 7, 9, 12.
  2. Sum = 7+3+9+3+5+12+3 = 42. Mean = 42 ÷ 7 = 6.
  3. Median: n is odd, so the middle (4th) value in the sorted list is the median = 5.
  4. Mode: the value 3 appears three times, more often than any other value, so mode = 3.
  5. 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.

Frequently asked questions

What is the difference between mean, median, and mode?

The mean is the sum of all values divided by how many there are — the arithmetic average. The median is the middle value once the data is sorted (or the average of the two middle values, for an even count). The mode is the value that appears most often. All three describe “the center” of your data, but they can give different answers, especially when a data set has extreme values or repeats.

How do you calculate the mean (average) of a set of numbers?

Add up every value, then divide by how many values there are. For 7, 3, 9, 3, 5, 12, 3 (seven numbers), the sum is 42, so the mean is 42 ÷ 7 = 6. That’s the definition behind “average” in everyday use, and it’s what this calculator’s headline result shows.

When should you use the median instead of the mean?

Use the median when your data might include a few extreme values that would otherwise skew the mean — incomes, house prices, or response times are classic examples, since one very high value can drag the mean up while barely moving the median. If your data doesn’t have extreme outliers, mean and median tend to land close together, and either is representative.

What is the mode, and can a data set have more than one mode (or none)?

The mode is the value that appears most often in a data set. Yes to both: a data set can have several modes if two or more values are tied for the highest frequency — for example, in 1, 2, 2, 3, 3, 4, both 2 and 3 appear twice, so the set is multimodal with modes 2 and 3. A data set can also have no mode at all, when every value is unique or when all values repeat the same number of times, so none of them stands out from the rest.

How do you find the median when there is an even number of values?

Sort the values, then average the two values sitting in the middle. For 2, 4, 6, 8 (four values), the two middle values are 4 and 6, so the median is (4 + 6) ÷ 2 = 5. With an odd count, there’s a single middle value and no averaging is needed.

What is the range in statistics and how is it calculated?

The range is the largest value minus the smallest value in a data set — a single number describing the full spread from top to bottom. For 7, 3, 9, 3, 5, 12, 3, the maximum is 12 and the minimum is 3, so the range is 12 − 3 = 9. It’s simple to calculate but sensitive to a single extreme value, since only the two endpoints matter.

What is a weighted average and how does it differ from a regular average?

A regular average treats every value the same. A weighted average lets some values count more than others by multiplying each one by its own weight, then dividing by the total of the weights, instead of dividing by a plain count. For exam scores 90, 80, and 70 weighted by 3, 4, and 2 credits, the weighted average is 730 ÷ 9 ≈ 81.11, compared with a plain average of 80 for the same three scores — the difference comes entirely from the extra weight on the 90.

Are “average” and “mean” the same thing?

In everyday speech, “average” almost always means the mean — sum divided by count — and that’s how this calculator uses the term for its headline result. Statistically speaking, “average” is a broader umbrella that can also refer to the median or the mode, since all three describe a data set’s center; “mean” specifically always refers to the sum-divided-by-count calculation.

How do outliers affect the mean compared to the median?

The mean takes every value into account, so a single unusually large or small number pulls it in that direction. The median only depends on which value (or two values) sits in the middle of the sorted list, so it barely moves even if one number is far from the rest. In 3, 3, 3, 5, 7, 9, 12, the mean (6) sits a little higher than the median (5) because the largest value, 12, pulls the average upward while the median stays anchored near the bulk of the data.

When are mean, median, and mode all equal to each other?

The clearest case is when every value in the data set is identical: for 5, 5, 5, 5, mean, median, and mode are all exactly 5, and the range is 0. More generally, the three tend to converge whenever a data set is symmetric around a single, clearly dominant central value with no skew and no competing repeated values pulling the mode elsewhere.

Sources