Median (Middle Value) Formula

Mathematics & Education Formula • Published on July 30, 2026 • Last updated July 30, 2026

Mathematical Equation

$$\text{Median} = \begin{cases} x_{\left(\frac{n+1}{2}\right)} & \text{if } n \text{ is odd} \[8pt] \frac{x_{\left(\frac{n}{2}\right)} + x_{\left(\frac{n}{2}+1\right)}}{2} & \text{if } n \text{ is even} \end{cases}$$

Variable Definitions

Median

Middle value of sorted dataset

n

Total number of data points

x_{(k)}

k-th ordered observation in sorted dataset

Detailed Explanation

In-Depth Guide

The median formula finds the central midpoint value of an ordered numerical sequence, separating the top 50% from bottom 50%.

How to Calculate: Step-by-Step

1. Arrange dataset values in ascending order. 2. Count total entries n. 3. If n is odd, median is middle element at position (n+1)/2. 4. If n is even, median is average of elements at positions (n/2) and (n/2 + 1).

Worked Calculation Example

Dataset [7, 3, 9, 1, 5]: - Sorted: [1, 3, 5, 7, 9] (n = 5 odd). - Middle rank = (5+1)/2 = 3rd element. - Median = 5.

Common Use Cases

  • Real estate home price metrics
  • Household income distribution analysis
  • Customer waiting time statistics

Frequently Asked Questions

Median is resistant to luxury multi-million dollar outliers that artificially inflate the average price.

What do you need to work out next?

Search 190+ free tools by name, or pick a category below. Every one runs instantly in your browser — no signup, nothing to install.

Browse all tools