A Guide To Calculating Frequency Distributions in Excel - DataCamp
A Guide To Calculating Frequency Distributions in Excel - DataCamp
Buy Now
Sale ends in d h m s
Blogs Tutorials Docs NEW Podcasts Cheat Sheets Code-Alongs Category Request a Demo
A Comprehensive Guide to
Calculating Frequency Distributions in
Excel
Follow our step-by-step guide to create frequency distributions in Excel by
using the FREQUENCY() function with just two arguments: data_array and
bins_array.
Jun 2024 · 11 min read
CONTENTS A frequency distribution, often visualized with a frequency histogram, organizes data points
The Quick Answer: How to
into specified ranges, allowing for an easy understanding of how often each value occurs.
Create a Frequency This technique is vital for identifying patterns, trends, and potential outliers, providing deeper
Distribution in Excel insights into the data. Arunn Thevapalan
Why Frequency Senior Data Scientist &
Distributions Are This tutorial will explore frequency distributions, their significance in data analysis, and how Technical Writer. Helping
Important to create them. With Microsoft Excel, we will walk through a step-by-step guide to data enthusiasts break into
generating a frequency distribution for a real-world dataset and interpreting the results to data science.
Methods to Create a
Frequency Distribution in gain meaningful insights.
Excel
TO P I C S
Final Thoughts
The Quick Answer: How to Create a Frequency Excel
Frequently Asked
Questions Distribution in Excel Data Analysis
To create a frequency distribution in Excel, use the FREQUENCY() function. The function
SHARE
calculates how often values occur within specified ranges, known as bins.
Identifying Patterns, Trends, and Outliers: They reveal patterns in the data, such as
peaks, clusters, and outliers. It can be used in statistical analysis to explore the shape
and characteristics of data further.
Communication: Frequency distributions can be used as a simple and effective tool for
communicating the insights from the data to a broader audience, including decision-
makers.
Now that we’ve understood frequency distributions and their importance, let’s dive into
several methods to create them in Microsoft Excel.
To address this, they have sampled data on customer age from the customer database. The
following table has been given to you:
As part of analyzing demand by customer age group, you’ve realized that calculating the
frequency distribution will be a good starting point. Here are four methods to calculate the
frequency distribution using Microsoft Excel.
=FREQUENCY(data_array, bins_array)
. data_array : An array of or reference to a set of values for which you want to count
frequencies. If data_array contains no values, FREQUENCY() returns an array of zeros.
. bins_array : An array of or reference to intervals into which you want to group the
values in data_array. If bins_array contains no values, FREQUENCY() returns the number
of elements in data_array.
Both parameters are required to compute the frequency distribution. You are only given the
data_array , which is Customer Age. Therefore, you are required to define the bins_array
on your own.
For this use case, we can define the bins as <20, 20–30, 30–40, 40–50, 50–60 and >60. Fill
out column B in your worksheet, as shown below.
The formula for frequency distribution using FREQUENCY() function. Image by Author
Having prepared the data_array and bins_array , write the formula to calculate the
frequency distribution in cell C2.
=FREQUENCY(A2:A16, B2:B6)
The output from executing the above formula will look like the following:
The company has only one customer who is less than 20 years old.
From the frequency distribution, you understand that most customers are between 20 and
40 years old.
To calculate frequency distribution using Pivot Tables, click on Insert from the menu and
select PivotTable.
Specify the data range for which you wish to create the Pivot Table. In your case, the data
range is A2:A16 . Select New Worksheet to get the output in a new sheet.
Upon clicking OK, you will see the PivotTable Fields pane on the right side of the window. To
create a Pivot Table for Customer Age, drag and drop Customer Age under Rows and
Values.
After you drag and drop the Customer Age field, the right pane will look like below:
If you observe the above pivot table, this is different from what you are looking for. The use
case is to analyze the number of customers by age group.
. We are interested in the number of customers in each group, not the sum of their age.
Fill in the grouping parameters. In our example, we chose the bins as 20, 30, 40, 50, and 60.
Therefore, we start at 20 and end at 60 with an increment of 10 .
Next, we need to change the Sum to Count. To change this, right-click on the Sum of
Customer Age cell and select Value Field Settings.
In the popup dialog, Under Summarize Values By, change Sum to Count and press OK.
You were looking for this output — you’ve got the frequency distribution by Customer Age.
This add-in isn’t enabled by default. Therefore, check the top right for the Data Analysis icon
under the Data tab in your Excel workbook.
If you don’t see the icon as shown above, the add-in hasn't been enabled. To enable it, click
on File from the menu and select Options.
Select Add-ins from the Excel Options dialog box. Image by Author
Next, select Excel Add-ins in the Manage box at the bottom, and click Go.
Check Analysis ToolPak once the Add-Ins dialog box opens and click OK.
The Data Analysis icon will be visible under the Data tab now, and you need not repeat this
process, as enabling the add-in is a one-time task.
Select the data range, including the column header, to calculate the frequency distribution.
Click on the Data Analysis icon. A dialog box will pop up. Choose the Histogram from it and
click OK.
Fill in the Input range with the Customer Age data range and Bin Range with Bins.
For the Output options, select New Worksheet to get the output in a new worksheet.
Click OK.
You will see the frequency distribution in a new worksheet like the one below.
Voila! You have the frequency distribution by age group created using the Data Analysis
ToolPak.
To calculate the frequency for each age group, enter the below formulas in cells D2 to D7 ,
respectively.
# In cell D2
=COUNTIF(A2:A16, "<=20")
# In cell D3
=COUNTIFS(A2:A16, ">20", A2:A16, "<=30")
# In cell D4
=COUNTIFS(A2:A16, ">30", A2:A16, "<=40")
# In cell D5
=COUNTIFS(A2:A16, ">40", A2:A16, "<=50")
# In cell D6
=COUNTIFS(A2:A16, ">50", A2:A16, "<=60")
# In cell D7
=COUNTIF(A2:A16, ">60")
Here’s an example of how to add the formula to the cells. Once you calculate all of them,
the output will look like:
The most common method to create the frequency distribution table is by using the
FREQUENCY() function.
However, feel free to use whichever method you find comfortable. For example, using the
Data Analysis Toolpak might be a better fit if you’re also calculating other statistical
measures such as skewness, ANOVA, or correlation matrix as part of the analysis.
Final Thoughts
In this tutorial, we learned the importance of frequency distribution and how to calculate it
using Microsoft Excel. By working through a real-world example, we learned to use the
FREQUENCY() function and interpret the resulting distribution to gain insights into our data.
We explored three alternative ways to calculate the frequency distribution.
The learning doesn’t have to stop here, and we encourage you to continue learning and
expanding your Excel skills. Consider taking the Excel Fundamentals track to build your
foundation with Excel. The courses Data Preparation in Excel and Data Visualization in
Excel can assist you in expanding your knowledge of these topics. Have a look at the Data
Manipulation in Excel Cheat Sheet, which can serve as a quick reference.
Happy learning!!!
AUTHOR
Arunn Thevapalan
TO P I C S
Learn how to analyze data with Learn the fundamentals of statistics, Gain the essential skills you need to use
PivotTables and intermediate logical including measures of center and spread, Excel, from preparing data to writing
functions before moving on to tools such probability distributions, and hypothesis formulas and creating visualizations. No
as what-if analysis and forecasting. testing with no coding involved! prior experience is required.
See Details Start Course See Details Start Course See Details Start Course
See More
Related
B LO G T U TO R I A L T U TO R I A L
T U TO R I A L T U TO R I A L T U TO R I A L
See More
Learn Python Python Courses Get Started Resource Center Pricing About Us
Learn SQL Power BI Courses Documentation Code-Alongs Discounts, Promos & Become an Instructor
Sales
Learn Power BI Tableau Courses Tutorials Press
C E R T I F I C AT I O N DataCamp Donates
Learn Tableau Alteryx Courses Open Source Leadership
Certifications
Learn Data Azure Courses RDocumentation FO R B U S I N E S S Contact Us
Engineering Data Scientist
Google Sheets Course Editor Business Pricing DataCamp Español
Assessments Courses Data Analyst
Book a Demo with Teams Plan DataCamp Português
Career Tracks AI Courses Data Engineer DataCamp for
Business Data & AI Unlimited
Skill Tracks Data Analysis SQL Associate Plan S U P PO R T
Courses Data Portfolio
Courses Power BI Data Customer Stories Help Center
Data Visualization Analyst Portfolio Leaderboard
Data Science Courses Partner Program Become an Affiliate
Roadmap Tableau Certified
Machine Learning Data Analyst
Courses
Azure Fundamentals
Data Engineering
Courses AI Fundamentals
Probability &
Statistics Courses
Privacy Policy Cookie Notice Do Not Sell My Personal Information Accessibility Security Terms of Use