Understanding the frequency polygon calculator — concept and principle
This calculator turns raw data into a frequency table with equal-width classes and lists the points of the frequency polygon: each class midpoint with its frequency, plus an empty class at each end. It also reports the modal class. Use it for statistics homework, to compare distributions or to prepare a graph on paper or in a spreadsheet.
How it is calculated
Classes: [lower, lower + width), starting at the first lower boundary you choose
Frequency = number of values in each class
Midpoint = lower boundary + width ÷ 2
Points to plot: (midpoint, frequency), with an extra class of frequency 0 at each end
- Choosing boundaries half a unit below the data precision (49.5 for whole-number scores) keeps every value strictly inside a class.
- The highest point marks the modal class.
The principle
A frequency polygon is a line-graph version of a histogram: instead of bars, it joins the tops of the bars at their midpoints. Adding a zero-frequency class at each end brings the line down to the x-axis, so the area under the polygon matches the total of the histogram. Because lines are easy to overlay, polygons are good for comparing two distributions on one graph.
Worked example
Default inputs: 20 scores from 54 to 95, first boundary 49.5, width 10.
- Classes and frequencies: 49.5 – 59.5: 2, 59.5 – 69.5: 3, 69.5 – 79.5: 6, 79.5 – 89.5: 6, 89.5 – 99.5: 3.
- Number of classes 5, number of values 20, highest frequency 6, last upper boundary 99.5.
- Midpoints: 54.5, 64.5, 74.5, 84.5, 94.5, plus 44.5 and 104.5 for the empty end classes.
- Points to plot: (44.5, 0), (54.5, 2), (64.5, 3), (74.5, 6), (84.5, 6), (94.5, 3), (104.5, 0).
- Modal class midpoints: 74.5, 84.5 (a tie).
How to read the result
The polygon peaks across the 70s and 80s and falls off on both sides, a roughly symmetric shape. Two equal highest classes mean the data have a broad top rather than a single peak. Changing the width or the starting boundary can change the look, so try more than one choice.
Common mistakes
- Plotting at class limits instead of midpoints.
- Leaving out the zero classes at the ends.
- Using boundaries that coincide with data values.
- Using different class widths within one table.
Frequently asked questions
What is a frequency polygon?
A line graph that joins the points (class midpoint, frequency) of a frequency table.
Why add classes with zero frequency?
So the polygon starts and ends on the x-axis.
How is it different from a histogram?
A histogram uses bars; a frequency polygon joins the bar tops at their midpoints.
Sources: OpenStax, Introductory Statistics 2e (2023), §2.2 Histograms, Frequency Polygons, and Time Series Graphs