The median is the middle value when data are listed in order. If there is an even number of values, the median is the average of the two middle values. Half the data lie at or below the median and half at or above it, and outliers barely move it.
In Spanish
mediana
Also called
middle value, 50th percentile, second quartile (Q2)
With an odd count, one value sits exactly in the middle. With an even count, two values share the middle, so the median is their average, which may not be in the data at all.
Formal definition and notation
Order the ndata values from least to greatest. The median is the value in position n + 12 of the ordered list. If n is odd, that position is a whole number and the median is that data value. If n is even, the position ends in .5, and the median is the mean of the values in positions n2 and n2 + 1. The median is a measure of center; in a box plot it is the line inside the box.
a common label on calculators; spreadsheets use the function MEDIAN
n + 12
n plus one, over two
the position of the median in the ordered list of n values
Key facts
Always put the data in order first, from least to greatest (or greatest to least).
Odd count: the median is one of the data values. Even count: it can be a number that is not in the data, like 7 for 2, 5, 9, 12.
The median resists outliers: for 3, 4, 5, 6, 100 the median is 5, but the mean is 23.6.
In a box plot the median is the line inside the box, and it splits the data into two halves with the same number of values.
For skewed data, such as incomes or home prices, the median describes a typical value better than the mean, which gets pulled toward the long tail.
Median position rule
Median position rule
position of the median = n + 12
n
the number of data values (count repeats)
position
where to look in the list after you put it in order
The rule gives a position, not the median itself. For n = 40 the position is 20.5, so the median is halfway between the 20th and 21st values.
Try it: find the middle
Interactive
Edit the numbers, drag a dot, or press Add an outlier. The green chips mark the middle value or values. Watch how far the mean moves compared with the median.
This interactive needs JavaScript. The worked examples below show the same ideas step by step.
Median examples, step by step
Example 1: An odd number of values
Warm-up
Find the median of 9, 3, 6, 11, 4.
Put the values in order: 3, 4, 6, 9, 11.
Count them: n = 5, so the middle is position 5 + 12 = 3.
The 3rd value in the ordered list is 6, with two values below it and two above.
Answer: The median is 6.
Example 2: An even number of values
Core
Eight students scored 72, 95, 88, 64, 90, 81, 77 and 85 on a quiz. Find the median score.
Order the scores: 64, 72, 77, 81, 85, 88, 90, 95.
There are n = 8 scores. The position 8 + 12 = 4.5 means the median is between the 4th and 5th scores.
Answer: The median score is 83, even though no student scored exactly 83.
Example 3: Median or mean when there is an outlier?
Test-style
Five homes on a street sold for 210, 225, 240, 255 and 1,150 thousand dollars. Find the mean and the median. Which better describes a typical price on the street?
The prices are already in order. With n = 5, the median is the 3rd value: 240.
The mean adds all the values and divides by how many there are; the median only finds the middle. For 1, 2, 3, 4, 100 the mean is 22 but the median is 3.
The mode is the value that appears most often. For 1, 1, 5, 7, 9 the mode is 1, but the median is 5.
Medianvs.Median of a triangle
In geometry, a median of a triangle is a segment from a vertex to the midpoint of the opposite side. It shares the idea of a middle, but it is a different term from the statistics median.
Quick check: 3 questions
Question 1 of 3
What is the median of 8, 2, 5, 10, 7?
Show answer and explanation
Answer: A. Order first: 2, 5, 7, 8, 10. The middle (3rd) value is 7. Choice B is the middle of the list as written, and 6.4 is the mean.
Question 2 of 3
What is the median of 3, 6, 8, 11, 14, 20?
Show answer and explanation
Answer: C. There are 6 values, so average the 3rd and 4th: 8 + 112 = 9.5. Choices A and B are each only one of the two middle values.
Question 3 of 3
A data set has 15 values in order. Which one is the median?
Show answer and explanation
Answer: B.n + 12 = 15 + 12 = 8, so the 8th value is the middle one, with 7 values below it and 7 above.
Median: frequently asked questions
What if there are two middle numbers?
That happens whenever the data set has an even number of values. Add the two middle numbers and divide by 2. For 4, 8, 10, 15 the middle values are 8 and 10, so the median is 8 + 102 = 9. The median is halfway between them, so it can be a decimal such as 9.5.
Is the median always one of the numbers in the data?
Only sometimes. With an odd number of values, the median is always the middle data value. With an even number, it is the average of the two middle values, so it is in the data only when those two are equal. For 2, 5, 9, 12 the median is 7, which is not in the list; for 4, 6, 6, 9 it is 6.
When should I use the median instead of the mean?
Use the median when the data are skewed or include outliers, such as incomes, house prices or the time people spend on a hobby. Outliers barely move it, which is why it is the safer average for skewed data. When the data are roughly symmetric with no outliers, the mean and median are close and either one works.
DataData are facts or values collected to answer a question, such as survey answers, measurements or counts. Numerical data are numbers you measure or count, like heights; categorical data are labels or groups, like favorite colors. Data are organized in tables and shown in graphs so patterns are easy to see.Statistics · Grade 2, Grade 3, Grade 6Whole NumberA whole number is 0 or a positive counting number: 0, 1, 2, 3, and so on. Whole numbers do not include fractions, decimals, or negative numbers, so 12 is a whole number but 8.5, 34 and −3 are not. Every whole number is also an integer.Number System · Grade 3, Grade 4, Grade 5MeanThe mean is the sum of the values divided by the number of values. It is the arithmetic average: add every value and divide by how many there are. For 3, 7, 5 and 9, the mean is 24 ÷ 4 = 6. The mean is the balance point of the data, so one outlier can pull it far.Statistics · Grade 5, Grade 6, Grade 7Box PlotA box plot displays a data set through five numbers: minimum, first quartile, median, third quartile, and maximum. The box holds the middle half of the data, a line inside it marks the median, and whiskers reach out to the smallest and largest values. It makes spread easy to compare between sets.Statistics · Grade 6, Grade 7, Grade 8QuartileA quartile is one of three values that split an ordered data set into four parts with about the same number of values. The first quartile, Q1, is the median of the lower half; Q2 is the median of all the data; Q3 is the median of the upper half. The interquartile range is Q3 − Q1.Statistics · Grade 6, Grade 7, StatisticsNumberA number is an amount or value used to count, measure, order and compare. We write numbers with digits (7), words (seven) or other symbols, but the number itself is the amount: 7 dots, the word seven and the numeral 7 all show the same number. Numbers include whole numbers, fractions, decimals and negatives.Number System · Kindergarten, Grade 1, Grade 2OutlierAn outlier is a data value that is far away from most of the other values in a set. In 4, 5, 6, 7, 50, the value 50 is an outlier. A common test flags any value more than 1.5 times the interquartile range below the first quartile or above the third. Outliers pull the mean strongly.Statistics · Grade 6, Grade 7, Grade 8AverageAn average is one number that stands for the typical size of the values in a data set. In everyday math, average means the mean: add all the values, then divide by how many values there are. In statistics, the median and the mode are also kinds of average.Statistics · Grade 5, Grade 6, Grade 7ModeThe mode is the value that appears most often in a data set. To find it, count how many times each value occurs and pick the most frequent one. A data set can have one mode, more than one mode, or no mode at all when every value appears only once. The mode works for categories, too.Statistics · Grade 5, Grade 6, Grade 7Median of a TriangleA median of a triangle is a line segment that joins a vertex to the midpoint of the opposite side. Every triangle has three medians, and they always meet at one point, the centroid. The centroid divides each median in a 2 : 1 ratio, with the longer part next to the vertex.Geometry · GeometryMidpointA midpoint is the point exactly halfway between the two endpoints of a line segment, so it splits the segment into two equal parts. On the coordinate plane, find it by averaging the coordinates: the midpoint of (x1, y1) and (x2, y2) is (x1 + x22, y1 + y22).Geometry · Grade 8, Algebra 1, GeometrySideA side is one of the straight line segments that form the outline of a polygon. Two sides meet at each corner, or vertex. A triangle has 3 sides and a square has 4, and adding the lengths of all the sides gives the perimeter.Geometry · Kindergarten, Grade 1, Grade 2Even NumberAn even number is an integer that can be divided by 2 with no remainder, so it can be split into two equal groups or into pairs. Even numbers end in 0, 2, 4, 6 or 8, such as 14, 236 and −10. Zero is even. Every even number can be written as 2n for some integer n.Number System · Grade 2, Grade 3, Grade 4Odd NumberAn odd number is a whole number that cannot be split into two equal groups: dividing it by 2 always leaves a remainder of 1. Odd numbers end in 1, 3, 5, 7 or 9, such as 7, 23 and 409. Every odd number can be written as 2k + 1, one more than a multiple of 2.Number System · Grade 2, Grade 3, Grade 4Line PlotA line plot shows data values along a number line, often with marks above each value. Each X or dot stands for one data value, and repeated values stack in a column, so the tallest stack is the mode. Line plots make it easy to see clusters, gaps, outliers and the spread of a small data set.Statistics · Grade 3, Grade 4, Grade 5Dot PlotA dot plot is a graph that shows each data value as a dot above its place on a number line. Dots for repeated values stack up in a column, so the tallest stack shows the mode, and you can see the center, spread, gaps and outliers of the data at a glance.Statistics · Grade 3, Grade 4, Grade 5HistogramA histogram uses bars to show how numerical data are grouped into intervals. The data are split into equal-width intervals, called bins, and each bar’s height is the count of values in that interval. The bars touch, because the intervals are continuous, which is what distinguishes a histogram from a bar graph.Statistics · Grade 6, Grade 7, Grade 8Interquartile RangeThe interquartile range (IQR) is the spread of the middle half of a data set: the third quartile minus the first quartile, IQR = Q3 − Q1. Because it ignores the lowest and highest quarters of the data, outliers barely change it. In a box plot it is the length of the box.Statistics · Grade 6, Grade 7, Algebra 1RangeThe range of a data set is the difference between the greatest and least values: maximum minus minimum. For 2, 5, 9, the range is 9 − 2 = 7. Range is a simple measure of spread: it tells how far apart the extreme values are, though one outlier can make it misleading about the rest of the data.Statistics · Grade 5, Grade 6, Grade 7StatisticsStatistics is the branch of math that collects, organizes, analyzes and interprets data to answer questions. Descriptive statistics summarize data with graphs and numbers such as the mean and median. Inferential statistics use a sample to draw conclusions about a whole population, with a stated amount of uncertainty.Statistics · Grade 6, Grade 7, Grade 8