FREQUENCY function
Counts how many values fall into each band (bin) of a range, such as grade bands or order sizes, and returns the counts as a vertical list.
Available in All versions of Excel. In Microsoft 365 and Excel 2021+ the result spills; in older versions select the output cells first and confirm with Ctrl+Shift+Enter.
In every Excel versionWorks in Google Sheets
Syntax
FREQUENCY(data_array, bins_array)| Argument | What it means | |
|---|---|---|
data_array | Required | The values to count, e.g. test scores. Blank cells and text are ignored. |
bins_array | Required | The upper limits of each band, in ascending order. Each bin counts values greater than the previous limit and up to and including its own limit. |
Returns: A vertical array with one more item than bins_array: the counts for each band plus a final count for values above the highest limit.
How FREQUENCY works
FREQUENCY builds a frequency table, the numbers behind a histogram. You give it the data and a list of band limits, and it returns how many values landed in each band. Typical uses are grade distributions (how many students scored 60–69?), order-size bands, salary ranges or delivery-time buckets.
Each limit in bins_array is the top of a band, and the top is included: with limits 59, 69, 79 and 89 the first count is for scores up to 59, the second for 60–69 (strictly above 59 and up to 69), and so on. FREQUENCY always returns one extra count at the end for everything above the last limit, so four limits produce five counts. Write the limits in ascending order.
In Microsoft 365 you type the formula in one cell and the counts spill downwards. In Excel 2019 and earlier you must select a range one cell taller than the bins, type the formula and press Ctrl+Shift+Enter. FREQUENCY ignores blanks and text, which also makes it a fast way to count unique numbers.
Examples
1Grade distribution
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Score | Bin (up to) | |||
| 2 | 72 | 59 | 1 | ||
| 3 | 85 | 69 | 1 | ||
| 4 | 58 | 79 | 2 | ||
| 5 | 91 | 89 | 1 | ||
| 6 | 67 | 2 | |||
| 7 | 78 | ||||
| 8 | 95 |
Four limits give five counts, spilling from E2 to E6: 1 score up to 59 (58), 1 from 60 to 69 (67), 2 from 70 to 79 (72 and 78), 1 from 80 to 89 (85) and 2 above 89 (91 and 95). The counts always add up to the number of scores, here 7.
2Delivery-time buckets
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Order | Days | Up to (days) | |||
| 2 | SO-21 | 1 | 2 | 2 | ||
| 3 | SO-22 | 3 | 4 | 3 | ||
| 4 | SO-23 | 3 | 6 | 1 | ||
| 5 | SO-24 | 5 | 1 | |||
| 6 | SO-25 | 2 | ||||
| 7 | SO-26 | 7 | ||||
| 8 | SO-27 | 4 |
With limits 2, 4 and 6 the four counts are: 2 orders delivered within 2 days, 3 in 3–4 days, 1 in 5–6 days and 1 that took longer than 6 days. Place labels such as "≤2", "3–4", "5–6" and ">6" next to the spill to make it readable.
3Count unique customer IDs
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Customer ID | ||
| 2 | INV-500 | 101 | 4 | |
| 3 | INV-501 | 102 | ||
| 4 | INV-502 | 101 | ||
| 5 | INV-503 | 103 | ||
| 6 | INV-504 | 102 | ||
| 7 | INV-505 | 104 | ||
| 8 | INV-506 | 101 |
Result: 4
Using the data as its own bins, FREQUENCY puts each repeated ID's count in the bin of its first occurrence and 0 in the later ones. Counting the non-zero bins gives the number of different customers: 101, 102, 103 and 104, so 4. This classic trick works in every Excel version for numeric IDs.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#SPILL! | Cells below the formula are not empty, so the counts cannot spill. | Clear the cells under the formula (Microsoft 365 / Excel 2021+). |
Only one number shown | In Excel 2019 or older the formula was entered in one cell or without Ctrl+Shift+Enter. | Select as many cells as bins + 1, type the formula and press Ctrl+Shift+Enter. |
Counts in the wrong bands | The bin limits are not in ascending order or are stored as text. | Sort the limits from smallest to largest and make sure they are numbers. |
Tips
- To count values in bands defined by lower limits ("60 and above"), use COUNTIFS instead, which gives you full control of < and <=.
- Wrap FREQUENCY in a chart: select the spilled counts and insert a column chart for an instant histogram.
- In Microsoft 365,
=HSTACK(C2:C5, DROP(FREQUENCY(A2:A8, C2:C5), -1))builds a two-column table of limits and counts (dropping the overflow count).
Questions
Why does FREQUENCY return one more value than I have bins?
The extra value counts everything above the highest bin. It is there so that no data point is lost; ignore it if you know all values are within range.
Are the bin limits inclusive?
Yes, each bin includes its upper limit. A score of exactly 69 goes in the 60–69 band when the limit is 69.
Can FREQUENCY count text values?
No, it only counts numbers. For text categories use COUNTIF, or combine UNIQUE with COUNTIF in Microsoft 365.
Google Sheets
FREQUENCY also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
FREQUENCY in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | ČETNOSTI |
| Danish | FREKVENS |
| Dutch | INTERVAL |
| Finnish | TAAJUUS |
| French | FREQUENCE |
| German | HÄUFIGKEIT |
| Hungarian | GYAKORISÁG |
| Italian | FREQUENZA |
| Norwegian (Bokmål) | FREKVENS |
| Polish | CZĘSTOŚĆ |
| Portuguese (Brazil) | FREQÜÊNCIA |
| Portuguese (Portugal) | FREQUÊNCIA |
| Russian | ЧАСТОТА |
| Spanish | FRECUENCIA |
| Swedish | FREKVENS |
| Turkish | SIKLIK |