Histogram with Unequal Class Widths (Frequency Density)
Turn grouped data into a frequency density histogram, read frequencies back from bar heights, estimate how many values lie in any range and find grouped statistics.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Enter classes
Type each class's lower and upper bound and its frequency, adding rows with + Class.
- 2Choose direction
Pick whether you know the frequencies or the bar heights.
- 3Read the histogram
Check widths, densities and the drawn bars with frequencies on top.
- 4Estimate a range
In Estimate a count enter From and To and read the shaded estimate with its steps.
- 5Get statistics
Open Mean, median, quartiles for the estimates and interpolation working.
- 6Print or practise
Print the table and results, or use Practice for exam-style density questions.
About this tool
When class widths are unequal, a bar chart of frequencies lies: a wide class looks important just because it is wide. A true histogram fixes this by making the area of each bar proportional to the frequency, so the vertical axis is frequency density, frequency divided by class width. This is a standard higher-tier GCSE and IGCSE topic and appears in A-level and college statistics. Enter your classes and frequencies and the tool computes widths and densities and draws the histogram with labelled bars. Or work backwards: enter the bar heights read from an exam histogram and get the frequencies. Shade any range to estimate how many values fall inside it, and get the estimated mean, median by interpolation, quartiles and modal class, all with the working shown.
Who it is for
GCSE and IGCSE higher-tier students, A-level and IB students, teachers preparing histograms for worksheets, and anyone summarising grouped data such as times, heights or incomes in unequal bands.
Frequency density
For each class the width is upper bound minus lower bound, and frequency density = frequency ÷ width. A class of 30 to 50 with frequency 26 has width 20 and density 1.3. The histogram draws each bar from its lower to its upper bound with height equal to the density, so area = width × density = frequency. The numbers above the bars are the frequencies, which is what a reader usually wants.
Reading frequencies back
Exam questions often show a histogram and ask for a frequency. Choose I know the bar heights, type the densities and the tool multiplies by the widths. This is also how you complete a frequency table from a partly drawn histogram.
Estimating within a range
The estimate tab shades the region between two values and adds up the area inside it. For a class that is only partly inside the range, the tool assumes the values are spread evenly and takes the matching fraction of that class. Every part of the sum is listed.
Grouped statistics
The estimated mean uses midpoints: Σ(f × midpoint) ÷ Σf. The median is found by linear interpolation in the class containing the n ÷ 2th value, and the quartiles in the same way at n ÷ 4 and 3n ÷ 4. The modal class is the class with the highest frequency density, the tallest bar, which is not always the one with the highest frequency.
Worked example
Homework times in classes 0-10, 10-20, 20-30, 30-50, 50-80 and 80-120 minutes have frequencies 8, 15, 22, 26, 18 and 8 (97 students). Between 25 and 60 minutes the estimate is 5 × 2.2 + 26 + 10 × 0.6 = 43 students. The median position is 48.5, which lies in 30-50 after 45 students, so the median is about 30 + 3.5 ÷ 26 × 20 = 32.7 minutes.
Limits
All grouped statistics are estimates because the raw values are unknown, and the even-spread assumption may not hold within a class. Classes must join up without gaps; for discrete data, adjust the boundaries (for example 9.5 to 19.5) yourself. Open-ended classes such as "80 or more" need a chosen upper bound before a histogram can be drawn.
Worked example
Class 30-50 with f = 26 has density 1.3; between 25 and 60 about 43 values; median about 32.7.
Quick facts
- Category: Math & Science
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: Pearson Edexcel GCSE (9-1) Mathematics specification 1MA1: histograms with unequal class intervals
Frequently asked questions
What is frequency density?
Frequency divided by class width. It is the height of a histogram bar, so that the area of the bar equals the frequency.
Why not just plot frequency?
With unequal widths, plotting frequency makes wide classes look bigger than they are. Using density keeps the areas honest.
How do I find a frequency from a histogram?
Multiply the bar height (frequency density) by the class width. Choose I know the bar heights in the table tab to do this for every class.
How do I estimate how many values lie in part of a class?
Multiply the width of the part you want by the frequency density of that class, then add any whole classes in the range.
Which class is the modal class?
The class with the greatest frequency density (the tallest bar). With unequal widths it can differ from the class with the largest frequency.
Can I draw a frequency polygon too?
Yes. Tick Frequency polygon to join the midpoints of the bar tops with a line.
