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
Syntax
MODE(number1, [number2], ...)| Argument | What it means | |
|---|---|---|
number1 | Required | A number, range or array. |
number2, ... | Optional | Up 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
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Shoe size | ||
| 2 | Ana | 38 | 41 | |
| 3 | Ben | 41 | ||
| 4 | Cara | 39 | ||
| 5 | Dev | 41 | ||
| 6 | Eli | 42 | ||
| 7 | Fay | 40 | ||
| 8 | Gus | 41 |
Result: 41
41 appears three times, more than any other size, so it is the mode.
2Ties: the first one wins
| A | B | C | |
|---|---|---|---|
| 1 | Rating | ||
| 2 | 3 | 3 | |
| 3 | 5 | ||
| 4 | 5 | ||
| 5 | 2 | ||
| 6 | 3 | ||
| 7 | 4 |
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.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | No 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.
| Language | Function name |
|---|---|
| Danish | HYPPIGST |
| Dutch | MODUS |
| Finnish | MOODI |
| German | MODALWERT |
| Hungarian | MÓDUSZ |
| Italian | MODA |
| Norwegian (Bokmål) | MODUS |
| Polish | WYST.NAJCZĘŚCIEJ |
| Portuguese (Brazil) | MODO |
| Portuguese (Portugal) | MODA |
| Russian | МОДА |
| Spanish | MODA |
| Swedish | TYPVÄRDE |
| Turkish | ENÇOK_OLAN |