What is a relative frequency histogram?
A relative frequency histogram looks just like an ordinary histogram, but the y-axis shows the proportion of observations in each bin rather than the raw count. Because every bar is a fraction of the whole, the heights always add up to 1 (or 100%), whatever the size of your data set.
How to make a relative frequency histogram
- Paste or type your raw data into the data box, or import an Excel or CSV file.
- Check the bins in the Bins tab. Choose a bin width that gives clean class intervals, such as 5 or 10.
- Keep the y-axis on Relative for decimals, or switch to Percent.
- Add a title and axis labels, then download your histogram or copy the relative frequency table.
Relative frequency formula
For each bin: relative frequency = f ÷ n, where f is the number of values in the bin and n is the total number of values.
| Score | Frequency (f) | Relative frequency (f ÷ 40) |
|---|---|---|
| 50–60 | 4 | 0.10 (10%) |
| 60–70 | 10 | 0.25 (25%) |
| 70–80 | 14 | 0.35 (35%) |
| 80–90 | 8 | 0.20 (20%) |
| 90–100 | 4 | 0.10 (10%) |
| Total | 40 | 1.00 (100%) |
The frequency table under the chart does this calculation for you, including cumulative relative frequency.
Why use relative frequency?
- Compare groups of different sizes on the same scale. Add a second data set or use the double histogram maker.
- Estimate probabilities: a bar of 0.35 means about a 35% chance that a randomly chosen value falls in that bin.
- Communicate clearly: “35% of students scored 70–80” is easier to grasp than “14 students”.
Need running totals instead? Try the cumulative frequency histogram maker, or go back to the main histogram maker.
Worked example: comparing two classes of different sizes
Class A has 20 students and Class B has 50. In the 70–80 range, Class A has 6 students and Class B has 12. Counts suggest Class B does better there, but relative frequency tells the real story: 6 ÷ 20 = 30% of Class A against 12 ÷ 50 = 24% of Class B. Add both classes as data sets, switch the y-axis to Percent, and the bars compare fairly.
Common mistakes to avoid
- Bars that don’t add up to 1 (or 100%). Divide by the total number of values, not by the number of bins.
- Using relative frequency with unequal bins. Wider bins collect more values just by being wider. Use density instead.
- Comparing groups with different bins. Shared bins are essential. This tool applies the same bins to every data set.
Do it in other software
| Software | How |
|---|---|
| Excel / Google Sheets | Count each bin with =FREQUENCY or =COUNTIFS, then divide each count by =COUNT(data). |
| Python | plt.hist(data, bins=b, weights=np.ones(len(data)) / len(data)), or seaborn.histplot(data, stat="probability"). |
| Desmos | histogram(L, width), then choose “Relative” in its settings. |
Related tools: Histogram Maker, Cumulative Frequency Histogram, Double Histogram Maker, Histogram from a Frequency Table and Frequency Polygon Maker.