Overview
A frequency polygon joins the midpoints of a histogram's bars with a line, which makes it easy to compare the shape of different data sets.
Paste your numbers, separated by spaces, commas or new lines. A column copied from a spreadsheet works too.
Worked examples
| Inputs | Result |
|---|---|
| Your numbers12, 15, 15, 18, 21, 22, 22, 22, 25, 27, 28, 31, 34, 34, 38, 41, 45, 52Number of binsAutomatic | Peak: 20 to 30 (7 values)18 valuesmean 27.889lowest 12highest 525 classes, each 10 wide |
How it works
Automatic bins use Sturges' rule, which suggests about 1 + log₂(n) groups, then round the width to a tidy number. Pick a number of bins yourself to get exactly that many equal groups. A value on the edge between two bins counts in the higher one, except the largest value, which stays in the last bin.
The formula
| n | How many values you have |
| range | Highest value minus lowest value |
Practical tips
- The line starts and ends at zero, one class beyond your data, so the shape closes.
- A frequency polygon carries the same information as a histogram with the same classes.
- Lines are easier to overlay than bars, which is why polygons suit comparisons.
Frequently asked questions
What is the midpoint of a class?
The value halfway between its lower and upper edges.
Is a frequency polygon the same as a histogram?
They show the same counts. A histogram draws bars and a polygon draws a line through their midpoints.
Why does the line touch zero at both ends?
It is drawn to an empty class on each side, which closes the shape.