Frequency Chart in Excel: How to Create One Easily
In this article
A frequency chart in Excel is a visual or tabular representation that shows how often a specific value or range of values occurs within a dataset. To create one, you must first organize your raw data, define your "bins" (the intervals you want to count), and use either the FREQUENCY function or a Pivot Table to calculate the counts before inserting a chart. This process transforms a long list of confusing numbers into a clear distribution pattern, allowing you to see at a glance where most of your data points cluster.
What You'll Need
- Microsoft Excel installed on your computer (Windows or Mac).
- A dataset containing numerical values (e.g., test scores, ages, delivery times, or price points).
- A basic understanding of how to select cell ranges in a spreadsheet.
- A predefined set of intervals (bins) if you are grouping continuous data.
Step-by-Step
Depending on your version of Excel and your preference for automation, there are two primary ways to build a frequency chart. The first method uses the FREQUENCY function for static reports, and the second uses Pivot Tables for dynamic analysis. Note that menu labels may differ slightly depending on your version of Excel or regional settings.
Method 1: Using the FREQUENCY Function
- Prepare Your Data: Enter your raw data into a single column. For example, place 50 student test scores in cells A2 through A51. Label cell A1 as "Scores".
- Create Your Bin Range: In a separate column (e.g., Column C), list the upper limits of the intervals you want to measure. If you want to count scores from 0-60, 61-70, 71-80, 81-90, and 91-100, enter 60, 70, 80, 90, and 100 in cells C2 through C6. Label cell C1 as "Bins".
- Select the Output Range: This is a critical step. You must select a range of empty cells next to your bins that is one cell larger than the bin range itself. If you have 5 bins, select 6 empty cells (e.g., D2 through D7). This extra cell captures any values that exceed your highest bin limit.
- Enter the Formula: While the output range is still highlighted, type
=FREQUENCY(A2:A51, C2:C6). Do not press Enter yet. - Execute as an Array: Because FREQUENCY is an array formula, you must press Ctrl + Shift + Enter (on Windows) or Cmd + Shift + Enter (on Mac). Excel will automatically wrap the formula in curly braces { }, and the counts for each bin will populate the selected range.
- Insert the Chart: Highlight your Bin labels (C2:C6) and the resulting frequency counts (D2:D6). Go to the Insert tab on the ribbon, click the Insert Column or Bar Chart icon, and select the Clustered Column option.
- Format the Chart: To make it a true histogram (where bars touch), right-click any bar in the chart, select Format Data Series, and change the Gap Width to 0%.
Method 2: Using Pivot Tables (The Faster Way)
- Select Your Data: Click anywhere inside your data column (A1:A51).
- Insert Pivot Table: Go to the Insert tab and click PivotTable. In the dialog box, ensure your data range is correct and choose to place the table in a New Worksheet, then click OK.
- Set Up Fields: In the PivotTable Fields pane on the right, drag your data field (e.g., "Scores") into the Rows area. Then, drag the same "Scores" field into the Values area.
- Change Value Calculation: By default, Excel may sum the scores. In the Values area, click the drop-down arrow for "Sum of Scores," select Value Field Settings, choose Count, and click OK.
- Group the Data: Right-click any value in the Row labels of the Pivot Table. Select Group. In the grouping dialog, enter the starting value (e.g., 0), the ending value (e.g., 100), and the interval size (e.g., 10). Click OK.
- Create the Visual: With the Pivot Table selected, go to the Insert tab and select a Column Chart. This chart will automatically update if you change the grouping settings.
Common Mistakes
- Forgetting Ctrl+Shift+Enter: In older versions of Excel, the FREQUENCY function will only return a single value if you press Enter normally. It requires the array command to fill the entire range.
- Incorrect Bin Logic: Users often list both the start and end of a bin (e.g., 0, 10, 10, 20). The FREQUENCY function only requires the upper limit of each bin. Adding the lower limit creates redundant bins and incorrect counts.
- Including Text in Data Ranges: If your data range includes headers or empty cells containing text, the FREQUENCY function may return an error or skip those values. Ensure the range selected contains only numbers.
- Overlapping Bins: When manually creating bins, ensure they are sequential. If you skip a number (e.g., bins are 10, 20, 40), any data between 21 and 39 will be lumped into the 40 bin, distorting the frequency.
Tips
- Dynamic Binning: Instead of typing bin numbers manually, link your bin cells to a single "Interval" cell. For example, if cell E1 contains "10", set your first bin to
=E1and the second to=E1*2. Now, changing E1 to "5" will automatically update your entire frequency chart. - Adding Data Labels: To make your chart easier to read, click the + button (Chart Elements) next to the chart and check Data Labels. This puts the exact count on top of each bar.
- Using the Histogram Tool: If you have Excel 2016 or newer, you can skip the formulas entirely. Highlight your data, go to Insert > Insert Statistic Chart > Histogram. Excel will automatically calculate the bins and draw the chart for you.
- Conditional Formatting: If you prefer a tabular frequency chart over a visual one, apply Conditional Formatting > Data Bars to your count column to create a "mini-chart" inside the cells.
Troubleshooting
If your frequency chart is not displaying correctly, try these steps in order:
- Check for #VALUE! Errors: This usually happens if your bin range contains non-numeric data or if the data range is not a continuous block of numbers. Clean your data using the Find and Replace tool to remove any accidental spaces or characters.
- Verify the Selection Range: If you are using the FREQUENCY function and only one cell is filling up, you likely didn't select the entire output range before typing the formula. Delete the formula, select the full range of cells, re-type the formula, and press Ctrl+Shift+Enter.
- Fix "Empty" Bars: If your chart has gaps, it means some bins have a frequency of zero. If you are using a Pivot Table, right-click the row labels, select Field Settings > Layout & Print, and check Show items with no data to ensure the x-axis remains consistent.
- Refresh Pivot Data: If you added new data to your original list but the Pivot Table chart hasn't changed, right-click the Pivot Table and select Refresh.
Frequently Asked Questions
What is the difference between a frequency chart and a histogram?
A frequency chart is the general term for any table or graph showing counts. A histogram is a specific type of frequency chart used for continuous numerical data where the bars touch to show a continuous distribution.
Can I create a frequency chart for text data?
The FREQUENCY function only works for numbers. For text (like "Red", "Blue", "Green"), use a Pivot Table. Drag the text field into both the Rows and Values areas to get a count of each unique category.
How do I change the size of the bins in a Pivot Table?
Right-click any of the grouped numbers in the Pivot Table row labels, select Group, and change the "By" value to your desired interval size (e.g., change 10 to 5).
Why is my FREQUENCY function returning a value in the last cell?
The final cell in a FREQUENCY array captures all values that are greater than the highest bin limit you defined. This is why you must always select one more cell than you have bins.
Does the FREQUENCY function update automatically?
Yes, if you change a value in your raw data range, the FREQUENCY function and its linked chart will update instantly. Pivot Tables, however, require a manual refresh.