Frequency Distribution Calculator
Frequency Table & Histogram from Raw Data
Paste any list of numbers — get a complete frequency distribution table with class intervals, relative frequency, cumulative frequency, and a histogram. Uses Sturges's Rule for automatic bin selection.
Building distribution…
Paste a list of numbers above and click Calculate to build a frequency distribution table and histogram.
What Is a Frequency Distribution?
A frequency distribution organises raw data into class intervals and counts how many values fall within each interval. Instead of staring at a long list of numbers, you see the shape of your data at a glance — where values cluster, how spread out they are, and whether the distribution is symmetric or skewed.
Frequency distributions are used across every field that works with data. Teachers use them to summarise exam scores. Healthcare researchers use them to study patient ages and measurements. Quality engineers use them to check whether manufacturing output stays within tolerance. Biologists use them to describe population sizes. Whenever you have a list of continuous measurements and want to understand their pattern, a frequency distribution is the right starting point.
This calculator accepts any list of numbers, automatically selects a suitable number of class intervals using Sturges's Rule, and produces the complete frequency table — frequency (f), relative frequency (f/n), cumulative frequency, and cumulative relative frequency — alongside a histogram.
How to Build a Frequency Distribution Table
Building a frequency distribution by hand follows six steps. The calculator automates all of them.
Collect your data
Write down or import all values — exam scores, heights, temperatures, response times, or any other continuous measurement.
Find the range
Range = Maximum − Minimum. For 20 exam scores ranging from 45 to 98: Range = 98 − 45 = 53.
Choose the number of classes (k)
Apply Sturges's Rule: k = ⌈1 + 3.322 × log₁₀(n)⌉. For n = 20: k = ⌈1 + 3.322 × 1.301⌉ = ⌈5.32⌉ = 6 classes.
Calculate class width
Width ≈ Range / k = 53 / 6 ≈ 8.8. Round up to the next nice number: 10. Always round up so no data falls outside the last class.
Set class boundaries and tally
Start the first class at the nearest multiple of the class width at or below the minimum: [40, 50), [50, 60), …, [90, 100]. Tally each value into its class.
Compute relative and cumulative frequencies
Relative frequency = f / n. Cumulative frequency adds up all frequencies from the first class to the current one. The last cumulative relative frequency must equal 1.0000.
Worked example — 20 exam scores (45–98):
| Class | f | Rel. f | Cum. f | Cum. Rel. f |
|---|---|---|---|---|
| [40, 50) | 1 | 0.0500 | 1 | 0.0500 |
| [50, 60) | 2 | 0.1000 | 3 | 0.1500 |
| [60, 70) | 2 | 0.1000 | 5 | 0.2500 |
| [70, 80) | 4 | 0.2000 | 9 | 0.4500 |
| [80, 90) | 6 | 0.3000 | 15 | 0.7500 |
| [90, 100] | 5 | 0.2500 | 20 | 1.0000 |
How Many Classes Should You Use? — Sturges's Rule
Choosing the number of classes (bins) is the most consequential decision in frequency distribution analysis. Too few classes and you lose detail — everything lumps together. Too many and every class has a frequency of 1 or 0, which tells you nothing useful.
k = ⌈ 1 + 3.322 × log₁₀(n) ⌉
where n = number of data points and ⌈ ⌉ denotes the ceiling function
Sturges's Rule (1926) derives the optimal class count from the assumption that the data follow a roughly normal distribution. The formula comes from the maximum number of classes that can carry meaning for a dataset of size n when expressed in binary — roughly log₂(n) + 1. The factor 3.322 converts log₂ to log₁₀.
| Dataset size (n) | Sturges's k | Typical use case |
|---|---|---|
| 10–20 | 5–6 | Small surveys, classroom tests |
| 20–50 | 6–7 | Lab experiments, quality checks |
| 50–100 | 7–8 | Medical measurements, survey responses |
| 100–500 | 8–10 | National survey samples, factory output |
| 500–1,000 | 10–11 | Large datasets, census subgroups |
Sturges's Rule is a starting point, not a law. If your data are heavily skewed, bimodal, or very large (> 1,000 values), you may get better results with the Freedman–Diaconis rule or by choosing the bin count manually using the selector above.
Relative Frequency vs Cumulative Frequency
Relative Frequency (f/n)
Divides each class frequency by the total number of values. The result is a proportion between 0 and 1 (or a percentage if multiplied by 100). All relative frequencies must sum to 1.0000.
Use when comparing datasets of different sizes — a class with f=6 out of n=20 (30%) is easier to compare with another dataset than the raw count of 6.
Cumulative Frequency
Adds up frequencies from the first class through each successive class. The last cumulative frequency always equals n (total values). Cumulative relative frequency ends at exactly 1.0000.
Use for answering questions like "what percentage of students scored below 70?" — read the cumulative relative frequency at the [60, 70) boundary.
The ogive (cumulative frequency graph) plots cumulative frequency against class upper boundaries. It shows the percentile rank of any value — a useful companion to the histogram for understanding data spread.
How to Draw a Histogram
A histogram is a bar chart where the bars represent continuous class intervals. The key feature that distinguishes a histogram from an ordinary bar chart is that the bars touch — there are no gaps between them. This signals that the data are continuous, not categorical.
Histogram (continuous data)
- Bars touch — no gaps
- X-axis shows class intervals (ranges)
- Y-axis shows frequency (or density)
- Bar width = class width
- Used for: heights, ages, temperatures, scores
Bar Chart (categorical data)
- Gaps between bars
- X-axis shows distinct categories
- Y-axis shows frequency or count
- Bar widths can vary
- Used for: favourite colours, exam grades (A/B/C), survey options
When interpreting a histogram, look for the overall shape: a symmetric bell curve suggests a normal distribution; a right-skewed shape (long tail on the right) is common in income and waiting-time data; a left-skewed shape appears in test scores with an easy exam (most scores cluster near the top). A bimodal shape (two peaks) may indicate two distinct subgroups in your data.
Visual Guide: From Raw Data to Histogram
Follow a dataset of 20 exam scores through every step of frequency distribution construction.
Raw Data
45, 52, 58, 61, 67, 71, 73, 74, 78, 81, 83, 85, 87, 88, 89, 90, 92, 95, 97, 98
n = 20 values
Sort & Range
Min = 45
Max = 98
Range = 53
Sturges: k = 6
Class Intervals
[40, 50)
[50, 60)
[60, 70)
[70, 80)
[80, 90)
[90, 100]
width = 10
Tally Frequencies
[40,50) 1
[50,60) 2
[60,70) 2
[70,80) 4
[80,90) 6
[90,100] 5
Histogram
6 classes, right-skewed
Raw Data (n=20)
45, 52, 58, 61, 67, 71, 73, 74, 78, 81, 83, 85, 87, 88, 89, 90, 92, 95, 97, 98
Sort & Range → Sturges k=6 → Class width=10
Frequencies: 1, 2, 2, 4, 6, 5
[40,50) [50,60) [60,70) [70,80) [80,90) [90,100]
Frequency Distribution FAQ
What is a frequency distribution table?
How do I choose the number of classes for a frequency distribution?
What is Sturges's Rule?
What is the difference between relative frequency and cumulative frequency?
What is the difference between a histogram and a bar chart?
How do I calculate class width?
Can I use a frequency distribution for non-numeric data?
Related Calculators
Mean, Median & Mode Calculator
Compute central tendency statistics from any list
Standard Deviation Calculator
Sample & population variance and std dev from raw data
IQR Calculator
Q1, Q3, IQR, and outlier bounds with box plot
Probability Distribution Table
E(X), Var(X), CDF for discrete distributions
Z-Score Calculator
Convert raw scores to z-scores and percentile ranks
Normal Distribution Calculator
P(X < x), P(a < X < b), and bell-curve areas