Investment Studio > Expressions > Functions > Statistical > MODE

float mode(float data [, ...])

Returns the most frequently occurring number in the data list.

All elements in the argument list are converted to floats, with exclusion if conversion fails. The list may contain array arguments, in which case each array element is treated as a separate list element.

If the list contains no duplicate values, the result is an error.

Examples

=mode(1, 5, 3, 4, 5)

returns 5 (occurs twice; all other numbers occur only once).

Assuming standard US date format settings,

=mode("1/1/2001", "1/2/2001", "1/3/2001", "1/1/2001", "ha", "ha", "ha")

returns 36892 (the value of the date "1/1/2001", translated to float); "ha" occurs more often but does not translate to a number, so it's exluded.

See also average, count, median, max, min, quartile, trimmean.