BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Median Calculator: Find the Median (Middle Value) of Any Dataset

Use this free median calculator to instantly find the middle value of any dataset. Enter your numbers below and get the median with a full step-by-step solution — works for odd sets, even sets, and includes the sorted data. Also known as a median finder or middle number calculator.

Odd Dataset (5 values):
2, 4, 5, 7, 9 → Median = 5
Middle position = (5+1)/2 = 3rd term
Even Dataset (4 values):
1, 2, 4, 6 → Median = 3
Average of 2nd & 3rd terms: (2+4)/2 = 3
Median between two numbers: Simply add them and divide by 2. Example: median of 10 and 20 = (10 + 20) / 2 = 15

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.

Why median beats mean for skewed data:
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-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

When n is ODD
Median = x(n+1)/2
Value at position (n+1)/2
When n is EVEN
(xn/2 + xn/2+1) / 2
Average of the two middle values

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:

  1. Arrange all values in ascending order (smallest to largest).
  2. Count the total number of values (n).
  3. If n is odd: the median is the value at position (n+1)/2.
  4. 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)

Dataset: 4, 7, 2, 9, 5
Step 1 — Sort ascending: 2, 4, 5, 7, 9
Step 2 — Count values: n = 5 (odd)
Step 3 — Middle position: (5+1)/2 = 3rd term
Step 4 — Median = 5

Example 2 — Even number of values (n = 6)

Dataset: 8, 3, 12, 1, 7, 5
Step 1 — Sort ascending: 1, 3, 5, 7, 8, 12
Step 2 — Count values: n = 6 (even)
Step 3 — Two middle positions: 3rd = 5, 4th = 7
Step 4 — Median = (5 + 7) / 2 = 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
Median of 5 and 9:
(5 + 9) / 2 = 7
Median of 18.5 and 24.9:
(18.5 + 24.9) / 2 = 21.7
Median of 3 and 6:
(3 + 6) / 2 = 4.5
Median of 0 and 120:
(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
n/2 = 32/2 = 16 → falls in class 20–30 (cumulative 13 to 25)
L=20, F=13, f=12, h=10
Median = 20 + [(16 − 13) / 12] × 10 = 20 + 2.5 = 22.5

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

💰 Income & Economics
Median household income avoids distortion from billionaires.
🏠 Real Estate
Median home price better represents what buyers actually pay.
🎓 Education
Median exam scores identify the typical student performance level.
🏥 Healthcare
Median survival time in clinical studies; median wait times in ER.
📊 Data Science
Preprocessing datasets — replacing outliers with median imputation.
📈 Business
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

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).