Frequency Distribution Calculator
Enter comma-separated numbers and choose a class count. The calculator builds the full grouped frequency table — with midpoints, relative frequencies, and cumulative frequencies — instantly.
RF = Relative Frequency | CF = Cumulative Frequency | CRF = Cumulative Relative Frequency
For a visual output, try the frequency distribution table maker or the histogram maker.
What Is a Frequency Distribution?
Raw data — a column of 200 exam scores, a list of 500 customer wait times — does not tell you much on its own. You cannot see where the values cluster, how spread out they are, or whether any pattern exists. A frequency distribution fixes that by grouping each value with a count of how many times it appears.
A frequency distribution is a summary table or graph showing how often each value or group of values occurs in a dataset. It organizes raw data into classes (groups) or distinct values, each paired with a count — the frequency — of observations in that class.
Example: 30 students scored between 60–69 on an exam. That class has a frequency of 30.
The word frequency here just means count — how many times something shows up. Once you have all the counts, patterns that were invisible in the raw list become obvious: where do most values concentrate? Are there any gaps? Is the data roughly symmetric or does it lean heavily to one side?
Frequency distributions sit inside descriptive statistics, the branch of statistics focused on summarizing what your data looks like before you make any inferences. They connect directly to measures like the mean, median, and mode — all of which you can calculate from a frequency table — and to visual tools like the histogram.
Here is a simple example to keep in mind throughout this guide. Suppose 20 customers rate your product on a scale of 1–5:
| Rating (x) | Frequency (f) | Notes |
|---|---|---|
| 1 | 2 | 2 customers gave 1 star |
| 2 | 3 | 3 customers gave 2 stars |
| 3 | 5 | 5 customers gave 3 stars |
| 4 | 7 | 7 customers gave 4 stars |
| 5 | 3 | 3 customers gave 5 stars |
| Total | 20 | n = 20 |
That table is a frequency distribution. It shows at a glance that ratings of 4 were the most common and that ratings of 1 were rare. You will see this same dataset transformed into all four types in the next section.
The 4 Types of Frequency Distribution
Every frequency distribution is one of four kinds, depending on how the data is organized and what the count column represents. Here is what distinguishes them:
Ungrouped
Each distinct value gets its own row. Best for small datasets or discrete data with few possible values (e.g., dice rolls, ratings, number of children).
Grouped
Values are placed into class intervals (e.g., 10–19, 20–29). Necessary for continuous data or large datasets where listing every distinct value would be unwieldy.
Relative
Each frequency is expressed as a proportion or percentage of n. Removes the effect of sample size — essential when comparing two groups of different sizes.
Cumulative
Frequencies are accumulated — each row shows how many observations fall at or below that value or class. Used to find medians and percentiles from tables.
The Same Dataset in All Four Types
No competitor page shows you this. Below is the customer rating dataset from above displayed as all four types side by side, so the differences are concrete rather than abstract.
| Rating (x) | Ungrouped Freq (f) | Relative Freq (f/n) | Relative Freq (%) | Cumulative Freq (CF) | Cumulative Rel Freq (%) |
|---|---|---|---|---|---|
| 1 | 2 | 0.10 | 10% | 2 | 10% |
| 2 | 3 | 0.15 | 15% | 5 | 25% |
| 3 | 5 | 0.25 | 25% | 10 | 50% |
| 4 | 7 | 0.35 | 35% | 17 | 85% |
| 5 | 3 | 0.15 | 15% | 20 | 100% |
| Total | 20 | 1.00 | 100% | — | — |
Reading across a single row — say, rating = 3 — tells you four different things at once: 5 people gave that rating, which is 25% of all respondents, 10 people rated it 3 or lower, and 50% of all respondents gave a 3 or lower. Each column answers a different question about the same data.
If your data has fewer than 20–25 distinct values, an ungrouped table works well. Once you have hundreds of possible values — daily sales figures, individual exam scores, patient weights — grouping into class intervals is the only practical option.
Grouped Frequency Distribution
When data is continuous or has too many distinct values to list individually, you split the range into equal-width intervals called class intervals or bins. Here is the same kind of data but now using exam scores from a class of 40 students:
| Class Interval | Tally | Frequency (f) | Midpoint (x) | Cumulative Freq |
|---|---|---|---|---|
| 40–49 | || | 2 | 44.5 | 2 |
| 50–59 | |||| | 4 | 54.5 | 6 |
| 60–69 | |||| |||| | 9 | 64.5 | 15 |
| 70–79 | |||| |||| ||| | 13 | 74.5 | 28 |
| 80–89 | |||| ||| | 8 | 84.5 | 36 |
| 90–99 | |||| | 4 | 94.5 | 40 |
| Total | 40 | — | — |
The midpoint column — the average of each class's lower and upper boundary — is how you estimate the mean from a grouped table. The 70–79 class has the most students, so the mode class is 70–79. And from the cumulative frequency column, you can see that exactly half the class (20 students) scored below the 70–79 range, which is where you would look to interpolate the median.
How to Build a Frequency Distribution Table (Step-by-Step)
The process below applies to grouped data. For ungrouped data, steps 3 and 4 are skipped — you simply list each distinct value and count how many times it appears.
Dataset: Delivery times (minutes) for 25 orders
Raw data: 14, 22, 31, 18, 27, 9, 35, 21, 16, 29, 12, 38, 25, 19, 33, 8, 26, 20, 41, 17, 24, 32, 11, 28, 15
Count your observations: n = 25 delivery times.
Find the range: Maximum = 41, Minimum = 8. Range = 41 − 8 = 33 minutes.
Choose the number of classes: Sturges' formula: k ≈ 1 + 3.322 × log₁₀(25) = 1 + 3.322 × 1.398 ≈ 5.6. Round to 6 classes.
Calculate class width: 33 ÷ 6 = 5.5. Round up to 6 minutes per class.
Set class boundaries: Start just at or below the minimum (8). First class: 8–13. Second: 14–19. Continue until all values are covered.
Tally and count: Sort each data point into its class and count.
Verify the total: All frequencies must sum to n = 25.
| Class (minutes) | Tally | Frequency (f) | Midpoint | Rel. Freq. | Cum. Freq. |
|---|---|---|---|---|---|
| 8–13 | ||| | 3 | 10.5 | 12% | 3 |
| 14–19 | |||| | | 6 | 16.5 | 24% | 9 |
| 20–25 | |||| | | 6 | 22.5 | 24% | 15 |
| 26–31 | |||| | 5 | 28.5 | 20% | 20 |
| 32–37 | ||| | 3 | 34.5 | 12% | 23 |
| 38–43 | || | 2 | 40.5 | 8% | 25 |
| Total | 25 | — | 100% | — |
✓ Total frequency = 25 = n. The distribution is slightly right-skewed: most deliveries fall in the 14–25 minute range, but a few extend to 38–43 minutes.
Write intervals as 8–13, 14–19, 20–25 (not 8–14, 14–20). Every data point belongs to exactly one class. Overlapping boundaries — a common mistake — cause values that land on a boundary (like 14) to be counted twice.
Key Formulas at a Glance
These are the formulas you will use most often when working with frequency distributions. No competitor page consolidates all of them in one place — bookmark this section as a quick reference.
w = class width
Range = max − min
k = number of classes
rf = relative frequency (0 to 1)
f = class frequency
n = total observations
CF_i = cumulative freq. of class i
f_i = frequency of class i
Final CF always equals n
x = class midpoint = (lower + upper) ÷ 2
f = class frequency
Σf = n (total)
L = lower boundary of median class
n = total frequency
CF = cumulative freq. before median class
f = freq. of median class
h = class width
k = suggested number of classes
n = number of observations
Always round to a whole number
Once you have the mean from a frequency table, you can move into standard deviation and variance calculations — those formulas also use class midpoints and frequencies in the same way.
Visualizing Frequency Distributions
A frequency table tells you the numbers; a graph shows you the shape. Each chart type suits different data and different questions.
Histogram
A histogram is the standard graph for a grouped frequency distribution of continuous data. Each bar represents one class interval, and the bar's height equals the class frequency (or relative frequency). The bars touch — no gaps — because the class intervals are contiguous on a number line.
Bars in a histogram touch because the data is continuous — the gap between 13 and 14 minutes is zero. Bars in a bar chart are separated by gaps because the categories are distinct (e.g., product A, B, C). The x-axis of a histogram is always a number line; the x-axis of a bar chart carries labels of any kind.
| Feature | Histogram | Bar Chart |
|---|---|---|
| Data type | Continuous (grouped) | Categorical or discrete |
| Bar spacing | No gaps — bars touch | Gaps between bars |
| X-axis | Numeric scale (number line) | Category labels |
| Order of bars | Fixed (numeric order) | Any order is valid |
| What you read | Frequency of a range of values | Frequency per category |
| Best for | Exam scores, weights, wait times | Survey responses, product types |
Build a histogram in seconds with the site's histogram maker.
Bar Chart
Use a bar chart when your data is categorical (e.g., preferred payment methods: cash, card, app) or discrete with a small number of possible values (e.g., number of children: 0, 1, 2, 3, 4+). The height of each bar is the frequency or relative frequency for that category.
Frequency Polygon
A frequency polygon is drawn by connecting the midpoints of each histogram bar with straight lines and closing the polygon at zero on both ends. It makes comparing two frequency distributions on the same graph much easier than overlapping histograms — simply draw two lines and compare their shapes.
Ogive (Cumulative Frequency Curve)
An ogive plots the cumulative frequency against the upper boundary of each class. It always starts at zero and ends at n. Reading across from any point on the y-axis tells you how many observations fall below that value — which is exactly how you estimate medians and percentiles from grouped data. Try the ogive graph maker to build one from your data.
How to Read Distribution Shape
Building a frequency distribution is the first step. The second step is understanding what the shape tells you about your data — and that is something almost no statistics resource covers inside a frequency distribution article.
Mean ≈ Median ≈ Mode. Bell-shaped. Data clusters at the center with equal tails on each side. Classic example: heights of adults.
Mean > Median > Mode. Long right tail. A few high values pull the mean up. Example: incomes, property prices.
Mean < Median < Mode. Long left tail. A few very low values pull the mean down. Example: retirement ages.
Two separate peaks. Often signals two distinct subgroups in the data. Example: heights from a mixed-gender dataset.
All classes have equal (or near-equal) frequencies. No single value is more common than another. Example: outcomes from a fair die.
Skewed distributions are why the mean and median can disagree sharply. For income data — where a small number of extremely high earners exist — the median is a far more representative "typical" value than the mean. That is why median household income is the standard statistic, not mean household income. See the skewness and kurtosis page for the formal measures.
Frequency Distribution in Excel
Excel has three usable methods. Method 1 (the FREQUENCY function) gives you the most control. Method 2 (Data Analysis ToolPak) is fastest for a one-time table. Method 3 (PivotTable) works best with already-organized data.
Method 1: FREQUENCY() Array Function
This is an array formula. You define the bins yourself, which means you control every class boundary.
| Step | Formula / Action | What it does |
|---|---|---|
| 1. Enter your data | A1:A25 (data values) | Raw dataset in column A |
| 2. Enter bin upper bounds | C1:C6 → 13, 19, 25, 31, 37, 43 | Upper boundary of each class |
| 3. Select output range | D1:D7 (one extra cell) | Highlight before entering formula |
| 4. Enter array formula | =FREQUENCY(A1:A25,C1:C6) | Type, then press Ctrl+Shift+Enter |
| 5. Add relative freq | =D1/SUM($D$1:$D$6) | Drag down for all classes |
In Excel 365 and Excel 2019+, FREQUENCY spills automatically — just press Enter, not Ctrl+Shift+Enter. In older versions (2016, 2013), you must select the output range first and confirm with Ctrl+Shift+Enter to create the array formula.
Method 2: Data Analysis ToolPak (Histogram)
Go to Data → Data Analysis → Histogram. Set the Input Range to your data and the Bin Range to your upper class boundaries. Check "Chart Output" and Excel draws the histogram automatically. The table it produces labels bins by upper boundary rather than as intervals, so you may need to relabel the classes manually.
Method 3: PivotTable
Select your data, insert a PivotTable, drag the value field to both Rows and Values (set Values to "Count of"). Then right-click any row label → Group → set Start, End, and By (class width). Excel creates a grouped frequency distribution with the group-by interval you specify.
Frequency Distribution in Python
Python's pandas and NumPy make it easy to build and visualize frequency distributions in a few lines. The three snippets below cover the most common use cases.
Method 1: pandas value_counts() — Ungrouped
import pandas as pd ratings = [4, 3, 5, 4, 2, 4, 3, 4, 1, 5, 4, 3, 2, 4, 1, 3, 4, 2, 5, 4] s = pd.Series(ratings) # Ungrouped frequency distribution freq = s.value_counts().sort_index() rel_freq = freq / len(s) cum_freq = freq.sort_index().cumsum() fd = pd.DataFrame({ 'Frequency': freq, 'Relative Freq': rel_freq.round(2), 'Cumulative Freq': cum_freq }) print(fd)
Method 2: pandas cut() — Grouped
import pandas as pd delivery_times = [14,22,31,18,27,9,35,21,16,29, 12,38,25,19,33,8,26,20,41,17, 24,32,11,28,15] s = pd.Series(delivery_times) bins = [7, 13, 19, 25, 31, 37, 43] # Grouped frequency distribution freq = pd.cut(s, bins=bins).value_counts().sort_index() rel_freq = (freq / len(s)).round(3) cum_freq = freq.cumsum() fd = pd.DataFrame({ 'Frequency': freq, 'Relative Freq': rel_freq, 'Cumulative Freq': cum_freq }) print(fd)
Method 3: matplotlib Histogram
import matplotlib.pyplot as plt import numpy as np data = [14,22,31,18,27,9,35,21,16,29, 12,38,25,19,33,8,26,20,41,17, 24,32,11,28,15] plt.figure(figsize=(8, 4)) plt.hist(data, bins=[7,13,19,25,31,37,43], edgecolor='white', color='#4f46e5', rwidth=0.95) plt.xlabel('Delivery Time (minutes)') plt.ylabel('Frequency') plt.title('Delivery Time Frequency Distribution') plt.xticks([7,13,19,25,31,37,43]) plt.tight_layout() plt.show()
For statistical computing in Python, see also statistics for Python for a broader overview of the libraries.
Real-World Examples by Industry
Test score examples appear in every statistics textbook. Here are five frequency distributions from actual professional contexts, using data types you are likely to encounter at work.
E-commerce: Order Values
A retailer groups 500 orders by value ($0–24, $25–49, …, $200+). The grouped distribution shows that 62% of orders fall between $25 and $74 — useful for deciding where to set free shipping thresholds.
Healthcare: Patient Wait Times
A clinic records wait times (minutes) for 200 appointments. The distribution is right-skewed — most patients wait 5–15 minutes, but a tail of 40+ minute waits pulls the mean well above the median. The median is the more honest patient-experience metric here.
Finance: Daily Returns
Daily stock returns for a fund over 252 trading days are grouped into 1% intervals (−5% to −4%, −4% to −3%, …, +4% to +5%). The distribution reveals whether returns are normally distributed or show fat tails — information that matters for Value at Risk models.
Marketing: Session Duration
Website analytics tools produce session duration data for thousands of visits. Grouping sessions into 30-second intervals (0–30s, 30–60s, …, 10+ min) shows a J-shaped distribution: large numbers of very short sessions (bounces) and a long tail of engaged users.
HR: Salary Bands
HR teams group 800 employee salaries into $10,000 bands. The distribution checks whether pay is equitably distributed across the organization, identifies the modal salary band, and spots potential compression at the top of pay scales.
Common Mistakes and How to Avoid Them
Most errors in frequency distributions fall into one of six patterns. Recognizing them before you build the table saves you from having to rebuild it.
Writing 0–10, 10–20, 20–30 means a value of 10 belongs to both the first and second class. Use 0–9, 10–19, 20–29 for integer data, or use strict inequalities (0 ≤ x < 10, 10 ≤ x < 20) for continuous data.
Classes of different widths make the histogram misleading — a wide class with moderate frequency looks taller than a narrow class with high frequency. Keep class widths equal unless you have a specific reason (such as open-ended classes at the extremes).
Three classes collapse all the structure in your data. Thirty classes produce a jagged histogram with no clear pattern. Sturges' formula (k ≈ 1 + 3.322 × log₁₀(n)) gives a reasonable starting point, but adjust by eye — the goal is a readable distribution, not mechanical compliance with a formula.
Always verify: Σf = n. If the total is wrong, a value was missed, miscounted, or placed in the wrong class. This check takes five seconds and catches most arithmetic errors before they propagate into relative or cumulative frequency calculations.
If your dataset has 12 observations and 8 distinct values, grouping them into 5 classes destroys information without providing clarity. Ungrouped tables are better for small, discrete datasets.
Drawing gaps between histogram bars, or removing gaps from bar chart bars, sends the wrong signal to your audience. Histogram bars must touch; bar chart bars must not. The difference is the data type: continuous vs. categorical.
Frequently Asked Questions
A frequency distribution is a table or graph showing how often each value — or group of values — appears in a dataset. It organizes raw data into a structured summary, making patterns visible at a glance. It is the starting point for most descriptive statistics work.
The four types are: (1) ungrouped — each distinct value gets its own row; (2) grouped — values are placed into class intervals; (3) relative — each count is expressed as a proportion of the total; (4) cumulative — each row shows the running total of observations up to that point. Most tables combine two or more of these columns.
A histogram displays a frequency distribution for continuous data — its bars touch because the class intervals are contiguous on a number line. A bar chart displays categorical or discrete data — its bars are separated by gaps. The x-axis of a histogram is always numeric; a bar chart's x-axis can carry any kind of label.
Class width = Range ÷ Number of classes, where Range = Maximum value − Minimum value. Round the result up — never down — to keep boundaries clean and prevent data from falling outside your last class. Example: range of 47, 6 classes → 47 ÷ 6 = 7.83 → round up to class width of 8.
For grouped data: find each class midpoint (lower + upper) ÷ 2. Multiply each midpoint by its frequency. Sum those products to get Σfx. Divide by total frequency: Mean = Σfx ÷ Σf. For ungrouped data, x is each distinct value rather than a midpoint, but the formula is the same. See the mean page for full worked examples.
Relative frequency = f ÷ n. It expresses each class count as a proportion (0 to 1) or percentage (0% to 100%) of all observations. Use it when comparing two groups of different sizes — raw frequencies are not comparable when sample sizes differ, but relative frequencies are.
An ungrouped table lists every distinct data value with its individual count. A grouped table places values into class intervals and counts the observations in each interval. Use ungrouped for small datasets or discrete data with few possible values. Use grouped for large datasets or continuous measurements where listing every value would be impractical.
A normal distribution is one specific shape a frequency distribution can take — symmetric and bell-shaped, with the mean, median, and mode at the same point. Not all frequency distributions are normal; many real-world datasets are skewed, bimodal, or uniform. A frequency distribution tells you which shape your data actually has, while the normal distribution is a mathematical model that data sometimes approximates.
Quick Reference Summary
| Concept | Formula or Rule | When it matters |
|---|---|---|
| Class width | w = Range ÷ k (round up) | Setting up any grouped table |
| Sturges' k | k ≈ 1 + 3.322 × log₁₀(n) | Choosing number of classes |
| Relative frequency | rf = f ÷ n | Comparing groups of different sizes |
| Cumulative frequency | CF_i = CF_(i-1) + f_i | Finding medians and percentiles |
| Mean (grouped) | x̄ = Σ(f × midpoint) ÷ n | Estimating mean from a table |
| Median (grouped) | L + ((n/2 − CF) ÷ f) × h | Estimating median from a table |
| Histogram vs bar chart | Bars touch = continuous; gaps = categorical | Choosing the right graph |
| Total check | Σf must equal n | Verifying any frequency table |
Related pages on this site:
Descriptive Statistics ·
Histogram ·
Measures of Central Tendency ·
Relative Frequency ·
Normal Distribution ·
Skewness & Kurtosis ·
Frequency Distribution Table Maker ·
Histogram Maker