Function · Ranking and percentiles

Excel FREQUENCY function

The Excel FREQUENCY function counts how many values fall into each bin. Of the four utility bills, two are at or under $100, one is over $100 and at or under $130, and one is over $130.

All current Excel versions. Also in Excel for the web and Google Sheets. In Microsoft 365, Excel 2021, and Excel 2024 the result spills. Older Excel needs Ctrl+Shift+Enter.

Syntax =FREQUENCY(data_array, bins_array)

FREQUENCY
=FREQUENCY(B2:B5,D2:D3)

Arguments

NameRequiredWhat to pass
data_arrayRequiredThe numbers to count. Text and blanks are ignored.
bins_arrayRequiredThe upper edges, in ascending order. The result has one more cell than this range. That last cell counts values above the last edge.

Examples

Four utility bills against edges at $100 and $130

=FREQUENCY(B2:B5,D2:D3)

Result 2, then 1, then 1

=FREQUENCY(B2:B5,D2:D3)F2
Bins
ABCDEF
1MonthBillEdgeCount
2Jan143.601002
3Feb96.201301
4Mar118.451
5Apr88.10
A picture of the sheet, not a live calculator. F3 and F4 are the spill in current Excel. The last count has no edge of its own. It is everything above $130.

FREQUENCY counts how many numbers fall into each bin, and it adds one extra count for everything above the last edge. The edges here are $100 and $130. Of the four utility bills, $88.10 and $96.20 are at or under $100, so the first count is 2. $118.45 is over $100 and at or under $130, so the second count is 1. $143.60 is over $130, so the extra count is 1. Two edges, three numbers.

A value that lands on an edge is included in that bin. The edges need to run low to high. Text and blanks in the data are ignored. In Microsoft 365, Excel 2021, and Excel 2024 the formula spills the three counts. In older Excel you select a range one cell taller than the bin list and commit it with Ctrl+Shift+Enter. COUNTIFS can build the same buckets one cell at a time, which is easier to read and does not need an array entry.