Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu Show menu

FREQUENCY function


FREQUENCY(bins,range) returns a frequency table of the data in range as a matrix.

The argument bins must be a one-dimensional matrix.

The number of elements in the returned matrix is one more than the number of elements in bins matrix. The extra element in the returned matrix returns the count of any values above the highest value in the bins matrix.


FREQUENCY({4,6,8},2,4,5,5,6,6,8,9) returns {2,4,1,1}, because

  • 2 values are less than or equal to 4.
  • 4 values are more than 4 and less than or equal to 6
  • 1 value is more than 6 and less than or equal to 8
  • 1 value is more than 8

Note that the numbers in the bins matrix have to be sorted by magnitude, but the data do not have to be sorted.



Related functions