Frequency Polygon Calculator
Draw a frequency polygon and compute mean, standard deviation, modal class, and median class from grouped data or raw values.
📈 What is the Frequency Polygon Calculator?
A frequency polygon is a line graph drawn by plotting class midpoints on the x-axis against their frequencies on the y-axis, then connecting the points with straight line segments. The polygon is extended to zero on both ends, one class width before the first midpoint and one class width after the last, so the shape closes on the x-axis. This calculator draws the polygon automatically and computes key grouped-data statistics: mean, standard deviation, modal class midpoint, and median class midpoint.
Frequency polygons are used in many contexts. In education, teachers plot exam score distributions to compare class performance across terms or sections. In business analytics, analysts visualize sales volume by price range or customer age bracket. In public health, epidemiologists plot disease incidence by age group to identify high-risk populations. In quality control, engineers plot defect frequencies by cause category to prioritize corrective action. The primary advantage over a histogram is that multiple frequency polygons can be overlaid on the same chart without bars blocking each other, making comparisons much easier to read.
The two input modes cover the most common workflows. From Frequency Table mode accepts pre-computed midpoints and their frequencies, which is the format used in most textbooks and spreadsheet outputs. From Raw Data mode accepts individual data points and automatically groups them into equal-width classes using Sturges-style selection, computes midpoints, and builds the polygon. This is useful when you have raw survey responses or measurements that have not yet been grouped.
A common point of confusion is the difference between the modal class and the arithmetic mode. The modal class midpoint is simply the midpoint of the class with the highest frequency. For a bell-shaped distribution, this will be close to the mean and median. For a skewed distribution, the three values diverge, and the polygon will show a visible asymmetry with a longer tail on one side. Reading the shape of the polygon tells you at a glance whether your data is symmetric, left-skewed, right-skewed, or bimodal.
📐 Formulas
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 - Exam Score Distribution
A class of 50 students sat an exam. Grouped scores: midpoints 10, 20, 30, 40, 50 with frequencies 5, 12, 18, 10, 5. Find the mean and standard deviation.
Example 2 - Monthly Rainfall by Category
40 months of rainfall data grouped into 5 classes with midpoints 20, 40, 60, 80, 100 mm and frequencies 3, 8, 14, 10, 5.
Example 3 - Grouped Test Scores (Four Classes)
30 students took a standardized test. Grouped scores with class midpoints 30, 50, 70, 90 and frequencies 4, 9, 11, 6.
❓ Frequently Asked Questions
🔗 Related Calculators
What is a frequency polygon and how is it drawn?
A frequency polygon is a line graph drawn by connecting the midpoints of the tops of histogram bars. First compute the midpoint of each class interval. Plot each midpoint on the x-axis against its frequency on the y-axis. Connect the plotted points with straight line segments. Extend the line to zero on both ends, one class width before the first and one class width after the last midpoint, to close the polygon.
How do you find the midpoint of a class interval?
The midpoint (also called the class mark) is the average of the lower and upper class boundaries: midpoint = (lower limit + upper limit) / 2. For the class 10 to 20, the midpoint is (10+20)/2 = 15. For 20 to 30 it is 25. These midpoints are the x-values plotted on the frequency polygon.
What is the formula for the mean from a frequency polygon?
Mean = sum(f_i * m_i) / sum(f_i), where m_i is the midpoint of class i and f_i is its frequency. For midpoints 10, 20, 30, 40, 50 with frequencies 5, 12, 18, 10, 5: Mean = (50+240+540+400+250)/50 = 1480/50 = 29.6.
How do you find the modal class from a frequency polygon?
The modal class is the class interval with the highest frequency. Its midpoint is the mode estimate for the grouped data. On the polygon, it corresponds to the highest peak. For frequencies 5, 12, 18, 10, 5 on midpoints 10-50, the modal class midpoint is 30.
How is standard deviation computed from grouped data?
Population SD from grouped data = sqrt[sum(f_i * (m_i - mean)^2) / N], where N is the total frequency. For midpoints 10-50 with frequencies 5,12,18,10,5: mean=29.6, variance=123.84, SD = sqrt(123.84) = 11.13.
What is the difference between a histogram and a frequency polygon?
A histogram uses bars to represent frequency for each class interval. A frequency polygon uses line segments connecting the midpoints of those bars. The frequency polygon is better for comparing two or more distributions on the same chart because the lines do not overlap as bars would.
Can a frequency polygon have two peaks?
Yes. A bimodal distribution produces a frequency polygon with two distinct peaks. This indicates two common ranges of values in the data, such as a class with both very young and very old students, or a bimodal exam score distribution. A unimodal polygon has one peak.
What is the median class in a frequency polygon?
The median class is the class whose cumulative frequency first reaches or exceeds N/2, where N is the total number of observations. For N=50, you look for the class where the running total of frequencies reaches 25. If cumulative frequencies at classes 1 through 3 are 5, 17, 35, the median class midpoint is the third class midpoint.
How do you choose the number of class intervals for a frequency polygon?
A common rule is to use between 5 and 15 classes. Sturges' formula suggests k = 1 + 3.322 * log10(n) classes for n observations. For 50 observations, k = 1 + 3.322 * log10(50) = 1 + 3.322 * 1.699 = about 7 classes. Fewer classes oversimplify the shape; more classes produce a jagged polygon.
What is a cumulative frequency polygon (ogive)?
An ogive is drawn by plotting cumulative frequencies against the upper class boundaries and connecting the points. Unlike a frequency polygon (which shows density per class), the ogive shows total count up to each point. The ogive always slopes upward from zero to N. The 50th percentile (median) is read at the point where the ogive reaches N/2.