Mean, Median, Mode Calculator

Enter your dataset to instantly calculate the mean (average), median (middle value), mode (most frequent value) and midrange, with the sorted data and every other basic measure of central tendency.

Separate numbers with commas, spaces or new lines. Decimals and negatives are supported.
Mean —
Median—
Mode—
Midrange—
Count (n)—
Sum—
Minimum—
Maximum—
Range—
Sorted data
—

How to Use

  1. Enter your data: type or paste your numbers into the box, separated by commas, spaces or new lines. Decimals and negative numbers are fine.
  2. Read the results: the mean, median, mode, midrange, count, sum and range update as you type, and the sorted data is listed below them.
  3. Check the mode: if every value is different the mode shows "None", and if several values tie for most frequent they are all listed.
  4. Compare the three measures: if the mean and median are far apart, your data is skewed or contains outliers, and the median is usually the safer summary.

What You'll Discover

  • Mean — the sum of all values divided by how many there are. This is the headline result.
  • Median — the middle value once the data is sorted. For an even count it is the average of the two middle values.
  • Mode — the value (or values) that appear most often. It shows "None" when every value appears only once.
  • Midrange — the halfway point between the smallest and largest values, (min + max) ÷ 2.
  • Count, sum, minimum, maximum and range — the building blocks behind the three main measures, and a quick check that your data was read correctly.
  • Sorted data — your values in ascending order, so you can see exactly where the median sits and which values repeat.

Results are shown to up to six decimal places, with trailing zeros removed. Anything in the box that is not a number is ignored, and a note under the box tells you which entries were skipped.

Mean, Median and Mode Explained

The mean, median and mode are the three measures of central tendency. Each one answers the question "what is a typical value?" in a different way, and they only agree when the data is fairly symmetric.

Mean

The mean is the arithmetic average: add every value and divide by the count.

Mean = (x1 + x2 + … + xn) ÷ n

For 72, 85, 90, 68, 85, 77 and 94 the sum is 571 and n is 7, so the mean is 571 ÷ 7 ≈ 81.57. Every value contributes to the mean, which is why a single extreme value can pull it a long way.

Median

The median is the middle value of the sorted list. With an odd count it sits at position (n + 1) ÷ 2. With an even count it is the average of the values at positions n ÷ 2 and n ÷ 2 + 1.

The sorted scores above are 68, 72, 77, 85, 85, 90, 94. There are 7 values, so the median is the 4th: 85. For the six values 4, 8, 15, 16, 23 and 42, the middle pair is 15 and 16, giving a median of 15.5, which is not one of the values in the list.

Mode

The mode is the value that occurs most often. A dataset can have one mode, several modes (bimodal when there are two, multimodal for more) or none at all. In the scores above, 85 appears twice and every other value once, so the mode is 85.

Midrange and range

The range is the maximum minus the minimum (94 − 68 = 26 for the scores). The midrange is the average of those two extremes: (68 + 94) ÷ 2 = 81. Both use only the two most extreme values, so they react strongly to outliers. For spread that uses every value, try the standard deviation calculator or the variance calculator.

Mean vs Median vs Mode: Which Should You Use?

No single measure is best everywhere. The right choice depends on the shape of your data, whether outliers are present and what kind of values you have.

MeasureWhat it isAffected by outliers?Best used for
MeanSum ÷ countYes, stronglyRoughly symmetric numeric data, and as the input to other statistics such as variance
MedianMiddle of the sorted dataBarelySkewed data or data with extreme values, and ordered ratings
ModeMost frequent valueNoFinding the most common value or category, and discrete data with repeats
Midrange(Min + max) ÷ 2Yes, very stronglyA quick rough center only

A practical rule of thumb

Start with the mean and the median together. If they are close, either one describes the center well. If they differ noticeably, report the median, and say why. Use the mode when "most common" is the real question, for example the most frequent shoe size sold, and remember that a mode only means something when values actually repeat.

Data types matter

The mean needs numbers where differences are meaningful, such as heights, prices or test scores. The median also works for ranked data such as 1 to 5 satisfaction ratings, where the gaps between ranks are not necessarily equal. The mode is the only one of the three that also works for categories such as colors or brands, although this calculator accepts numbers only.

If you also want to know how widely your data is spread, pair the center with a spread measure. The IQR calculator is the natural partner for the median, and the standard deviation is the partner for the mean.

How Skew and Outliers Change the Three Measures

Where the mean, median and mode fall relative to each other tells you about the shape of your data. A long tail on the right (a few unusually large values) drags the mean upward. A long tail on the left drags it downward. The median moves far less, and the mode not at all.

ShapeTypical orderExample dataMean / Median / Mode
SymmetricMean ≈ median ≈ mode1, 2, 3, 3, 3, 4, 53 / 3 / 3
Right-skewedMean > median > mode1, 2, 2, 3, 3, 3, 4, 4, 5, 6, 9, 154.75 / 3.5 / 3
Left-skewedMean < median < mode1, 7, 11, 12, 12, 13, 13, 13, 14, 14, 1511.36 / 13 / 13

This ordering is a guide, not a law. It can fail for multimodal data or small discrete datasets, so look at the sorted data as well as the three numbers.

How one outlier changes the answer

Take the values 42, 45, 48, 50, 52 and 55, which have a mean of 48.67 and a median of 49. Add a single extreme value of 400. The mean jumps to 98.86, more than double, while the median moves only to 50. Nothing about the typical value changed, but the mean now describes none of the original data points. This is why the median is the usual choice for income, house prices and waiting times, where a few very large values are common.

An outlier is not automatically an error. Check whether it is a typing mistake or a real observation, and report both versions if you remove it. To flag candidate outliers with a consistent rule, use the quartile fences from the IQR calculator.

Entering Your Data

The calculator reads numbers separated by commas, spaces, semicolons or line breaks, in any mix. Anything that is not a number is skipped and reported under the input box.

You typeHow it is read
4, 8, 15, 16, 23, 42Six values
4 8 15 16 23 42The same six values
One number per line (for example pasted from a spreadsheet column)One value per line
-2.5, 0.75, 3Negative and decimal numbers are accepted
1e3, 2.5e2Scientific notation: 1000 and 250
4, abc, 8Reads 4 and 8, and reports that "abc" was ignored
1,000 or 3,5Read as two numbers each (1 and 0, 3 and 5). Leave out thousands separators and use a point for decimals.

Examples

Example 1 — Odd count with a repeated value

Quiz scores: 72, 85, 90, 68, 85, 77, 94.

  • Sorted: 68, 72, 77, 85, 85, 90, 94
  • Mean: 571 ÷ 7 ≈ 81.571429
  • Median: the 4th value = 85
  • Mode: 85 (appears twice)
  • Midrange: (68 + 94) ÷ 2 = 81; range = 26

Example 2 — Even count, no mode

Data: 4, 8, 15, 16, 23, 42.

  • Sum = 108, n = 6, so the mean is 18
  • Median: (15 + 16) ÷ 2 = 15.5
  • Mode: None, because every value appears once
  • Midrange: (4 + 42) ÷ 2 = 23; range = 38

Example 3 — Two modes

Data: 3, 5, 5, 7, 9, 9, 12.

  • Mean: 50 ÷ 7 ≈ 7.142857
  • Median: the 4th value = 7
  • Modes: 5 and 9 (each appears twice), so the data is bimodal

Example 4 — Negative and decimal values

Data: −3, −1.5, 0, 2.5, 4.

  • Sum = 2, so the mean is 2 ÷ 5 = 0.4
  • Median: the middle value = 0
  • Midrange: (−3 + 4) ÷ 2 = 0.5; range = 7

Mean, Median and Mode If...

What are the mean, median and mode if every number is different?

If every value is different, there is no mode, but the mean and median still exist. For 1, 3, 5, 7, 9 the mean and median are both 5 and the mode shows "None". Some textbooks say such a dataset has no mode, others that every value is a mode. This calculator shows "None" because no value is more frequent than any other.

What are they if two values appear equally often?

If two values tie for most frequent, both are modes and the dataset is bimodal. In 3, 5, 5, 7, 9, 9, 12 the modes are 5 and 9. The calculator lists every tied value, in ascending order, rather than picking one.

What is the median if there is an even number of values?

With an even count, the median is the average of the two middle values. For 2, 4, 6, 8 the middle pair is 4 and 6, so the median is (4 + 6) ÷ 2 = 5. The result does not have to be a value from your list.

What are they if there is an outlier?

An outlier moves the mean a lot, the median a little and the mode not at all. For 42, 45, 48, 50, 52, 55 and 400 the mean is about 98.86 but the median is 50. Without the 400, the mean is about 48.67. When the two measures disagree this much, report the median or both.

What are they if all the numbers are the same?

If all values are identical, the mean, median and mode are all equal to that value. For 5, 5, 5, 5 each is 5, and the range and spread are 0. The mode is 5 because it appears four times.

What are they if I only enter one number?

With a single value, the mean and median both equal that value. For 7 the mean is 7, the median is 7 and the range is 0. The mode shows "None" because no value repeats.

What are they if my data has negative numbers or decimals?

Negative numbers and decimals work exactly like whole numbers. For −3, −1.5, 0, 2.5 and 4 the mean is 0.4 and the median is 0. Sorting places negatives first, so the minimum is −3. Results are rounded to six decimal places, which also hides tiny floating-point artifacts such as 0.1 + 0.2 showing as 0.30000000000000004.

What are they if my data is a frequency table?

Expand each value by its frequency, or compute a weighted mean by hand. Suppose 1 appears 3 times, 2 appears 5 times, 3 appears 7 times, 4 appears 3 times and 5 appears 2 times. That is 20 values with a sum of 56, so the mean is 2.8. The 10th and 11th sorted values are both 3, so the median is 3, and the mode is 3. To use the calculator, type each value as many times as it occurs.

What are they if the numbers are separated by spaces or lines?

Spaces, commas, semicolons and new lines all work as separators, and you can mix them. Pasting a spreadsheet column works because each row ends in a line break. Typing 4 8 15 16 23 42 gives the same results as 4, 8, 15, 16, 23, 42.

What are the mean, median and mode of the numbers 1 to 100?

The mean and median of 1 to 100 are both 50.5, and there is no mode. The sum is 5,050 and there are 100 values, so the mean is 50.5. The 50th and 51st values are 50 and 51, so the median is also 50.5. Each number appears once, so there is no mode.

People Also Search For

How to find the mean, median, mode and range

Sort the data, then add and divide for the mean, take the middle for the median, count repeats for the mode, and subtract smallest from largest for the range. For 3, 5, 5, 7, 9, 9, 12: the mean is 50 ÷ 7 ≈ 7.14, the median is 7, the modes are 5 and 9, and the range is 12 − 3 = 9. Sorting first makes the median and mode much easier to spot.

What is the difference between mean and average

"Average" is a general word for a typical value, and in everyday use it usually means the mean. Strictly, the mean, median and mode are all kinds of average. If a source just says "the average", it almost always means the arithmetic mean, but it is worth checking when the data is skewed.

How to find the mean from a frequency table

Multiply each value by its frequency, add the products, and divide by the total frequency. For values 1 to 5 with frequencies 3, 5, 7, 3 and 2, the products add to 3 + 10 + 21 + 12 + 10 = 56 and the total frequency is 20, so the mean is 56 ÷ 20 = 2.8. The mode is the value with the largest frequency, which is 3.

How to estimate the mean of grouped data

Use the midpoint of each class as its value and weight it by the class frequency, which gives an estimate rather than an exact mean. With classes 0–10, 10–20 and 20–30 holding 4, 6 and 10 values, the midpoints are 5, 15 and 25. The estimated mean is (5 × 4 + 15 × 6 + 25 × 10) ÷ 20 = 18. The original raw values are lost, so an exact answer is not possible.

Mean vs median in skewed data

In skewed data the median is usually the better summary, because the mean is dragged towards the long tail. In 1, 2, 2, 3, 3, 3, 4, 4, 5, 6, 9, 15 the mean is 4.75 but the median is 3.5, and most values sit at or below 4. Reporting both tells readers the data is skewed.

Midrange vs median

The median is the middle of the sorted data, while the midrange is the halfway point between the minimum and maximum. For 42, 45, 48, 50, 52, 55 and 400 the median is 50 but the midrange is 221, because the midrange follows the single extreme value. The midrange is a rough shortcut, and the median is the more reliable center.

Frequently Asked Questions

What is the difference between mean, median and mode?

The mean is the sum of the values divided by their count. The median is the middle value of the sorted data. The mode is the most frequent value. For symmetric data all three are close together. For skewed data they separate, with the mean pulled towards the tail while the median stays nearer the bulk of the values.

What if there is no mode?

If every value appears exactly once, the calculator shows "None" for the mode. The mean and median are still calculated normally. A dataset with no repeated values simply has no most-frequent value.

Can a dataset have more than one mode?

Yes. If two values tie for the highest frequency the data is bimodal, and if three or more tie it is multimodal. This calculator lists every tied value. Several modes can point to distinct subgroups in the data, which is worth investigating.

How does the calculator treat values that all repeat the same number of times?

If no value is more frequent than the others but values do repeat, such as 2, 2, 3, 3, every one of those values is listed as a mode. Some textbooks say such data has no mode, so follow your course's convention if it differs. If all values are unique, the calculator shows "None".

When is the median better than the mean?

The median is better for skewed data or when outliers are present. In 1, 2, 3, 4 and 100 the mean is 22, which is larger than four of the five values, while the median is 3. Income, house prices and response times are common examples where the median is more informative.

How is the median calculated for an even number of values?

Sort the data and average the two middle values. For 2, 4, 6, 8 the median is (4 + 6) ÷ 2 = 5. For an odd count, the median is simply the middle value.

What does it mean when the mean equals the median?

It suggests the data is roughly symmetric, as in a normal distribution. When the mean is clearly above the median the data is usually right-skewed, and when it is below the median it is usually left-skewed. This is a rule of thumb, not a guarantee, so check the sorted data too.

What is the midrange?

The midrange is (minimum + maximum) ÷ 2, the halfway point between the two extreme values. It is quick to compute but very sensitive to outliers because it ignores everything between the extremes. It is a rough indicator rather than a main summary statistic.

How should I separate the numbers?

Use commas, spaces, semicolons or new lines, in any combination. Use a point for decimals and leave out thousands separators: 1,000 would be read as the two numbers 1 and 0. Entries that are not numbers are skipped, and a note under the input box lists them.

How many decimal places does it show?

Results are rounded to at most six decimal places and trailing zeros are removed, so a mean of exactly 18 shows as 18 and 571 ÷ 7 shows as 81.571429. Round further to match the precision of your data when you report the result.

Does it work for a sample and for a whole population?

Yes. The mean, median and mode are calculated the same way for a sample or a whole population. The distinction matters for spread measures such as variance and standard deviation, where the formulas differ. Use the standard deviation calculator for those.

Can I use text or categories?

No. This calculator accepts numbers only, and anything else is ignored. The mode is defined for categories such as colors, but you would need to count them by hand or code them as numbers first.

Is my data stored or sent anywhere?

No. All calculations run in your browser. Nothing you type is sent to a server or saved, and no account is needed.

Last reviewed: November 2026 — formulas and worked examples verified.