How to Determine Frequency in Excel: A Complete Guide
In this article
To determine frequency in Excel, use the FREQUENCY function, which calculates how often values occur within a range of specified intervals (bins). This is primarily used to create histograms or distribution summaries, allowing you to see where the majority of your data points fall. Unlike a simple count, the FREQUENCY function is an array formula that returns a vertical series of numbers representing the count for each defined bin.
What You'll Need
- A dataset containing numerical values (e.g., test scores, sales figures, or temperatures).
- A defined set of "bins" (the upper limits of the intervals you want to measure).
- Microsoft Excel (works in Office 365, Excel 2021, 2019, and earlier versions).
Step-by-Step
- Organize Your Data: Place your raw numerical data in a single column. For example, put your values in cells A2 through A50. Ensure there are no text strings or errors in this range, as this can interfere with the calculation.
- Create Your Bin Range: In a separate column, list the upper limits of the intervals you want to track. For example, if you want to count how many scores fall between 0-60, 61-70, 71-80, 81-90, and 91-100, you would enter 60, 70, 80, 90, and 100 in cells C2 through C6. These are your "bins." Excel will count everything up to and including the number in the bin.
- Select the Output Range: This is the most critical step for older versions of Excel. You must highlight a range of empty cells next to your bins. The selection should be one cell larger than your bin range. If you have 5 bins (C2:C6), select 6 cells (D2:D7). The extra cell captures any values that exceed your highest bin limit.
- Enter the Formula: While the output range is still highlighted, type the following formula:
=FREQUENCY(A2:A50, C2:C6). In this formula, A2:A50 is your data array, and C2:C6 is your bins array. - Execute as an Array: If you are using an older version of Excel (pre-Office 365), do not simply press Enter. You must press Ctrl + Shift + Enter. This tells Excel to treat the formula as an array and fill the entire selected range. In Office 365, simply pressing Enter will trigger "Dynamic Arrays," and the results will automatically spill down into the cells below.
- Verify the Results: Look at the resulting numbers. The first cell (D2) shows how many values are less than or equal to 60. The second (D3) shows how many are greater than 60 but less than or equal to 70, and so on. The final cell (D7) shows how many values were greater than 100.
Common Mistakes
One of the most frequent errors is failing to select the output range before typing the formula in older Excel versions. If you only enter the formula in a single cell and press Enter, Excel will only return the frequency for the first bin, leaving the rest of the data uncalculated. This often leads users to believe the function is broken when it is actually just waiting for an array command.
Another common mistake is misunderstanding how bins work. Users often try to enter both the start and end of a range (e.g., 0 and 60, 61 and 70). The FREQUENCY function only requires the upper limit. If you enter both, Excel treats the lower limit as its own bin, which will skew your counts and create unnecessary rows in your output.
Data type mismatch is also a recurring issue. If your "numbers" are actually formatted as text, the FREQUENCY function will ignore them entirely. This often happens when importing data from CSV files or web databases. You can tell if this is happening if your counts are unexpectedly zero despite having visible data in your range.
Tips
To make your frequency table more readable, create a label column next to your bins. Instead of just having the number "60," write "0-60" in the adjacent cell. This transforms a technical list of limits into a professional-looking report that others can understand without knowing the inner workings of the formula.
For those who need a more flexible approach, consider using a Pivot Table. While the FREQUENCY function is excellent for static reports, a Pivot Table allows you to "Group" numerical data into intervals dynamically. By right-clicking a value in a Pivot Table and selecting Group, you can define the starting point and the increment (e.g., every 10 units), which is often faster than manually creating a bin range.
If you are using Office 365, take advantage of the SORT and UNIQUE functions to organize your data before applying frequency checks. This ensures that your bins are logically ordered, preventing the formula from returning confusing results due to unsorted bin limits.
Troubleshooting
If the formula returns a #VALUE! error, check your data range for non-numeric characters. A single cell containing a space, a letter, or a hidden character can break the array calculation. Use the ISNUMBER function in a helper column to identify which cells are not being recognized as numbers.
If the results show zeros where you expect counts, verify that your bin values are actually higher than your data values. If your data ranges from 100 to 500, but your bins are 10, 20, and 30, Excel will put every single data point into the final "overflow" cell because they all exceed the highest bin.
If you see a #SPILL! error in Office 365, it means there is existing data in the cells where the frequency results are trying to appear. Clear the cells below and to the right of your formula to give the dynamic array room to expand.
If the numbers don't seem to add up to the total count of your data, check for empty cells in your data array. The FREQUENCY function ignores blank cells. To ensure accuracy, sum your frequency results and compare that total to the count of your original data range using =COUNT(A2:A50).
Frequently Asked Questions
Can I use the FREQUENCY function for text data?
No, the FREQUENCY function is designed exclusively for numerical data. To count the frequency of text (like names or categories), use the COUNTIF or COUNTIFS function instead.
What is the difference between FREQUENCY and COUNTIF?
COUNTIF counts cells that meet a specific single criterion. FREQUENCY is an array function that counts values across multiple intervals simultaneously, making it much more efficient for creating distributions.
Do my bins have to be in ascending order?
Yes, for the results to make logical sense, your bins should be listed from smallest to largest. If they are out of order, Excel will still calculate based on the values provided, but the resulting distribution will be nonsensical.
How do I handle values that fall exactly on the bin limit?
The FREQUENCY function includes the bin value in that specific bin. For example, if your bin is 60, any value that is exactly 60.00 will be counted in that bin, while 60.01 will move to the next bin.
Can I create a chart from the frequency results?
Yes. Once you have your frequency counts, you can highlight the bin labels and the frequency results, then go to the Insert tab and select a Clustered Column Chart to create a histogram.
Does this function work in Google Sheets?
Yes, the FREQUENCY function exists in Google Sheets with nearly identical syntax, though Google Sheets handles array outputs more natively than older versions of Excel.