How do you find the mode?

Short answer. The mode is the value that appears most often. Count each value and pick the one with the highest count. In 3, 7, 3, 9, 7, 3 the value 3 appears three times, so the mode is 3. If two values tie for most, both are modes. If nothing repeats, there is no mode.

Of the three averages, the mode is the only one that needs no arithmetic at all. It is counting. It still produces wrong answers in a few reliable ways: reporting the count instead of the value, inventing a mode where there is none, and reading a frequency table sideways.

The method

Sort the values so equal ones sit together, count each, and take the value with the biggest count. Shoe sizes sold in one morning: 8, 9, 10, 9, 11, 9, 8, 10, 9, 12.

sorted   8, 8, 9, 9, 9, 9, 10, 10, 11, 12

size     count
  8        2
  9        4
 10        2
 11        1
 12        1

mode     9

The mode is 9, not 4. The 4 is how many times it appeared. That mix-up is the most common way to lose the mark. For a short list, a tally works just as well as sorting. For a long one, sorting makes the runs of equal values hard to miss.

Two modes, or none

The mean and the median always produce exactly one answer. The mode can produce two, several, or none.

2, 4, 4, 5, 7, 7, 9       4 and 7 each appear twice    modes 4 and 7
1, 3, 5, 8, 13            every value appears once     no mode
2, 2, 5, 5, 8, 8          every value appears twice    no mode

A set with two modes is bimodal, and with more it is multimodal. Report every tied value, not just the first one you found. When every value has the same count, no value is more typical than another, so the usual classroom answer is "no mode". Not zero. Zero is a value, and it would be wrong in a set that does not contain it.

Software does not always agree. Python's statistics.mode on 1, 3, 5, 8, 13 returns 1, simply because 1 came first, and on 2, 4, 4, 5, 7, 7, 9 it returns 4 and says nothing about 7. Its statistics.multimode returns 4 and 7. Check which one a tool is giving you before trusting a single number.

Mode, median, mean on the same data

Sick days taken last year by seven people on a team: 0, 0, 0, 1, 2, 3, 15.

mode     0                   three people took none
median   1                   the 4th of 7 sorted values
mean     21 ÷ 7  =  3
range    15 − 0  =  15

Three honest answers to "how many sick days does a typical person take", and they disagree. The mean of 3 is pulled up by one long illness, and five of the seven took fewer days than that. The median of 1 is the middle person. The mode of 0 is the most common experience. None is wrong. They answer different questions, and the range of 15 is the hint that they will disagree.

The mode works on words

The mode is the only average that works on categories. T-shirt sizes ordered for an event: S, M, L, M, XL, M, L.

S    1
M    3
L    2
XL   1

mode   M

There is no mean of S and XL, and no sensible median of eye colors or favorite pizza toppings. The mode handles them all, which is why it shows up in surveys and stock planning more than in exams.

Mode from a frequency table

When the data arrives as counts, the counting is already done. Find the biggest frequency and read across to its value. Pets per household on one street:

pets   households
  0        12
  1        15
  2         9
  3         3
  4         1

mode   1 pet          not 15

The answer is 1 pet, the value whose row has the biggest count. Writing 15 answers "how many households", which nobody asked. For comparison, the same 40 households have a mean of 46 ÷ 40 = 1.15 pets and a median of 1, since the 20th and 21st values in order both land in the 1 row.

Grouped data and the modal class

When values are grouped into ranges, the individual values are gone, so there is no exact mode. What you can name is the modal class, the group with the highest frequency. Test scores for 40 students:

score     students
40 to 50      4
50 to 60      9
60 to 70     15     modal class
70 to 80     10
80 to 90      2

The modal class is 60 to 70. If a single number is required, the standard estimate leans toward whichever neighboring class is bigger:

mode ≈ L + (f1 − f0) ÷ ((f1 − f0) + (f1 − f2)) × h

L   = 60    lower edge of the modal class
f1  = 15    modal class count
f0  = 9     class below
f2  = 10    class above
h   = 10    class width

mode ≈ 60 + 6 ÷ (6 + 5) × 10
     = 60 + 60/11
     = 65 5/11  ≈  65.45

The estimate sits a little above the middle of the class, because the class above (10 students) is bigger than the class below (9). It is an estimate, so round it for reporting, but 60/11 is a repeating decimal, 5.4545 and on, so do the rounding once, at the end, not halfway through. The rounding post explains why.

When equal values stop being equal

The mode depends on spotting that two values are the same. A computer using binary floating point, which most software does, can fail at exactly that. It stores 0.1 + 0.2 as 0.30000000000000004, so a price that was computed does not match the same price typed in:

values      0.3, 0.3, 0.1 + 0.2, 0.4, 0.4
true mode   0.3 appears three times          mode 0.3

as stored   0.3, 0.3, 0.30000000000000004, 0.4, 0.4
computer    0.3 twice, 0.4 twice             modes 0.3 and 0.4

One invisible error turned a clear answer into a tie. It is the same fault behind 0.1 + 0.2 missing 0.3. Prism does its arithmetic on exact decimals, so 0.1 + 0.2 is exactly 0.3, and in fraction mode 60 + 60/11 comes back as 65 5/11, not a decimal that someone already rounded.

Prism Calculator icon

Count by hand, compute the estimate in Prism

Type the grouped mode estimate in Prism's fraction mode and read 65 5/11, exact. Every calculation stays in a searchable history, so the mean and median for the same data are there to compare. Fractions and history are free forever, no ads, no subscription. See the app.