ProMathTools
ProMathTools

Median Calculator – Find the Median With Steps

Sort your data, highlight the middle value(s), and see odd/even median steps — plus min, max, range, mean, and optional grouped-data mode.

e.g. 3, 1, 4, 1, 5 — commas, spaces, tabs, or semicolons

How it works

The median is the middle value of a sorted dataset. Unlike the mean, it depends only on order, so a few extreme outliers do not drag it as far. This calculator sorts your numbers, highlights the middle value(s), explains the odd/even rule, and also reports min, max, range, and mean so you can compare center and spread at a glance. Grouped-data mode estimates the median inside a frequency table with the standard class-interval formula.

Required Inputs & Typical Use Cases

Use the median for skewed income or price data, exam scores with a few perfect outliers, or any homework problem that asks for the middle value after sorting. Switch to grouped mode when your teacher gives class intervals with frequencies instead of a raw list.


The Formula

Raw (odd n): median = middle value after sorting
Raw (even n): median = (x₍n/2₎ + x₍n/2+1₎) / 2
Grouped: Median = L + ((n/2 − CF) / f) × h
  • n

    Number of observations (or total frequency)

  • L

    Lower boundary of the median class

  • CF

    Cumulative frequency before the median class

  • f

    Frequency of the median class

  • h

    Class width


Worked Example

  1. Odd raw data: 3, 1, 4, 1, 5

    Sorted: 1, 1, 3, 4, 5. n = 5 (odd) → median = 3 (highlighted middle value).

  2. Even raw data: 1, 2, 3, 4

    n = 4 (even) → median = (2 + 3) / 2 = 2.5.

  3. Single value: [7]

    n = 1 → the sorted list is just 7, so the median is 7.


Tips, Assumptions & Limitations

  • Separate numbers with commas, spaces, tabs, semicolons, or new lines.
  • Invalid tokens are reported by their position in the list.
  • For grouped data, enter one class per line: lower-upper, frequency.
  • Common mistake: averaging all values (the mean) when the question asks for the median.
  • Common mistake: forgetting to sort before picking the middle position.
  • When n is even, the median may be a halfway value that is not in the original list.

Companion guide: Median Calculator: Find the Middle Value With Steps

The median is the middle value after sorting. For an odd count, it is the single middle value. For an even count, it is the average of the two central values. This calculator sorts your data, highlights the middle value(s), and shows the steps.

Enter numbers separated by commas, spaces, tabs, semicolons, or new lines. Blank entries are ignored; invalid tokens are reported by position.

For frequency tables, enter class intervals and frequencies. The median uses L + ((n/2 − CF) / f) × h, where L is the lower class boundary of the median class, CF is the cumulative frequency before that class, f is its frequency, and h is the class width.

The mean averages all values and can be pulled by outliers. The median is the middle position after sorting, so extreme values affect it less. This tool reports both so you can compare them.

Not when n is even. Averaging the two central values can produce a halfway number (such as 2.5) that is not in the original list.

A single observation is already sorted, so the median equals that value. For example, the median of [7] is 7.

Related Calculators

Related Guides


How this calculator works

The median is the middle value of a sorted dataset. Unlike the mean, it is not pulled by extreme outliers, which makes it a robust summary for skewed income, house-price, or test-score data. This guide walks through the odd-n and even-n rules, a sorted highlighting workflow, and the grouped-data class-interval formula used in frequency tables.

Explanation

To find the median, sort the observations from smallest to largest. When the count n is odd, the median is the single value in position (n + 1) / 2. When n is even, there is no single middle observation, so the median is the arithmetic average of the two central values in positions n/2 and n/2 + 1. That average can be a number that does not appear in the original list (for example, the median of 1, 2, 3, 4 is 2.5). For grouped continuous data arranged in class intervals with frequencies, the median is estimated inside the median class with Median = L + ((n/2 − CF) / f) × h, where L is the lower class boundary, CF is the cumulative frequency before that class, f is the class frequency, and h is the class width. Reporting the mean alongside the median helps you see skew: if the mean is much larger than the median, the right tail is heavy.

Formula

Raw (odd n): median = x₍(n+1)/2₎ after sorting
Raw (even n): median = (x₍n/2₎ + x₍n/2+1₎) / 2
Grouped: Median = L + ((n/2 − CF) / f) × h

Worked example

Odd raw data 3, 1, 4, 1, 5 sorts to 1, 1, 3, 4, 5. n = 5 is odd, so the median is the middle value 3. Even raw data 1, 2, 3, 4 has n = 4; the two middle values are 2 and 3, so the median is (2 + 3) / 2 = 2.5. A single observation such as [7] is already sorted; the median is 7.

How to use this tool

Choose raw or grouped mode. For raw data, paste numbers separated by commas, spaces, tabs, semicolons, or new lines. The calculator sorts the list, highlights the middle value(s), explains the odd/even rule, and also reports min, max, range, and mean. For grouped data, enter one class per line as lower-upper, frequency (for example 10-20, 5).

Frequently asked questions

What is the median and how is it calculated?
The median is the middle value after sorting. For an odd count it is the single middle value; for an even count it is the average of the two central values.
When should I prefer the median over the mean?
Prefer the median when the distribution is skewed or contains outliers. The mean averages every value and can shift dramatically with a few extremes; the median only depends on order.
How does grouped-data median work?
Locate the class whose cumulative frequency first reaches n/2, then apply Median = L + ((n/2 − CF) / f) × h inside that class.
Does the median have to be a data value?
Not when n is even. Averaging the two central observations can produce a halfway value that is not in the original list.
How do I enter my numbers?
Separate values with commas, spaces, tabs, semicolons, or new lines. Blank tokens are ignored; invalid tokens are reported by position.

Read the full guide →

About UsBlogChrome ExtensionFAQsTerms and ConditionsPrivacy PolicySitemap
EmailLinkedInFacebook

© 2025-2026 PromathTools. All rights reserved.

Built by KruskalCode – SaaS & Automation Experts · EverydayDevTools