This calculator creates a structured table showing how often values appear in your dataset. It displays the frequency (count), cumulative frequency, percentage (relative frequency), and cumulative percentage (cumulative relative frequency) of each unique value, helping you identify patterns and distributions in your data. You can choose how categories are sorted (alphabetically, by weekday, by month, numerically, or in a custom order you define) to best represent your data. A bar chart is also included to better understand your data's distribution. Results include publication-ready APA 7th edition format tables that can be copied directly into Microsoft Word.
Related tools you might find useful:
Need a quick calculation? Enter your numbers below:
Category order is disabled when frequency sorting is active
A frequency table (also called a frequency distribution table) is a statistical tool that organizes data by displaying how often each distinct value or category occurs in a dataset. It provides a structured way to summarize data distribution through counts, percentages, and cumulative frequencies.
Categorical Data:
Discrete Numerical Data:
Shows frequency and relative frequency for a single variable.
Shows relationship between two categorical variables.
Groups continuous data into intervals or ranges.
Includes running totals to show cumulative distribution.
The number of times each value appears in your dataset.
The percentage each value represents of the total dataset.
Formula: (Frequency ÷ Total) × 100
Running total of frequencies up to and including the current value.
Running total of relative frequencies, useful for percentiles.
Raw data: Red, Blue, Red, Green, Blue, Blue, Red, Green, Blue, Red
Distribution of final exam scores for 100 students in a statistics course.
| Score Range | Grade | Frequency | Percentage | Cumulative % |
|---|---|---|---|---|
| 90-100 | A | 15 | 15.0% | 15.0% |
| 80-89 | B | 25 | 25.0% | 40.0% |
| 70-79 | C | 35 | 35.0% | 75.0% |
| 60-69 | D | 20 | 20.0% | 95.0% |
| Below 60 | F | 5 | 5.0% | 100.0% |
This frequency table helps instructors understand the overall class performance, identify areas for improvement, and compare with expected grade distributions.
Use table() for a quick frequency table or dplyr for a more detailed table with sorting options.
library(tidyverse)
data <- c("Red", "Blue", "Red", "Green", "Blue", "Blue", "Red", "Green", "Blue", "Red")
# quick and simple way
table(data)
# create comprehensive frequency table
freq_table <- tibble(value = data) |>
count(value, name = "frequency") |>
mutate(
percentage = round(frequency / sum(frequency) * 100, 1),
cumulative_freq = cumsum(frequency),
cumulative_pct = round(cumsum(percentage), 1)
) |>
arrange(desc(frequency)) # Sort by frequency (most common first)
print(freq_table)
# visualization
ggplot(freq_table, aes(x = reorder(value, frequency), y = frequency)) +
geom_col(fill = "steelblue", alpha = 0.8) +
geom_text(aes(label = frequency), hjust = -0.1) +
coord_flip() + # horizontal bars
labs(title = "Frequency Distribution",
x = "Category", y = "Frequency") +
theme_minimal()Use value_counts function in the package pandasto find frequencies, then calculate percentages and cumulative values.
import pandas as pd
import matplotlib.pyplot as plt
# Sample data
data = ["Red", "Blue", "Red", "Green", "Blue", "Blue", "Red", "Green", "Blue", "Red"]
df = pd.DataFrame({'color': data})
# Create frequency table
freq_table = df['color'].value_counts().reset_index()
freq_table.columns = ['Category', 'Frequency']
freq_table['Percentage'] = round(freq_table['Frequency'] / len(data) * 100, 1)
freq_table['Cumulative_Freq'] = freq_table['Frequency'].cumsum()
freq_table['Cumulative_Pct'] = freq_table['Percentage'].cumsum()
print(freq_table)
# Simple bar chart
freq_table.plot(x='Category', y='Frequency', kind='bar')
plt.title('Frequency Distribution')
plt.show()Use the COUNTIF function for simple counts or a Pivot Table for more advanced analysis and sorting options.
=COUNTIF($A$1:$A$100,B1)Method 1: COUNTIF Function
Use =COUNTIF($A$1:$A$100,B1) to count how many times the value in B1 appears in your data range.
Method 2: Pivot Table
This calculator creates a structured table showing how often values appear in your dataset. It displays the frequency (count), cumulative frequency, percentage (relative frequency), and cumulative percentage (cumulative relative frequency) of each unique value, helping you identify patterns and distributions in your data. You can choose how categories are sorted (alphabetically, by weekday, by month, numerically, or in a custom order you define) to best represent your data. A bar chart is also included to better understand your data's distribution. Results include publication-ready APA 7th edition format tables that can be copied directly into Microsoft Word.
Related tools you might find useful:
Need a quick calculation? Enter your numbers below:
Category order is disabled when frequency sorting is active
A frequency table (also called a frequency distribution table) is a statistical tool that organizes data by displaying how often each distinct value or category occurs in a dataset. It provides a structured way to summarize data distribution through counts, percentages, and cumulative frequencies.
Categorical Data:
Discrete Numerical Data:
Shows frequency and relative frequency for a single variable.
Shows relationship between two categorical variables.
Groups continuous data into intervals or ranges.
Includes running totals to show cumulative distribution.
The number of times each value appears in your dataset.
The percentage each value represents of the total dataset.
Formula: (Frequency ÷ Total) × 100
Running total of frequencies up to and including the current value.
Running total of relative frequencies, useful for percentiles.
Raw data: Red, Blue, Red, Green, Blue, Blue, Red, Green, Blue, Red
Distribution of final exam scores for 100 students in a statistics course.
| Score Range | Grade | Frequency | Percentage | Cumulative % |
|---|---|---|---|---|
| 90-100 | A | 15 | 15.0% | 15.0% |
| 80-89 | B | 25 | 25.0% | 40.0% |
| 70-79 | C | 35 | 35.0% | 75.0% |
| 60-69 | D | 20 | 20.0% | 95.0% |
| Below 60 | F | 5 | 5.0% | 100.0% |
This frequency table helps instructors understand the overall class performance, identify areas for improvement, and compare with expected grade distributions.
Use table() for a quick frequency table or dplyr for a more detailed table with sorting options.
library(tidyverse)
data <- c("Red", "Blue", "Red", "Green", "Blue", "Blue", "Red", "Green", "Blue", "Red")
# quick and simple way
table(data)
# create comprehensive frequency table
freq_table <- tibble(value = data) |>
count(value, name = "frequency") |>
mutate(
percentage = round(frequency / sum(frequency) * 100, 1),
cumulative_freq = cumsum(frequency),
cumulative_pct = round(cumsum(percentage), 1)
) |>
arrange(desc(frequency)) # Sort by frequency (most common first)
print(freq_table)
# visualization
ggplot(freq_table, aes(x = reorder(value, frequency), y = frequency)) +
geom_col(fill = "steelblue", alpha = 0.8) +
geom_text(aes(label = frequency), hjust = -0.1) +
coord_flip() + # horizontal bars
labs(title = "Frequency Distribution",
x = "Category", y = "Frequency") +
theme_minimal()Use value_counts function in the package pandasto find frequencies, then calculate percentages and cumulative values.
import pandas as pd
import matplotlib.pyplot as plt
# Sample data
data = ["Red", "Blue", "Red", "Green", "Blue", "Blue", "Red", "Green", "Blue", "Red"]
df = pd.DataFrame({'color': data})
# Create frequency table
freq_table = df['color'].value_counts().reset_index()
freq_table.columns = ['Category', 'Frequency']
freq_table['Percentage'] = round(freq_table['Frequency'] / len(data) * 100, 1)
freq_table['Cumulative_Freq'] = freq_table['Frequency'].cumsum()
freq_table['Cumulative_Pct'] = freq_table['Percentage'].cumsum()
print(freq_table)
# Simple bar chart
freq_table.plot(x='Category', y='Frequency', kind='bar')
plt.title('Frequency Distribution')
plt.show()Use the COUNTIF function for simple counts or a Pivot Table for more advanced analysis and sorting options.
=COUNTIF($A$1:$A$100,B1)Method 1: COUNTIF Function
Use =COUNTIF($A$1:$A$100,B1) to count how many times the value in B1 appears in your data range.
Method 2: Pivot Table