Introduction
The median is the middle value in a set of numbers arranged from smallest to largest. It tells you the center point of your data, where half the values fall below and half fall above. Unlike the mean, the median is not pulled off course by very large or very small numbers, making it a reliable way to describe what is "typical" in a dataset.
This Median Calculator finds the median of any dataset in seconds. Enter your numbers as raw data or use grouped class intervals with frequencies. The tool sorts your values, locates the middle position, and shows the result along with a clear step-by-step solution. You also get the mean, mode, quartiles, standard deviation, a frequency table, and visual charts — all calculated at once so you can fully understand your data's spread and center.
How to Use Our Median Calculator
Enter a set of numbers or grouped data, and this calculator will find the median, mean, mode, and other key statistics. It also shows a step-by-step solution, a frequency table, and helpful charts.
Input Mode: Choose between "Raw Data" or "Grouped Data." Raw Data lets you type in individual numbers. Grouped Data lets you enter class intervals with their frequencies, which is useful when your data is already organized into ranges.
Enter Numbers (Raw Data): Type or paste your numbers into the text box. You can separate them with commas, spaces, tabs, semicolons, or new lines. You can also paste data directly from Excel or Google Sheets.
Class Intervals and Frequencies (Grouped Data): If you are using grouped data, enter the start value, end value, and frequency for each class interval. Click "Add Row" to include more class intervals, or click the trash icon to remove a row.
Calculate: Press the "Calculate" button to get your results. The calculator will display the median, mean, mode, and count at the top. Below that, you will see supporting statistics like the minimum, maximum, range, quartiles, interquartile range, standard deviation, and variance.
Step-by-Step Solution: Review the step-by-step breakdown to see exactly how the median was found. For raw data, it shows the sorted list and the middle value. For grouped data, it shows the median class and the formula used.
Reset: Click the "Reset" button to clear your inputs and restore the default sample data so you can start a new calculation.
What Is the Median?
The median is the middle value in a set of numbers when they are lined up from smallest to largest. It tells you the center point of your data — half the numbers fall below it, and half fall above it. The median is one of the three main measures of central tendency in statistics, along with the mean (average) and the mode (most frequent value). You can explore all three together using our Mean Median Mode Calculator.
How to Find the Median
Finding the median takes just a few steps:
- Sort your numbers from lowest to highest.
- Count how many numbers you have. This count is called n.
- If n is odd, the median is the number sitting right in the middle. Its position is (n + 1) / 2. For example, in the set {3, 7, 9}, n = 3, so the median is at position 2 — which is 7.
- If n is even, there is no single middle number. Instead, you take the two numbers closest to the center and find their average. For example, in {3, 7, 9, 12}, n = 4, so the median is (7 + 9) / 2 = 8. If you need help computing that simple average, our Average Calculator can do it instantly.
Median for Grouped Data
Sometimes data comes in groups, or class intervals, rather than individual values — for example, "10–20 with a frequency of 15." When this happens, you cannot sort individual numbers because you do not have them. Instead, you use the grouped median formula:
Median = L + ((n/2 − F) / f) × h
- L = lower boundary of the median class
- n = total frequency (total count of all observations)
- F = cumulative frequency of all classes before the median class
- f = frequency of the median class
- h = width of the median class (upper boundary minus lower boundary)
The median class is the first class whose cumulative frequency reaches or passes n/2.
Why Use the Median Instead of the Mean?
The median is especially useful when your data has outliers — extreme values that are much higher or lower than the rest. Outliers can pull the mean far away from the center, but they barely affect the median. For example, the incomes {30k, 35k, 40k, 42k, 500k} have a mean of about 129k, which does not represent most people in the group. The median is 40k, which is a much better picture of the typical value.
This is why median household income is reported more often than mean household income, and why home prices are often described using the median.
Related Statistics Explained
This calculator also shows several supporting statistics alongside the median:
- Mean: The sum of all values divided by the count. It uses every data point, so it is sensitive to outliers.
- Mode: The value that appears most often. A data set can have no mode, one mode, or multiple modes.
- Q1 and Q3: The 25th and 75th percentiles. Q1 is the median of the lower half, and Q3 is the median of the upper half.
- Interquartile Range (IQR): Q3 minus Q1. It measures the spread of the middle 50% of your data and is useful for spotting outliers. For a deeper look, try our IQR Calculator.
- Standard Deviation: A measure of how spread out the values are from the mean. A small standard deviation means the numbers are close together; a large one means they are spread out. You can explore this further with our dedicated Standard Deviation Calculator.
- Variance: The square of the standard deviation. It is used in many statistical formulas and tests.
For additional statistical analysis, you may also find these tools helpful: the Z Score Calculator to see how far a value falls from the mean, the Confidence Interval Calculator for estimating population parameters, the Normal Distribution Calculator for probability under a bell curve, and the Range Calculator for a quick measure of data spread. If your analysis involves comparing groups, our t Test Calculator and ANOVA Calculator can help determine whether differences are statistically significant.
When You Might Use a Median Calculator
A median calculator is handy for homework, research projects, business reports, and any situation where you need to quickly find the center of a data set. It saves time, removes the chance of sorting mistakes, and gives you a full picture of your data with quartiles, charts, and a frequency table all in one place. If you're working with percentages rather than raw numbers, our Percentage Calculator and Percent Change Calculator are also worth exploring.