Enter Your Numbers
Median Calculator – Complete Guide to Finding the Median in Statistics
A median calculator is the fastest way to find the middle value of any dataset. Whether you have 5 numbers or 500, simply paste them in above and get the exact median instantly — with the sorted list and step-by-step working shown. Below, we explain everything you need to know: what the median is, how to calculate it manually, the formula, worked examples, and when to use it over the mean.
What is the Median?
The median is the middle value of a dataset when all numbers are arranged in ascending order. It divides the dataset into two equal halves — exactly 50% of values fall below it and 50% above. When two middle values exist (even-count datasets), the median is their average.
Dataset:
30,000 · 32,000 · 35,000 · 38,000 · 2,500,000 (a CEO's salary included)Mean = $527,000 — completely unrepresentative of the typical worker.
Median = $35,000 — the actual middle salary, unaffected by the outlier.
This is why government agencies report median household income, not mean.
Median Symbol in Statistics
There is no single universally agreed-upon symbol for the median. The most commonly used notations are x̃ (x-tilde), M, and Med. Some advanced statistics textbooks use μ1/2. In everyday use, M or Med are the most reader-friendly and widely recognized.
Median Formula
Median = x(n+1)/2
(xn/2 + xn/2+1) / 2
where n = total number of observations and all values must be sorted in ascending order first.
How to Find the Median (Step by Step)
Follow these four steps to calculate the median of any dataset:
- Arrange all values in ascending order (smallest to largest).
- Count the total number of values (n).
- If n is odd: the median is the value at position (n+1)/2.
- If n is even: add the two middle values (positions n/2 and n/2+1) and divide by 2.
Step-by-Step Examples
Example 1 — Odd number of values (n = 5)
Example 2 — Even number of values (n = 6)
Median Between Two Numbers
When you only have two numbers, the median is simply their average (arithmetic mean):
Median of a and b = (a + b) / 2
(5 + 9) / 2 =
7
(18.5 + 24.9) / 2 =
21.7
(3 + 6) / 2 =
4.5
(0 + 120) / 2 =
60
How to Calculate Median for Grouped Data
When data is organized into class intervals (e.g., 0–10, 10–20), you use the grouped data median formula:
Median = L + [(n/2 − F) / f] × h
- L = lower boundary of the median class
- n = total frequency (total number of observations)
- F = cumulative frequency before the median class
- f = frequency of the median class
- h = class width (interval size)
Grouped Data Example:
| Class Interval | Frequency (f) | Cumulative Freq. |
|---|---|---|
| 0–10 | 5 | 5 |
| 10–20 | 8 | 13 |
| 20–30 ← Median class | 12 | 25 |
| 30–40 | 7 | 32 |
| Total | 32 |
Types of Median
- Simple (ungrouped) median: The middle value of raw, unsorted data — what this calculator computes.
- Grouped median: Estimated from frequency distribution tables using the formula above.
- Weighted median: Used when data values carry different importance or weights.
- Running/Rolling median: Used in time-series analysis to smooth data.
When to Use Median vs Mean vs Mode
| Measure | Definition | Best For | Affected by Outliers? |
|---|---|---|---|
| Mean | Sum ÷ count | Symmetric, normal distributions | Yes — heavily |
| Median | Middle value | Skewed data, income, house prices | No — resistant |
| Mode | Most frequent value | Categorical data, surveys | Sometimes |
Real-Life Applications of Median
Median household income avoids distortion from billionaires.
Median home price better represents what buyers actually pay.
Median exam scores identify the typical student performance level.
Median survival time in clinical studies; median wait times in ER.
Preprocessing datasets — replacing outliers with median imputation.
Median response time, median order value, median customer age.
Why Use This Median Calculator?
Our online median calculator removes the need for manual sorting and calculation, which becomes error-prone for datasets larger than 10 values. It shows the fully sorted dataset, the position of the median, and the complete step-by-step working — making it ideal for students, researchers, and professionals who need to verify their results or learn the process.
Related Calculators
- Mean Calculator — find the arithmetic average
- Mean, Median & Mode Calculator — all three at once
- Descriptive Statistics Calculator — full summary statistics
- Standard Deviation Calculator — measure of spread
- Mean Median Mode Visualizer — see where they fall on a chart
Frequently Asked Questions
The median is the middle value of a dataset when all numbers are arranged in order from smallest to largest. Exactly half the values fall below it and half above it.
Sort the data in ascending order. Count the total values (n). If n is odd, the median is the value at position (n+1)/2. If n is even, average the two values at positions n/2 and (n/2)+1.
Add the two numbers together and divide by 2. For example, the median of 10 and 30 is (10 + 30) / 2 = 20. This is identical to finding their arithmetic mean.
The median is not affected by extreme values or outliers. This makes it a far more reliable measure of central tendency for skewed datasets — such as income data, real estate prices, or any dataset with very large or small values at the edges.
Yes. When the dataset has an even number of values, the median is the average of the two middle values, which often produces a decimal result (e.g., the median of 3 and 4 is 3.5).
There is no universally standardized symbol. The most common ones are x̃ (x-tilde), M, and Med. Some textbooks use μ₁/₂. In practice, most statisticians simply write "Median" to avoid confusion.
Use the median when your data is skewed or contains outliers — for example, salary data, house prices, or exam score distributions. Use the mean when your data is symmetrically distributed with no extreme values pulling the average up or down.
Median is used in salary and income reporting, real estate market analysis, educational test scoring, healthcare outcomes research, business analytics, and economic statistics — any situation where a "typical" value is needed that won't be distorted by extreme highs or lows.
Use the formula: Median = L + [(n/2 − F) / f] × h. First identify the median class (the class containing the n/2 th value), then apply the formula using the lower boundary (L), cumulative frequency before the class (F), class frequency (f), and class width (h).