Math calculators

Median Calculator

Updated May 20, 2026 By Jehan Wadia
Input Mode
Separate values with commas, spaces, tabs, newlines, or semicolons. Paste directly from Excel or Sheets.

Results

Median
Mean (Average)
Mode
Count (n)
Supporting Statistics
Minimum
Maximum
Range
Sum
Q1 (25th Percentile)
Q3 (75th Percentile)
Interquartile Range (IQR)
Standard Deviation (Pop.)
Standard Deviation (Sample)
Variance (Pop.)
Step-by-Step Solution
Sorted Data
Frequency Distribution
Value Frequency Cumulative Freq. Relative Freq. (%)
Data Distribution
Box Plot Summary

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:

  1. Sort your numbers from lowest to highest.
  2. Count how many numbers you have. This count is called n.
  3. 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.
  4. 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.


Frequently asked questions

What is the difference between the median and the average?

The median is the middle number when your data is sorted from smallest to largest. The average (also called the mean) is the sum of all numbers divided by how many there are. The average uses every value in the calculation, so one very large or very small number can change it a lot. The median only looks at the middle position, so extreme values barely affect it.

Can I paste data from a spreadsheet into this calculator?

Yes. You can copy a column or row of numbers from Excel, Google Sheets, or any spreadsheet and paste it directly into the input box. The calculator recognizes commas, spaces, tabs, and new lines as separators, so your pasted data will be read correctly.

What happens if I enter an even number of values?

When the count of numbers is even, there is no single middle value. The calculator takes the two values closest to the center and averages them. For example, if the two middle values are 10 and 14, the median is (10 + 14) / 2 = 12.

What happens if I enter only one number?

If you enter just one number, that number is the median. It is also the mean, the minimum, and the maximum since there is only one value in the dataset.

What does the frequency table show?

The frequency table shows each unique value (or class interval) along with how many times it appears, the running total of frequencies (cumulative frequency), and the percentage each value makes up of the whole dataset. The row containing the median is highlighted so you can spot it quickly.

When should I use the grouped data mode?

Use grouped data mode when your numbers are already organized into ranges (class intervals) with frequencies. This is common in textbook problems, surveys, and large datasets where individual values are not listed. You enter the start, end, and frequency for each class, and the calculator uses the grouped median formula.

What is a box plot and how do I read it?

A box plot is a chart that shows five key values: the minimum, Q1 (25th percentile), median, Q3 (75th percentile), and maximum. The box in the middle spans from Q1 to Q3, and the line inside the box marks the median. The lines (whiskers) extend to the minimum and maximum. It gives you a quick visual of how spread out your data is.

Does this calculator work with negative numbers or decimals?

Yes. You can enter negative numbers, decimals, or a mix of both. The calculator handles them all correctly when sorting and computing the median and other statistics.

What is the difference between population and sample standard deviation?

Population standard deviation is used when your data includes every member of the group you are studying. It divides by n. Sample standard deviation is used when your data is just a portion of a larger group. It divides by n − 1 to account for the smaller sample size. The sample version is slightly larger.

Can the median be a number that is not in my dataset?

Yes. When you have an even count of numbers, the median is the average of the two middle values. That average may not match any number in your original data. For example, the median of {2, 5, 8, 11} is (5 + 8) / 2 = 6.5, which does not appear in the set.

How many numbers can I enter at once?

There is no strict limit built into the calculator. You can enter hundreds or even thousands of values. Very large datasets may take a moment longer to process and chart, but the results will still be accurate.

What separators can I use between my numbers?

You can use commas, spaces, tabs, semicolons, or new lines to separate your numbers. You can also mix them. The calculator will correctly split your input no matter which separator you choose.

What does 'No mode' mean in the results?

If every number in your dataset appears only once, no value is more frequent than any other. In that case, the calculator displays No mode because there is no most common value.