Skip to content
Omnikalc

Grouped data median and quartile calculator

Enter the total frequency, the lower boundary, width and frequency of the class that holds the position, and the cumulative frequency before it to get the median, quartile or any percentile of a frequency table.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Value of the percentile

25.000

Position in the ordered data
60.00
Position inside the class (1 = yes)
1
The class contains the position: the result is valid
Upper boundary of the class
30.000
Cumulative frequency at the end of the class
75
Share of the class passed
50.0 %

The grouped data median and quartile calculator estimates the median, a quartile or any percentile of a frequency table by interpolating inside the class that contains it.

How the calculation works

  • Choose the percentile you want.
  • Enter the total number of observations and the class that contains the position: lower boundary, width, frequency and cumulative frequency before it.
  • The calculator gives the value, the position, a class check and the share of the class passed.

Example

A table of 120 exam scores has 45 scores below 20, and the class from 20 to 30 holds 30 scores. The median is at position 120 / 2 = 60.00. Since 45 ≤ 60 ≤ 75, it falls in that class, and the median is 20 + (60 − 45) / 30 × 10 = 25.000. The median is 50.0 % of the way through the class.

Why it matters

The calculator helps students who learn descriptive statistics, teachers who summarize results from a table, and analysts who have only grouped data from a report or a survey.

Good to know

Boundaries must be continuous: if the classes are 20 to 29 and 30 to 39 for whole numbers, use the real boundaries 19.5 and 29.5. Open-ended classes at the extremes cannot be interpolated. The cumulative frequency before the class is the sum of all the frequencies of lower classes, and the class check tells you if you picked the wrong one. For the mean of grouped data, use the class midpoints weighted by their frequencies, and for the mode, the modal class with its neighbors. When the class widths are unequal, interpolation still works inside the class, but histograms must be drawn with densities.

The percentile calculator works on raw values, the percentile rank calculator finds the rank of a value, the average calculator gives mean and median of a list and the histogram bin width calculator chooses classes.

Frequently asked questions

How do you find a median from grouped data?

Find the class where the cumulative frequency first reaches half of the total, then interpolate inside it: median = L + (N/2 − F) / f × w, where L is the lower boundary, F the cumulative frequency before the class, f its frequency and w its width.

What about quartiles and other percentiles?

The same formula works with another position. The first quartile uses N/4, the third quartile 3N/4, and the p-th percentile p × N / 100. Choose the class that contains that position.

How accurate is the result?

It assumes that values are spread evenly within the class, so it is an estimate. Narrower classes give a better estimate. Use the raw data when you have them.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.