Mean, Median, Mode and Range Calculator
Calculate the measures of central tendency of a data set: mean, median, mode and range, with the sorted list and the detail of each calculation.
One value per line, or values separated by spaces, semicolons or commas followed by a space. Both the decimal point and the decimal comma are accepted.
Data sorted in ascending order
-
Calculation details
Was this tool useful?
How does this tool work?
This calculator gives the main descriptive statistics of a data set in one go: mean, median, mode, range, minimum, maximum, sum and count. Paste a list of grades, measurements, prices or times; the tool sorts the data and explains each calculation, so you can check an exercise or quickly summarize data.
The arithmetic mean (the average) is the sum of the values divided by how many there are (the count). It uses every value, which makes it sensitive to extreme values: a single very high salary is enough to pull a team’s average upward.
The median splits the sorted list into two groups of equal size: half of the values are less than or equal to it, the other half greater than or equal to it. With an odd count, it is the middle value; with an even count, it is the average of the two middle values. It resists extreme values better than the mean.
The mode is the value that appears most often. A data set can have several modes (it is then called bimodal or multimodal) or none, when all the values are different. It is the only measure that makes sense for non-numeric data, such as the best-selling shoe size.
The range is the difference between the largest and the smallest value. It is the simplest measure of spread, but it depends on only two values; to measure the spread of the whole data set, use the variance and the standard deviation.
Comparing the mean and the median tells you about the shape of the distribution: a mean clearly above the median points to a few very high values (a distribution skewed to the right), a mean below it to a few very low values.
How to use this tool
Paste the data
One value per line, or separated by spaces, semicolons or commas followed by a space; a spreadsheet export works.
Read the measures
Mean, median and mode are highlighted, along with the range, count, sum, minimum and maximum.
Check the sorted list
The data in ascending order makes it easy to spot a typing error or an outlier.
Follow the details
Each measure comes with the calculation that leads to it, including the position of the median.
Formulas for measures of central tendency
For a data set of n values x₁, x₂, …, xₙ, and x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎ the same data sorted:
Mean
x̄ = (x₁ + x₂ + … + xₙ) ÷ n = (Σ xᵢ) ÷ n
Median, n odd
Me = x₍(n+1)/2₎
Median, n even
Me = (x₍n/2₎ + x₍n/2+1₎) ÷ 2
Range
R = maximum − minimum
- n
- count, number of values
- xᵢ
- value at position i
- Σ
- sum of all the values
Use cases
Grade averages
Summarize the grades of a term or a class. For different weights, use the weighted average calculator.
Statistics exercises
Check the calculation of the mean, median and range in a middle school or high school exercise.
Prices, salaries and lead times
Compare the mean and the median to see whether a few extreme values distort the overall picture.
Measurements and quality control
Summarize a set of measurements before calculating their standard deviation.
Examples
A student’s test scores
Sum 109 for 8 scores. Sorted: 9, 11, 12, 14, 15, 15, 15, 18; the median is the average of the 4th and 5th values, (14 + 15) ÷ 2.
Input
12, 15, 11, 15, 18, 9, 15, 14Result
Mean 13.625; median 14.5; mode 15Odd count
Sorted 1, 3, 5, 7, 9: the 3rd value is the median. No mode, since every value appears once.
Input
3, 7, 1, 9, 5Result
Median 5Effect of an extreme value
The 9,000 salary pulls the mean upward while the median remains representative of the “middle” salary.
Input
1800, 1900, 2000, 2100, 9000Result
Mean 3,360; median 2,000Bimodal data set
3 and 7 each appear twice: the data set has two modes.
Input
2, 3, 3, 5, 7, 7, 8Result
Modes 3 and 7Tips and best practices
- Prefer the median to the mean when the data contains extreme values (incomes, house prices, response times).
- The average of a set of averages is not the overall average if the groups differ in size: a weighted average is needed.
- The mode is useful for repeated values (shoe sizes, whole-number grades), much less for continuous measurements where every value is unique.
- A typing error (a forgotten decimal point, 145 instead of 14.5) is easy to spot by looking at the minimum, the maximum and the sorted list.
- To copy a column from a spreadsheet, paste it directly: one value per line is recognized.
Sources and references
- Weisstein E.W., Arithmetic Mean (opens in a new tab), Wolfram MathWorldPage in English
- Weisstein E.W., Median (opens in a new tab), Wolfram MathWorldPage in English
- Weisstein E.W., Mode (opens in a new tab), Wolfram MathWorldPage in English
- NIST/SEMATECH, e-Handbook of Statistical Methods: Measures of Location (opens in a new tab)Page in English
Frequently asked questions
How do you calculate the mean?
Add up all the values, then divide by how many there are. For 12, 15 and 18: (12 + 15 + 18) ÷ 3 = 45 ÷ 3 = 15.
How do you calculate the median?
Sort the values in ascending order. If the count n is odd, the median is the value at position (n + 1) ÷ 2. If n is even, it is the average of the values at positions n ÷ 2 and n ÷ 2 + 1. For 9, 11, 12, 14, 15, 15, 15, 18 (n = 8), the median is (14 + 15) ÷ 2 = 14.5.
How do you find the mode of a data set?
Count how many times each value appears: the mode is the one that occurs most often. If there is a tie, the data set has several modes; if every value appears only once, it has no mode.
What is the difference between mean and median?
The mean takes the exact value of each data point into account, the median only their order. An extreme value changes the mean a lot but the median very little: this is why people often talk about the median salary rather than the average salary.
What is the range of a data set?
It is the difference between the maximum and the minimum value. For 9 and 18, the range is 18 − 9 = 9. It indicates the span of the data, but not how the values are distributed between these two bounds.
Can a data set have several modes?
Yes. If several values reach the same highest frequency, they are all modes: the data set is bimodal (two modes) or multimodal. The tool lists them all.
How do I enter decimal numbers?
Use either the decimal point (14.5) or the decimal comma (14,5). Separate values with a line break, a space or a semicolon. A comma followed by a space, or a list such as 1,2,3, is read as a separator.
Related tools
Keep going with these tools
Tools similar or complementary to this one.
Similar tools
Calculate the standard deviation and variance of a data set, for a population (σ) and for a sample (s), with the deviations table.
Calculate a weighted average and the next grade needed to reach your target.
Profile every CSV column with detected type, missing values, cardinality, and descriptive numeric statistics.