Statistics Tool

Median of Grouped Data Calculator

Estimate the median for continuous grouped frequency distributions using class interval linear interpolation. Automatically generates cumulative frequency tables and identifies the median class.

Grouped Frequency Interpolation
Supports both 1.5 and 1,5 decimals
Class Intervals & Frequencies
#Lower Bound (L)Upper Bound (U)Frequency (f)Action
1
2
3
4

How the Grouped Data Median Formula Works

In demographic censuses, actuarial science, and large surveys, individual data points are commonly aggregated into continuous ranges or class intervals. To calculate median grouped data when individual measurements are hidden within bins, you apply the statistical grouped data median formula.

The grouped data median method uses linear interpolation within the median class. It pinpoints the cumulative frequency position $N/2$, calculates how many items into the median class that position lies, and scales proportionally across the class width $h$: Median = L + [((N/2 - CF) / f_m) × h].

Equation

Grouped Frequency Median Formula

Median = L + [ ((N / 2) - CF) / f_m ] × h
Where:
  • Median=Estimated Grouped Median: The calculated 50th percentile value of the continuous frequency distribution.
  • L=Lower boundary of median class: The exact lower limit of the class interval containing the median item.
  • N=Total sample size: Total cumulative frequency of all classes combined: N = Σf.
  • CF=Preceding cumulative frequency: The cumulative frequency of the class interval immediately preceding the median class.
  • f_m=Frequency of median class: The number of observations falling within the median class interval.
  • h=Class width (interval size): The width of the median class interval: h = Upper Limit - Lower Limit.

Note: CF represents the cumulative frequency of the preceding class. If the median class is the very first class, CF is 0.

Step-by-Step Worked Examples

Walk through two complete real-world calculation problems or click any example to load its numbers directly into the calculator.

Example 1

University Physics Exam Mark Distribution

A physics professor compiles exam results into five grade brackets: 0-20 (4 students), 20-40 (16 students), 40-60 (30 students), 60-80 (38 students), and 80-100 (12 students). Calculate the estimated median score.

Given Values:
0 - 20: f = 4 (CF = 4)20 - 40: f = 16 (CF = 20)40 - 60: f = 30 (CF = 50)60 - 80: f = 38 (CF = 88)80 - 100: f = 12 (CF = 100)
Solution Steps:
  1. Total frequency N = 4 + 16 + 30 + 38 + 12 = 100 students
  2. Median item position = N / 2 = 100 / 2 = 50th student
  3. Locate median class: CF reaches 50 in class [40 - 60]
  4. Identify parameters: L = 40, CF_prev = 20, f_m = 30, h = 60 - 40 = 20
  5. Apply formula: Median = 40 + [ (50 - 20) / 30 ] × 20 = 40 + [ 30 / 30 ] × 20 = 40 + 20 = 60.00
Calculated Result:60.00 marks
Example 2

Consumer Demographic Age Distribution

A marketing survey records the age brackets of retail shoppers: 18-25 (12 people), 25-35 (28 people), 35-50 (35 people), 50-65 (20 people), and 65-80 (5 people). Find the estimated median shopper age.

Given Values:
18 - 25: f = 1225 - 35: f = 2835 - 50: f = 3550 - 65: f = 2065 - 80: f = 5
Solution Steps:
  1. Total frequency N = 12 + 28 + 35 + 20 + 5 = 100 respondents
  2. Median position = 100 / 2 = 50th person
  3. Cumulative frequencies: 12, 40, 75, 95, 100. The 50th item lies in the [35 - 50] age bracket.
  4. Parameters: L = 35, CF_prev = 40, f_m = 35, h = 50 - 35 = 15
  5. Apply formula: Median = 35 + [ (50 - 40) / 35 ] × 15 = 35 + [ 10 / 35 ] × 15 = 35 + 4.2857 = 39.29 years
Calculated Result:39.29 years

Grouped Data Median FAQs

Why do we need an interpolation formula for grouped data?

When data is presented in grouped frequency tables (e.g. census reports, salary brackets), the raw individual measurements are unavailable. We only know that a certain number of observations fall inside each class range. The grouped median formula uses linear interpolation to estimate the exact median value assuming observations are evenly spread across the median class interval.

How do you identify the median class in a frequency table?

First, sum all the frequencies to find the total sample size N, then compute N / 2. Next, calculate the running cumulative frequencies (CF) for each row. The median class is the first class interval whose cumulative frequency is equal to or greater than N / 2.

What core assumption does the grouped median formula make?

It assumes a uniform distribution (constant density) of observations throughout the median class interval. While individual points may cluster within the real world, assuming uniform distribution is statistically optimal when no further internal data is known.

Can class intervals have unequal widths?

Yes! The formula explicitly incorporates the specific width (h = Upper Bound - Lower Bound) of the median class. Even if other classes have different widths, the calculation remains valid as long as h reflects the true width of the median class itself.

How does the grouped median differ from the grouped mean?

The grouped mean uses midpoints of every class interval weighted by frequency, which makes it sensitive to extreme outliers in top or bottom categories. The grouped median is robust against extreme values because it depends only on the location and frequency of the central observation.