Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Frequency in Excel: How to Calculate Data Distribution

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To find frequency in Excel, the most efficient method is using the FREQUENCY function, which counts how often values occur within a range of values (bins). You simply enter the formula =FREQUENCY(data_array, bins_array), select the output range, and press Ctrl+Shift+Enter (for older Excel versions) or Enter (for Office 365) to generate a distribution list. This allows you to transform a raw list of numbers into a structured summary of how many items fall into specific numerical brackets.

What You'll Need

  • A dataset consisting of numerical values (the data_array).
  • A defined set of "bins" or thresholds (the bins_array) that determine the upper limits of your frequency brackets.
  • Microsoft Excel (all versions, though behavior varies slightly between legacy versions and Microsoft 365).

Step-by-Step

  1. Organize Your Raw Data: Place the numbers you want to analyze in a single column. For example, if you are analyzing test scores, put all the scores in column A (A2:A100). Ensure there are no text strings or empty cells within this range, as this can lead to inaccurate counts or errors.
  2. Create Your Bin Range: In a separate column, list the upper limits of the intervals you want to measure. For example, if you want to see 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. Excel treats these as "up to and including" this value.
  3. Select the Output Range: This is a critical step for the FREQUENCY function because it returns an array of values, not a single number. Highlight a range of empty cells next to your bins. This range should be one cell larger than your bin range. If you have 5 bins, select 6 cells. The extra cell captures any values that are greater than your highest bin limit.
  4. Enter the FREQUENCY Formula: While the output range is still highlighted, type the following formula: =FREQUENCY(A2:A100, C2:C6). Replace A2:A100 with your actual data range and C2:C6 with your bin range.
  5. Execute the Array Formula:
    • For Microsoft 365 users: Simply press Enter. The results will automatically "spill" into the selected cells.
    • For Excel 2019 and older: You must press Ctrl + Shift + Enter. This tells Excel it is an array formula. You will see curly brackets { } appear around the formula in the formula bar.
  6. Verify the Results: Check the numbers generated. The first cell corresponds to the first bin (values ≤ 60), the second to the second bin (61-70), and so on. The final cell contains the count of any values exceeding the highest bin (e.g., any value > 100).

Common Mistakes

One of the most frequent errors is failing to select the output range before typing the formula. Because FREQUENCY is an array function, entering it into a single cell in older versions of Excel will only return the frequency for the first bin, leaving the rest of the data hidden. Always highlight the entire destination area first.

Another common mistake is incorrectly defining the bins. Users often try to enter a range like "60-70" into a single cell. Excel cannot interpret text ranges for this function; it requires a single numerical value representing the upper boundary. If you enter "60-70", Excel will treat it as text or a date, causing the formula to return zeros or errors.

Incorrect data types are also a hurdle. If your numbers are formatted as text (often indicated by a small green triangle in the corner of the cell), the FREQUENCY function will ignore them. You must convert these to numbers using the "Convert to Number" warning or the TEXT TO COLUMNS tool before running the analysis.

Finally, users often forget the "plus one" rule for the output range. If you have 10 bins, you need 11 cells for the output. Neglecting that 11th cell means you will lose the count of any data points that exceed your maximum threshold, leading to an incomplete data summary.

Tips

To make your frequency table more readable, create a "Label" column to the left of your bins. Instead of just showing "60", write "0-60". This keeps your data professional and easy for others to interpret without needing to know how the FREQUENCY function works internally.

If your dataset is dynamic (meaning you add new numbers frequently), convert your data range into an official Excel Table (Insert > Table). Then, reference the table column in your formula. This ensures that as you add new rows, the frequency calculation updates automatically without you having to rewrite the range references.

For those who prefer a visual representation over a table, consider using the Histogram chart tool. Go to Insert > Statistic Chart > Histogram. This essentially performs the frequency calculation in the background and plots it as a bar chart, which is often more impactful for presentations.

If you need to count the frequency of specific text items rather than numerical ranges, the FREQUENCY function will not work. In those cases, use the =COUNTIF(range, criteria) function. For example, =COUNTIF(A2:A100, "Completed") will tell you exactly how many times the word "Completed" appears in your list.

Troubleshooting

If your formula returns only one value instead of a list, you likely missed the Ctrl+Shift+Enter step (in older versions) or failed to select the output range. To fix this, select the entire output range again, click into the formula bar, and press Ctrl+Shift+Enter.

If the results are all zeros, check your bin values. Ensure the bins are numbers and are sorted in ascending order. If your bins are smaller than your smallest data point, or if they are formatted as text, Excel will not find any matches.

If you see a #VALUE! error, check your data_array for non-numeric characters. A single cell containing a space or a letter in a column of numbers can sometimes break array calculations. Use the Filter tool to check for non-numeric entries or use =ISNUMBER() in a helper column to identify the culprits.

If the total sum of your frequency results does not match the total count of your raw data, check that final "extra" cell in your output range. It is highly likely that some of your data points are larger than your highest bin, and those values are being stored in that last cell.

Frequently Asked Questions

Can I use the FREQUENCY function for text?

No, the FREQUENCY function is designed specifically for numerical data. For text, use the COUNTIF or COUNTIFS functions to count occurrences of specific words or phrases.

Do the bins have to be in order?

Yes, for the results to make logical sense, your bin array should be sorted in ascending order. While Excel will technically process them, the resulting distribution will be confusing if the bins are randomized.

What is the difference between FREQUENCY and COUNTIF?

COUNTIF counts how many cells meet a single specific criterion. FREQUENCY is an array function that counts how many values fall into multiple predefined ranges simultaneously, returning a list of results rather than one.

Why does my formula have curly brackets around it?

Curly brackets { } indicate that the formula is an array formula. In older versions of Excel, these are added automatically when you press Ctrl+Shift+Enter to signify that the formula is operating on a range of cells rather than a single value.

Can I use a cell reference for the bins?

Yes, and it is highly recommended. Instead of typing numbers into the formula, reference a range of cells (e.g., C2:C6). This allows you to change your bin thresholds quickly without editing the formula itself.