Compatibility function

MODE function

Returns the most frequently occurring value in a set of numbers. If several values tie, it returns the first one. Replaced by MODE.SNGL.

Available in All versions of Excel, including Microsoft 365 and Excel for the web (kept for compatibility)

In every Excel versionWorks in Google Sheets

Older function. MODE still works, but for new workbooks use MODE.SNGL.

Syntax

MODE(number1, [number2], ...)
ArgumentWhat it means
number1RequiredA number, range or array.
number2, ...OptionalUp to 255 numbers or ranges in total.

Returns: The most common number.

How MODE works

MODE finds the value that appears most often: the shoe size you should stock most of, the most common rating in a survey, the score most students got. It is the only one of the three classic averages (mean, median, mode) that works for values that are really categories coded as numbers.

Two behaviours catch people out. First, if no value repeats, MODE returns #N/A rather than guessing. Second, when two or more values share the top count, MODE returns the one whose first appearance comes earliest in the data, and silently ignores the others. Text, logical values and empty cells inside ranges are ignored, so MODE cannot find the most common word — use INDEX/MATCH with COUNTIF for that.

Compatibility note: MODE is one of the older statistical functions that Excel 2010 moved to the Compatibility group. It still works in every version, but for new workbooks Microsoft recommends MODE.SNGL. MODE.SNGL behaves identically. If you want all tied modes, MODE.MULT returns them as a vertical array (it spills in Microsoft 365).

Examples

1Most common shoe size

D2fx=MODE(B2:B8)
ABCD
1CustomerShoe size
2Ana3841
3Ben41
4Cara39
5Dev41
6Eli42
7Fay40
8Gus41

Result: 41

41 appears three times, more than any other size, so it is the mode.

2Ties: the first one wins

C2fx=MODE(A2:A7)
ABC
1Rating
233
35
45
52
63
74

Result: 3

Both 3 and 5 appear twice. The first 3 (row 2) comes before the first 5 (row 3), so MODE returns 3. =MODE.MULT(A2:A7) would return both 3 and 5.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#N/ANo value appears more than once.Wrap in IFERROR (=IFERROR(MODE(B2:B8),"no mode")) or check the data.
#VALUE!A direct argument is text that is not a number.Use ranges; text inside ranges is ignored.

Tips

  • Sorting the data can change which tied value MODE returns, because it depends on order.
  • For the most common text value, use =INDEX(A2:A20, MATCH(MAX(COUNTIF(A2:A20,A2:A20)), COUNTIF(A2:A20,A2:A20), 0)).

Questions

Should I still use MODE?

Only if the workbook must open in Excel 2007 or earlier. Otherwise use MODE.SNGL, which gives the same result and makes the intent clearer to the next person who reads the formula.

Will MODE stop working?

There is no announced removal date. Microsoft keeps compatibility functions so old workbooks keep calculating, but they get no new features.

Google Sheets

MODE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

MODE in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishHYPPIGST
DutchMODUS
FinnishMOODI
GermanMODALWERT
HungarianMÓDUSZ
ItalianMODA
Norwegian (Bokmål)MODUS
PolishWYST.NAJCZĘŚCIEJ
Portuguese (Brazil)MODO
Portuguese (Portugal)MODA
RussianМОДА
SpanishMODA
SwedishTYPVÄRDE
TurkishENÇOK_OLAN