A frequency table counts how many times each value appears in your data
A frequency table is a list that shows each unique value in your data and how many times it appears. If you have a column of 200 customer names, a frequency table tells you that "Smith" appears 12 times, "Johnson" appears 8 times, and so on. Excel does not build these automatically — you create one by counting occurrences yourself using formulas or by sorting and grouping the data by hand.
The simplest method depends on how much data you have and whether your values repeat in obvious patterns. For small datasets (under 50 rows), sorting and counting by eye works fine. For larger datasets, a COUNTIF formula does the counting for you. A pivot table is the fastest route if you have hundreds of rows and want to update the count when your source data changes.
Key Takeaways
- A frequency table lists each unique value once, paired with a count of how many times it appears in your original data.
- COUNTIF is the formula that counts occurrences: type =COUNTIF(range, criteria) where range is your data column and criteria is the value you want to count.
- A pivot table builds a frequency table automatically and updates when your source data changes, making it the fastest method for large datasets.
- You must first identify all unique values before you can count them — either by copying them to a new column or by letting a pivot table do it.
Method 1: Sort and count manually for small datasets
If you have fewer than 50 rows of data, sorting the column and counting by eye is often faster than writing formulas. Open your spreadsheet, select the entire column of data (including the header), and click the Data tab. Choose Sort A to Z. Excel groups identical values together, so you can count how many times each one appears and write the counts in a new column next to it.
This method works best when your data contains text values like names, categories, or product types. It breaks down if your data is already sorted for another reason — sorting it again will scramble your other columns unless you select the entire table before sorting. Always select all your data, not just one column, so Excel keeps rows together.
Method 2: Use COUNTIF to count each value automatically
The COUNTIF formula counts how many cells in a range match a specific value. Start by creating a list of unique values in a new column. If your original data is in column A (rows 2 through 50), type each unique value in column C, one per row. Then in column D, type =COUNTIF($A$2:$A$50,C2) and press Enter. The dollar signs lock the range so it does not change when you copy the formula down.
Copy the formula down to match the number of unique values you have. If you have 15 unique values, copy it down 15 rows. Each row will now show one unique value and its count. The COUNTIF method is reliable for datasets of any size and updates automatically if you change the source data — just press F9 to recalculate.
If you do not know your unique values in advance, you can use the Remove Duplicates feature to find them. Select your data column, go to the Data tab, and click Remove Duplicates. Excel creates a new column with only the unique values. Then use COUNTIF as described above to count each one.
Method 3: Build a pivot table for automatic frequency counting
A pivot table is the fastest method for large datasets because it finds unique values and counts them in one step. Select your entire data range (including headers), go to the Insert tab, and click Pivot Table. Choose to place the table in a new worksheet. In the Pivot Table Field List on the right, drag your data column to the Rows area and also to the Values area. Excel automatically counts occurrences and builds your frequency table.
Pivot tables update when your source data changes — if you add 50 new rows to your original column, right-click the pivot table and click Refresh. The counts recalculate when ready. This makes pivot tables ideal if you plan to add data over time. The downside is that pivot tables look different from a straightforward two-column table, and they take up more space on your worksheet.
Organizing your frequency table for clarity
Once you have your counts, format the table so it is straightforward to read. Add a header row: type "Value" in the first column and "Frequency" in the second. If your values are text, sort them alphabetically by clicking the Data tab and choosing Sort A to Z. If they are numbers, sort them from smallest to largest. This makes patterns visible — you can see at a glance which values are most common.
Consider adding a third column that shows the percentage each value represents. In column E, type =D2/SUM($D$2:$D$50)*100 to calculate what percentage of your total each count is. This helps you understand the distribution — if one value represents 60 percent of your data, that is worth noting.
Common mistakes and how to avoid them
The most common mistake is forgetting to use absolute references (dollar signs) in your COUNTIF formula. If you type =COUNTIF(A2:A50,C2) without the dollar signs, the range shifts when you copy the formula down, and your counts become wrong. Always type =COUNTIF($A$2:$A$50,C2) so the range stays locked.
Another mistake is including the header row in your count range. If your data starts in A1 with the word "Name" as a header, start your COUNTIF range at A2, not A1. Otherwise, Excel counts the header as a data value and your totals will be off by one.
If you use a pivot table and your source data changes, remember to refresh it. A pivot table does not update automatically — you must right-click and choose Refresh, or it will show old counts.
When to use each method
Use the sort-and-count method for quick checks on small datasets where you do not need the table again. Use COUNTIF when you have a medium-sized dataset (50 to 1,000 rows) and want a straightforward two-column table you can copy elsewhere. Use a pivot table when you have a large dataset (over 1,000 rows), plan to update the source data regularly, or need to count multiple columns at once.
If you are building a frequency table to organize files or track categories (as you might after organizing your file system), COUNTIF is usually the right choice because it produces a clean, portable table that works in any spreadsheet.
Frequently Asked Questions
Can I create a frequency table from data in multiple columns?
Yes, but you must combine the columns first. Copy all the data into a single column, then build your frequency table from that column. If you want to count combinations (like "Smith" in column A paired with "New York" in column B), use COUNTIFS instead of COUNTIF, which allows multiple criteria.
What if my data has blank cells?
Blank cells are treated as a value by COUNTIF. If you want to count them, type =COUNTIF(A2:A50,"") in your frequency table. If you want to ignore them, delete the blank rows before building your table, or exclude them from your COUNTIF range.
How do I update my frequency table if the source data changes?
If you used COUNTIF, the counts update automatically when you change the source data — just press F9 to recalculate. If you used a pivot table, right-click it and click Refresh. If you sorted and counted by hand, you must rebuild the table manually.
Can I sort my frequency table by count instead of by value?
Yes. Select both columns (the values and their counts), go to the Data tab, and click Sort. Choose to sort by the count column in descending order. This shows your most frequent values at the top, which is useful for spotting patterns.