This calculator quickly finds the median value of your dataset. Just enter the raw data in the input area and click the “calculate” button to get instant results with a clear, step-by-step explanation.
Enter your data values separated by commas, spaces, tabs, or new lines. You can paste data directly from Excel.
Want to find the mean of the data instead? Try our sample mean calculator.
How to use the median calculator
Want to quickly find the median of your dataset using an online calculator? Here’s how our median calculator works:
- Enter the dataset, with values separated by commas
- Click the Calculate button
The calculator will instantly return the median and show you how to find the median by hand.
What is Median
The median is the middle value after arranging the values either in ascending or descending order. It is one of the measures of central tendency and represents the 50th percentile of the data.
Median Formula
The median formula varies based on whether you’re dealing with an odd or an even number of observations. If you’re working with an odd number of observations (i.e., n is odd), the median is the value located exactly in the middle.
Therefore, the median formula for an odd number of observations is:
Median = Value at position (n+1)/2
Where:
- n is the total number of observations
In other words, for a dataset with an odd number of observations, the median is simply the observation at position (n+1)/2 after sorting the data.
However, if you’re working with an even number of observations (i.e., n is even), there will be no single middle value. Instead, the median is the average of the two middle values.
Therefore, the median formula for an even number of observations is
Median = [Value at position (n/2) + Value at position (n/2 +1)]/2
Where:
- n = total number of observations
Simply stated, the median of an even number of observations lies halfway between the two central values. Thus, you should calculate the mean of these two middle values.
How to Find the Median by Hand: Examples
Want to learn how to find the median of even and odd numbers of observations? The following two examples show how to calculate the median, step-by-step.
Example 1. Odd Number of Observations
Find the median of the following data: 12, 5, 9, 3, 15
Solution
Step 1: Arrange the data in ascending order
Arranging the data from the smallest to the largest gives: 3, 5, 9, 12, 15
Step 2. Count the number of observations
There are 5 observations (n = 5). Thus, there is an odd number of observations.
Step 3. Apply the median formula when n is odd
The median formula for an odd number of observations is:
Median = Value at position (n+1)/2 of the ordered dataset
This means that we need to look at the value at (5+1)/2 position to get the median.
Therefore, the median is the value at position 3 of the ordered dataset. Hence, median = 9
Alternatively, you can use our online median calculator to get similar results as shown below:

Example 2. Even Number of Observations
Find the median of the following data: 8, 4, 10, 6
Step 1: Arrange the data in ascending order
Arranging the dataset in ascending order, we have: 4, 6, 8, 10
Step 2: Count the number of observations
There are 4 observations in the dataset (i.e., n = 4). Since 4 is even, there’s an even number of observations.
Step 3: Apply the median formula when n is even
By definition, the median formula for an even number of observations is:
Median = [Value at position (n/2) + Value at position (n/2 +1)]/2
Value at position n/2 = value at position 4/2
= value at position 2 in the ordered dataset
=6
Value at position (n/2+1) = Value at position (4/2+1)
= value at position (3)
=8
The median value is the average of these two values. Thus, median = (6+8)/2
= 7
Hence, median = 7
Our calculator also yields similar results, as shown below.

Frequently Asked Questions
The median is the middle value of a dataset after the data has been arranged in ascending or descending order. If the dataset has an even number of values, the median is the average of the two middle values.
To find the median of an odd number of observations, follow these steps:
-Sort the data from smallest to largest.
– Identify the value located exactly in the middle of the data. This is the median.
After sorting the data, identify the two middle values. The median is calculated by taking the average (mean) of these two values.
Yes. When a dataset contains an even number of observations, the median is the average of the two middle values, which can result in a decimal.
The median is less sensitive to outliers and extreme values than the mean. This makes it a better measure of central tendency for skewed data, such as income, house prices, or test scores.
No. A median calculator automatically sorts the data for you and applies the correct formula, saving time and reducing the risk of manual errors.