Mean, median and mode calculator (average calculator)

Average calculator for a list of numbers: mean, median, mode, range, count and sum, with the sorted data and the middle values highlighted.

Drafted with AI writing toolsUpdated Checked examples: 6

Numbers separated by commas, spaces or new lines. The default is 10 quiz scores.
Try
Mean (average)
Mean (average): 84.9
Maximum decimal places: 6; Nearest, ties away from zero
Median
86.5
Mode
92 (appears 3 times)
Range
25
Count
10
Sum
849
Minimum
70
Maximum
95
Mean as a fraction
849/10 = 84 9/10

The 10 values add up to 849, so the mean is 84.9; the median is 86.5. Mode: 92. The mean is 1.6 below the median, because the values below the median are, in total, farther from it than the values on the other side.

Sorted data (10 values)

  1. #170
  2. #276
  3. #378
  4. #481
  5. #585
  6. #688
  7. #792
  8. #892
  9. #992
  10. #1095
Middle values (#5 and #6): median 86.5Mode (most frequent)

Dot plot: each dot is one value; x̄ is the mean and x̃ is the median

01234707580859095ValueCountx̄x̃
Frequency table Rows: 8
ValueCountShare of dataNote
70110 %
76110 %
78110 %
81110 %
85110 %middle
88110 %middle
92330 %mode
95110 %
How it's calculated S
  1. Add the values

    ∑x=85+92+78+92+88+76+95+81+92+70=849\sum x = 85 + 92 + 78 + 92 + 88 + 76 + 95 + 81 + 92 + 70 = 849
  2. Mean

    xˉ=∑xn=84910=84.9\bar x = \frac{\sum x}{n} = \frac{849}{10} = 84.9
  3. Sort the data

    70, 76, 78, 81, 85, 88, 92, 92, 92, 9570,\ 76,\ 78,\ 81,\ \boxed{85},\ \boxed{88},\ 92,\ 92,\ 92,\ 95

    The boxed value(s) sit in the middle of the sorted list.

  4. Median (even count)

    x~=x(5)+x(6)2=85+882=86.5\tilde x = \frac{x_{(5)} + x_{(6)}}{2} = \frac{85 + 88}{2} = 86.5
  5. Mode

    Most frequent values: 92. Each appears 3 times, more often than any other value.

  6. Range

    R=max⁡−min⁡=95−70=25R = \max - \min = 95 - 70 = 25

About the mean, median and mode calculator

The mean is the sum of the values divided by how many there are. The median is the middle value once the data are sorted: the value at position (n + 1) ÷ 2 when n is odd, and the average of the two middle values when n is even. The mode is the value that occurs most often, and the range is the largest value minus the smallest.

For the 10 default quiz scores the sum is 849, so the mean is 84.9. Sorted, the 5th and 6th values are 85 and 88, which puts the median at 86.5; 92 appears three times and is the mode, and the range is 95 − 70 = 25.

Data can have several modes, all listed here, or none: when every value occurs equally often, no value is more typical than another. Standard deviation, quartiles and outliers are on the descriptive statistics calculator.

How to find the mean, median and mode

The mean, the usual average, is the sum divided by the count; the median is the middle value of the sorted data; the mode is the most frequent value. For 6, 2, 9, 4, 9 the mean is 30 ÷ 5 = 6, the sorted list 2, 4, 6, 9, 9 has median 6, and the mode is 9.

The formulas, for n values x₁ to xₙ:

  • Mean: x̄ = (x₁ + x₂ + … + xₙ) ÷ n.
  • Median: sort the values; with n odd it is the value at position (n + 1) ÷ 2, and with n even it is the average of the two middle values.
  • Mode: the value with the highest count. Two values tied for the highest count are both modes.
  • Range: the largest value minus the smallest, 9 − 2 = 7 in the example.

Worked mean, median and mode examples

These lists cover odd and even counts, repeated values, ties, negative numbers, decimals, an outlier and a single value. Means are rounded to six decimal places.

DataMeanMedianMode
2, 4, 644No mode (every value appears once)
1, 2, 3, 42.52.5No mode (every value appears once)
2, 2, 42.66666722 (appears twice)
1, 1, 2, 2, 31.821 and 2 (each appears twice)
1, 1, 2, 21.51.5No mode (every value appears twice)
-2, 0, 200No mode (every value appears once)
1.5, 2.5, 3.52.52.5No mode (every value appears once)
1, 2, 10034.3333332No mode (every value appears once)
7777 (appears once)
0, 0, 0000 (appears 3 times)
1, 2, 2, 93.522 (appears twice)

When every distinct value appears equally often, as in 1, 1, 2, 2, no value is more typical than another, so there is no mode. A list with a single distinct value, such as 0, 0, 0, keeps that value as its mode.

The NIST definitions of measures of location give the mean, median and mode used here.

Median with an even number of values

With an even count there is no single middle value, so the median is the average of the two middle ones. For 1, 2, 3, 4 the middle pair is 2 and 3, and the median is 2.5, a value that is not in the list.

Repeated values count every time they appear. In 2, 2, 4 the mean is 8/3 ≈ 2.666667; dropping the duplicate to 2, 4 would give 3 and describe different data.

Mean or median: which average to use

One extreme value moves the mean far more than the median. For 1, 2, 100 the mean is 34.333333, while the median stays at 2, so the median better describes a typical value when a few values sit far from the rest.

Use the mean for roughly symmetric data, the median for skewed data such as incomes or house prices, and the mode for the most common size or score. Before deleting an outlier, check whether it is an error or a real observation.

When a plain average is the wrong one

The mean gives every value equal weight. If a final exam counts for 70% of a grade and homework for 30%, an exam score of 90 and a homework score of 80 give 0.7 × 90 + 0.3 × 80 = 87, not the plain average of 85.

The weighted average calculator handles weights like these.

Averaging rates needs the same care. Driving 60 km at 60 km/h and another 60 km at 30 km/h takes 3 hours for 120 km, an average speed of 40 km/h, not the 45 km/h that averaging the two speeds suggests.

Entering the data

  • Separate values with commas, spaces or line breaks, and write decimals with a point, as in 2.5.
  • A list can hold from 1 to 5,000 values.
  • A mean that is not a whole number is also given as an exact fraction, such as 8/3.

For standard deviation, quartiles and outlier checks, use the descriptive statistics calculator.

Worked examples

Quiz scores (default)

Data
85, 92, 78, 92, 88, 76, 95, 81, 92, 70
Mean (average)
84.9
Median
86.5
Mode
92 (appears 3 times)
Range
25
Count
10
Sum
849
Minimum
70
Maximum
95
Mean as a fraction
849/10 = 84 9/10

Checked against: Independent calculation

calculator.net example, two modes

Data
10, 2, 38, 23, 38, 23, 21
Mean (average)
22.143
Median
23
Mode
23 and 38 (each appears twice)
Range
36
Sum
155
Mean as a fraction
155/7 = 22 1/7

Checked against: calculator.net mean, median, mode, range calculator worked example: mean 22.143, median 23, modes 23 and 38, range 36

Calculator Soup example, 16 values

Data
9, 10, 12, 13, 13, 13, 15, 15, 16, 16, 18, 22, 23, 24, 24, 25
Mean (average)
16.75
Median
15.5
Mode
13 (appears 3 times)
Range
16
Count
16
Sum
268
Minimum
9
Maximum
25

Checked against: Calculator Soup mean, median, mode calculator example output: mean 16.75, median 15.5, mode 13, range 16, count 16, sum 268

NIST StRD NumAcc1

Data
10000001, 10000003, 10000002
Mean (average)
10,000,002
Median
10,000,002
Mode
No mode (every value appears once)
Range
2
Mean as a fraction
not applicable

Checked against: NIST StRD NumAcc1 certified mean 10000002; median and range by hand from the sorted values 10000001, 10000002, 10000003

Questions

How do you find the mean, median and mode?

Add the values and divide by the count for the mean: 10, 2, 38, 23, 38, 23, 21 sum to 155, and 155 ÷ 7 = 22.14. Sort them (2, 10, 21, 23, 23, 38, 38) and take the middle one, the 4th, for the median: 23. Count repeats for the mode: 23 and 38 each appear twice, so both are modes. The range is 38 − 2 = 36.

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

Sort the values and average the two in the middle, at positions n ÷ 2 and n ÷ 2 + 1. For the 16 values 9, 10, 12, 13, 13, 13, 15, 15, 16, 16, 18, 22, 23, 24, 24, 25, the 8th and 9th are 15 and 16, so the median is 15.5. This is the definition in the NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1.

Can a data set have more than one mode or no mode?

Yes to both. NIST notes that the mode is not necessarily unique: 2, 3, 3, 5, 5, 8 has two modes, 3 and 5, and is called bimodal. When every value appears the same number of times, as in 4, 7, 9 or 1, 1, 2, 2, no value occurs more often than the others and the data have no mode.

Which average should I use: mean, median or mode?

Use the mean for roughly symmetric data without extreme values, the median when a few values are far from the rest, and the mode for categories or the most common size. One outlier moves the mean but not the median: for 3, 4, 5 the mean and median are both 4, but changing 5 to 50 lifts the mean to 19 while the median stays 4.

What is the difference between average and mean?

In everyday use "average" means the arithmetic mean, the sum divided by the count, and spreadsheet functions follow that: Excel's AVERAGE returns the mean. In statistics "average" is a looser word for any measure of center, so the median and mode are also called averages. When a report says "average" without saying which, it is almost always the mean.

About this calculator

xˉ=1n∑i=1nxix~={x((n+1)/2)n odd12(x(n/2)+x(n/2+1))n even\bar x = \frac{1}{n}\sum_{i=1}^{n} x_i \qquad \tilde x = \begin{cases} x_{((n+1)/2)} & n \text{ odd} \\ \tfrac12\left(x_{(n/2)} + x_{(n/2+1)}\right) & n \text{ even} \end{cases}

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1 Measures of location (mean, median, mode)
  2. NIST Statistical Reference Datasets: univariate summary statistics (NumAcc1)
  3. Python statistics module: mean, median, multimode

Checked against references

This calculator includes 6 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.