Frequency Polygon Calculator

Frequency Polygon Calculator

Join the class midpoints of a frequency table into a line graph, and overlay a second group on the same classes, as counts or as percentages when the groups differ in size.

Midpoint = (lower + upper) ÷ 2

Enter one or two groups of data to draw the polygon

What Is a Frequency Polygon?

A frequency polygon is a line graph of a frequency table: each class is plotted as a point at its midpoint and height equal to its frequency, and the points are joined with straight lines. It traces the tops of a histogram's bars.

Its advantage over a histogram is overlaying. Two sets of bars on one chart hide each other, but two lines can be compared directly, so frequency polygons are the standard way to compare the shapes of two groups.

When the groups differ in size, plot percentages rather than counts. Otherwise the larger group's line sits higher everywhere simply because it has more people.

How to Draw a Frequency Polygon

As described in OpenStax Introductory Statistics, section 2.2. See Sources.

1. Build classes and find midpoints

midpoint = (lower limit + upper limit) ÷ 2

2. Plot and join the points

(midpoint, frequency) or (midpoint, frequency ÷ n × 100%)

3. Close it on the axis

add a zero-frequency class below the first and above the last

Closing it makes the area under the polygon equal the area of the matching histogram.

Worked Example: Two Schools of Different Sizes

Given:
The same exam is sat by 20 pupils at school A and 30 at school B. Marks range from 38 to 92.
Step 1:
Shared classes:
width 10, from 30 to 100, plus empty end classes
Step 2:
Convert to percentages (the schools differ in size):
A: each pupil = 5% · B: each pupil = 3.33%
Step 3:
Compare peaks and upper tails:
A peaks at 60–70 and 70–80 (30% each) · B peaks at 60–70 (33%) · 70+: A 50%, B 30%
Result:
School A's polygon sits further right

On counts, school B looks stronger in most classes simply because it has 10 more pupils. As percentages, A has the larger share of high marks, which is the fair comparison.

Frequency Polygon Table for the Example

Counts and percentages side by side. The first and last rows are the empty end classes.

Classes, midpoints, counts and percentages for the two schools
ClassMidpointA countA %B countB %
20–<302500%00%
30–<403500%13.3%
40–<504515%310%
50–<6055315%723.3%
60–<7065630%1033.3%
70–<8075630%620%
80–<9085315%26.7%
90–<1009515%13.3%
100–<11010500%00%

Common Frequency Polygon Mistakes

  • Plotting at class limits. Points go at the midpoints. Plotting at the lower limits shifts the whole shape left by half a class.
  • Leaving the ends floating. Without the zero-frequency classes, the polygon stops in mid-air and its area no longer matches the histogram.
  • Comparing counts for groups of different sizes. Use percentages, or the bigger group always looks "more".
  • Different classes for each group. Two polygons can only be compared if they share the same classes, which this page enforces.

Frequency Polygon FAQs

What is the difference between a histogram and a frequency polygon?

They show the same table. A histogram uses bars; a polygon joins the midpoints of the bar tops with lines, which is easier to overlay.

Why does the polygon start and end at zero?

An empty class is added at each end, so the line closes on the axis and encloses the same area as the histogram.

When should I use percentages?

Whenever you compare groups of different sizes. With equal sizes, counts and percentages give the same shape.

What is an ogive?

A related graph that plots cumulative frequency against upper class boundaries, showing how many values fall below each point.

How is the class width chosen?

Automatically from Sturges’ rule on all the data, rounded to a tidy number, unless you enter one.

Which class does a boundary value belong to?

The higher one: classes include their lower limit and exclude their upper limit.

Can I compare more than two groups?

This page overlays two. More lines are possible but quickly become hard to read.

Does the polygon show individual values?

No, values are grouped into classes. For every value, use a dot plot or stem-and-leaf plot.

Sources

Related Tools