Enter your values
Enter your data
Enter each observation once; the calculator sorts values from least to greatest.
Separate numbers with commas, spaces, semicolons, or new lines. Decimals, negative values, and repeated values are allowed.
What is a median calculator?
The median is the middle value after a data set is arranged in order. For an even number of observations, it is the arithmetic mean of the two middle values.
Important terms
- Median
- The center of an ordered data set; at least half the observations are no greater than it and at least half are no less than it.
- Observation
- One recorded value in the data set. Repeated values count as separate observations.
- Odd-sized data set
- A data set with an odd number of observations, which has one observation at its center.
- Even-sized data set
- A data set with an even number of observations, whose median is the average of its two center values.
When this method is useful
- Find a typical center when a data set includes outliers.
- Summarize skewed data such as incomes, waiting times, or house prices.
- Check the center of a short list of measurements, scores, or observations.
Formula and variables
- n
- the number of observations
- x₍ᵢ₎
- the observation at position i after sorting
- Med(x)
- the median of the data set
First arrange the observations in nondecreasing order. An odd-sized list has one center position, while an even-sized list has two; average those two center values to obtain the median.
Domain note: Enter finite real numbers. At least one observation is required. Values can be repeated, negative, or decimal; every entered value is counted once.
How to use this calculator
- 1
Enter the data values, separated by commas, spaces, semicolons, or new lines.
- 2
Sort the values from least to greatest.
- 3
For an odd count, select the single middle value. For an even count, average the two middle values.
- 4
Use the ordered list to verify the center position and interpret the result.
Step-by-step examples
Example 1
Problem: Find the median of 3, 7, 9, 12, 18.
Substitution: The data are already ordered and contain five values. The center position is (5 + 1) / 2 = 3.
Result: The third value is 9, so the median is 9.
Two observations lie below the median and two lie above it; the median is the central observation.
Example 2
Problem: Find the median of 4, 6, 10, 14.
Substitution: There are four values, so average the values at positions 2 and 3: (6 + 10) / 2.
Result: Median = 8.
For an even-sized data set, the median does not have to be one of the original observations.
Example 3
Problem: Find the median of 2, 2, 5, 8, 8, 11.
Substitution: The six ordered observations have middle values 5 and 8.
Result: Median = (5 + 8) / 2 = 6.5.
Repeated values remain separate observations when determining the middle positions.
Rules, edge cases, and related ideas
Order determines the median
The values must be sorted before the center position can be identified; the original input order does not affect the answer.
Odd and even counts use different center rules
Odd counts have one middle observation. Even counts have two middle observations, whose arithmetic mean is the median.
Outliers have limited influence on the median
An extreme value can change the ordering at an endpoint without pulling the median as strongly as it can pull the mean.
Edge cases and limitations
- One observation is its own median.
- Repeated observations are retained and each contributes to the count.
- Negative and decimal values are valid finite observations.
- Nonnumeric tokens and non-finite values are rejected.
- For very large lists, the calculator limits accepted input to 5,000 observations.
How this differs from a related concept
The mean uses every value's magnitude and can shift substantially because of outliers. The median uses the ordered center and is more resistant to extreme values. Neither measure alone describes variability or distribution shape.
Understand the result
The median describes the center by position rather than by adding all values. It is resistant to extreme observations, making it useful for skewed distributions. It does not describe the full spread or shape of the data, so pair it with measures such as range or interquartile range when those matter.
Common mistakes
- Taking the middle value before sorting the data.
- For an even count, choosing one of the two center values instead of averaging them.
- Removing repeated observations even when they are valid members of the data set.
- Assuming the median must be one of the input values; even-sized data sets can have a median between observations.
- Treating the median as a measure of spread rather than a measure of center.
Frequently asked questions
How do I find the median?
Sort the values. Select the center value if the count is odd; average the two center values if the count is even.
Can the median be a number that is not in my data?
Yes. With an even number of observations, the median is the average of the two middle values and can fall between them.
Does the input order matter?
No. The calculator sorts the values before finding the center.
Are repeated values counted?
Yes. Each entered value is a separate observation, including duplicates.
When is the median more useful than the mean?
The median is often more representative when data are strongly skewed or include unusually high or low values.