Median Calculator
Find the median (middle value) of a dataset.
What is the median?
The median is the middle value of a data set once you line the numbers up in order. Half the values fall below it and half above. Because it ignores how extreme the outliers are and only cares about position, it often describes "typical" better than the mean does, which is why incomes and house prices are usually reported as medians.
If there is an odd number of values, the median is simply the one in the middle. If there is an even number, it is the average of the two middle values.
How to use this calculator
- Enter the numbers in your data set, separated by commas or spaces.
- Make sure the values are numbers only, then sort them from least to greatest if needed.
- Count how many values you have, because the median depends on whether the count is odd or even.
- Read the middle value, or the average of the two middle values, and compare it with the calculator result.
The formula explained
The median is the center of an ordered data set. If there is an odd number of values, it is the single middle number, and if there is an even number of values, it is the average of the two middle numbers.
- x = a value in the data set
- n = the number of values in the data set
Step by step method
- Sort the data from smallest to largest.
- Count the total number of values, n.
- If n is odd, choose the middle value. If n is even, find the two middle values and average them.
Worked example
Problem. Find the median of the data set 4, 9, 2, 7, 5, 10.
- First, order the numbers: 2, 4, 5, 7, 9, 10.
- There are 6 values, so the data set has an even number of terms. The two middle values are 5 and 7.
- Average the two middle values: (5 + 7) / 2 = 6.
Answer. The median is 6.
Tips and common mistakes
- Always sort the data before looking for the middle value, because the median only works on ordered data.
- If there are two middle numbers, do not pick one of them, average them instead.
Frequently asked questions
When should I use the median instead of the mean?+
Use the median when your data has outliers or is skewed. A few very large or very small values barely move the median, so it gives a truer sense of the typical value than the mean in those cases.
Do I need to sort the numbers first?+
For the method, yes, the data must be in order. But you do not have to do it by hand: this calculator sorts your numbers automatically before finding the middle.
What is the median of an even number of values?+
When there is no single middle value, you take the two values closest to the middle and average them. That average is the median, even if it is not one of the original numbers.
More Mathematics Tools
Explore related calculators in this category
Absolute Value Calculator
Calculate the absolute value of any number. Use this free calculator for fast, accurate answers, complete with the formula and a worked example.
Absolute Value Equation Solver
Solve equations of the form |ax + b| = c.
Adding Fractions Calculator
Add two fractions with step-by-step simplification.
One-Way ANOVA Calculator
Perform one-way ANOVA on multiple groups.
You Might Also Like
Popular tools from other categories
AC to DC Converter Calculator
Convert AC voltage to DC voltage for different rectifier configurations. Free online calculator with instant, step-by-step results.
Acid-Base Titration Calculator
Calculate concentration from titration data. Get quick, accurate results with this free online calculator, including formulas and worked examples.
ABV Calculator
Calculate alcohol by volume from original and final gravity. Free calculator with instant calculations, the underlying formula, and an easy-to-follow example.
Amortization Schedule Calculator - Free Online
Free Generate a complete amortization schedule. Step-by-step solutions and formulas included. Free, accurate results with step-by-step explanations.
Can't Find the Right Calculator?
Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.