Free 100% In-Browser Tool

Median Calculator

Calculate the median value, quartiles (Q1, Q3), and interquartile range (IQR) of any set of numbers.

Initializing tool...

Privacy First: 100% Client-Side Processing

Processed in your browser. Files are never uploaded.

How to Use the Median Calculator

  1. 1Enter your numbers separated by commas, spaces, or newlines.
  2. 2The calculator sorts your numbers from smallest to largest.
  3. 3If the count (n) is odd, the middle number is highlighted. If even, the average of the two middle numbers is computed.
  4. 4Inspect Q1, Q3, and the Interquartile Range (IQR).

Formula & How It Works

Median Formula

Median = Middle Value (odd n) or Average of Middle Pair (even n)

For an ordered dataset of size n: If n is odd, Median = x_((n+1)/2). If n is even, Median = [x_(n/2) + x_(n/2 + 1)] / 2.

Worked Examples

Odd Dataset Example

Input: 7, 3, 9, 1, 5

Explanation: There are 5 numbers. The third number in sorted order is 5.

Result: Sorted: [1, 3, 5, 7, 9] -> Median = 5

Even Dataset Example

Input: 12, 4, 8, 16

Explanation: There are 4 numbers. The average of middle elements 8 and 12 is 10.

Result: Sorted: [4, 8, 12, 16] -> Median = (8 + 12) / 2 = 10

Frequently Asked Questions

Why is the median resistant to outliers?▼

Unlike the mean, the median depends only on rank order, so extreme high or low values do not distort the central value.

Does this tool also compute the mean and mode?▼

Yes, secondary statistics including mean, mode, minimum, and maximum are displayed.

Can I enter decimals and negative numbers?▼

Yes, all real numbers are supported.

What is the Interquartile Range (IQR)?▼

IQR is the difference between the third quartile (Q3) and first quartile (Q1), representing the middle 50% of data.

Last reviewed & updated: 2026-03-28
Free & Open Access
Related Utilities

Explore complementary calculators and converters with instant client-side execution

More in Math

Explore Other Tool Categories

Browse our full collection of 50 free web utilities

View All 8 Categories