Going Stellar

Home/Google Sheets reference

Google Sheets function · Statistical

MODE in Google Sheets: syntax and examples

MODE finds the number that appears most often in a range. If two numbers tie, it returns the one that shows up first. It reads numbers only, so text needs a workaround with MATCH.

Syntax

MODE(value1, [value2, ...])

Arguments

ArgumentTypeRequiredWhat it does
value1anyyesThe first number or range to analyse.
value2, ...anynoMore numbers or ranges.

Examples

The examples use this table, starting in A1:

SizeColor
38red
40blue
40red
42red
42blue
40red
=MODE(A2:A7)

Result: 40

The most frequent shoe size: 40 appears three times.

Run in a Google Sheet (English US locale) on .

=MODE(1, 2, 2, 3, 3, 3)

Result: 3

Plain numbers work too.

Run in a Google Sheet (English US locale) on .

=MODE(A2:A4, A5:A7)

Result: 40

Several ranges are pooled before counting.

Run in a Google Sheet (English US locale) on .

=INDEX(B2:B7, MODE(ARRAYFORMULA(MATCH(B2:B7, B2:B7, 0))))

Result: red

MODE only reads numbers, so for text it works on MATCH positions. This returns the most frequent color.

Run in a Google Sheet (English US locale) on .

=COUNTIF(A2:A7, MODE(A2:A7))

Result: 3

How many times the mode occurs.

Run in a Google Sheet (English US locale) on .

Common errors

  • If no value repeats, MODE returns #N/A, not the smallest value.
  • On a tie, MODE returns a single value: the one met first in the data. Use MODE.MULT to see all of them.
  • A range that holds only text returns #N/A. MODE ignores text, so it cannot find the most frequent word directly.

Compared with Excel

Same syntax in Excel. Excel also has MODE.SNGL and MODE.MULT, and so does Google Sheets.

Sources

  1. MODE (Docs Editors Help)

Markdown version · All functions