FREQUENCY
Returns a vertical frequency distribution for numeric data across bin cutoffs.
FREQUENCY counts values into <= first bin, intermediate right-closed bins, and an overflow
bucket above the final bin.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=FREQUENCY(data_array, bins_array)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
data_array | number (range) | Required | — |
bins_array | number (range) | Required | — |
Return type
Can return an array.
Remarks
- Returns an array with
bins + 1rows. - Bins are sorted before counting.
- If
bins_arrayhas no numeric values, result is a single count of all data points. - Non-numeric values in input ranges are ignored by statistical-collection rules.
Examples
Count observations in two bins and an overflow bin.
Formula =FREQUENCY({1,3,7,10},{3,7})
Expected result {2; 1; 1}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Replace the bin boundaries with narrower intervals.
Formula =FREQUENCY({1,3,7,10},{2,4,6,8})
Expected result {1; 1; 0; 1; 1}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
An observation equal to a bin limit belongs to the bin ending there.
Formula =FREQUENCY({3},{3})
Expected result {1; 0}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A division-by-zero error cannot provide a data array.
Formula =FREQUENCY(1/0,{3,7})
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Frequency buckets with two bins
Formula =FREQUENCY({1,2,3,4,5},{2,4})
Expected result {2; 2; 1}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Frequency with repeated values
Formula =FREQUENCY({1,1,2,2,3},{1,2})
Expected result {2; 2; 1}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.