Principles of Statistics for Data Analysis

Making sense of a pile of numbers

The most common: the mode

Find the most common value, the mode, by counting categories with COUNTIF and numbers with MODE.

By the end of this lesson you can find the mode: the most common category with COUNTIF, and the most common number with MODE.

Why it matters

Amara has space for only a few crates, and if she runs out of her most popular fruit, customers walk to the next stall. The mean and the median cannot tell her which fruit that is: you cannot add up fruit, or put it in order of size. She needs the most common one.

The idea in plain words

Think of a class choosing its favourite fruit. Each child puts up a hand for one fruit. The fruit with the most hands wins. That winner is the mode.

Mode: the value that appears most often. It works for categories (like fruit names) as well as for numbers.

Category: a value that is a name or a group, not an amount. You met these in Lesson 4 (for example fruit, island or colour). Some categories have an order, like small, medium and large. Fruit names do not.

To find the mode of categories, count each one, then pick the biggest count.

A random sample of 60 of Amara's sales from the month, counted by fruit. The longest bar is the mode. Synthetic data.

See it done

Data: amara-stall-s1-sales.csv (synthetic). A random sample of 60 of Amara's sales from the month, one row per sale. Column B is fruit, column C is quantity (how many pieces), column E is payment. Rows 2 to 61.

Part A: the most common fruit (a category).

  1. In an empty area, type the six fruit names in a column, for example H2 to H7: Mango, Orange, Banana, Pineapple, Pawpaw, Watermelon.
  2. In I2 type =COUNTIF(B$2:B$61, H2) and copy it down to I7. The $ signs keep the range fixed while you copy.
  3. The counts are: Mango 14, Orange 16, Banana 10, Pineapple 7, Pawpaw 5, Watermelon 8.
  4. The biggest count is 16, so the mode is Orange. Amara should never run out of oranges.

Part B: the most common number.

  1. For numbers, one formula does it: =MODE(C2:C61) gives 1. The most common sale is a single piece of fruit: 21 of the 60 sales.
  2. Compare the three centres for quantity: mean =AVERAGE(C2:C61) is 2.5333... (about 2.53), median =MEDIAN(C2:C61) is 2, mode is 1. Three honest numbers, three different questions answered.

Real world: penguins in Antarctica.

Data: penguins.csv (real). Scientists recorded 344 penguins on three islands (a few have some measurements missing). Column B is island. Rows 2 to 345.

  1. =COUNTIF(B2:B345, "Biscoe") gives 168, "Dream" gives 124 and "Torgersen" gives 52.
  2. The mode of island is Biscoe. But careful: 168 of 344 is less than half. The mode is the most common value. It does not have to be a majority.

More penguins were recorded on Biscoe than on any other island, but still less than half of them. Data: Palmer penguins, Gorman, Williams and Fraser (2014), via palmerpenguins (Horst, Hill and Gorman 2020), CC0.

Tip. COUNTIF and MODE are the same in Google Sheets and Excel.

Your turn, with help

In the sample, how did most customers pay: Cash or Transfer?

Hints: Column E is payment. Count each kind with COUNTIF(E2:E61, "Cash") and COUNTIF(E2:E61, "Transfer"). The bigger count is the mode.

Show the answer

Cash: 35 sales. Transfer: 25 sales. The mode is Cash.

Your turn, alone

  1. In penguins.csv, column A is species. Which species is the mode, and how many penguins does it have?
  2. Column E is flipper_length_mm. Use MODE to find the most common flipper length. How many penguins have exactly that length?
  3. Is that most common flipper length a good summary of all 342 measured flippers? Answer in one sentence.
  4. Made-up numbers: a shop sold shoes in these sizes: 38, 40, 40, 41, 42, 42, 44. What is the mode? Be careful.

Watch out

  • Using MODE on words. MODE only looks at numbers. It skips text, so on a column of fruit names it finds no numbers and you get an error instead of a fruit. Count categories with COUNTIF. (Excel also offers MODE.SNGL, the newer name for the same job.)
  • Missing a tie. A list can have two or more modes. MODE shows only one number, so make a count table when it matters. (Both tools also have MODE.MULT, which lists every mode.)
  • No repeats at all. If no value appears twice, there is no mode. In Excel, MODE then shows #N/A. Always ask: does any value repeat?

Say it back

  1. Which centre works for categories like fruit names?
  2. Which formula counts how many cells in B2:B61 say "Mango"?
  3. Can a list have more than one mode?
Show the answers
  1. The mode (the most common value).
  2. =COUNTIF(B2:B61, "Mango").
  3. Yes. When two values tie for the biggest count, both are modes.

What is next

Not every value counts equally. Amara sells oranges at ₦200 and watermelons at ₦2,500, but many more oranges. If you average her price tags as if each counted once, you get the wrong average price per piece. Lesson 7 shows the fix: the weighted average.

Formulas in this lesson were checked on 2026-10-09 against the official Google Sheets and Microsoft Excel help pages, and every number was calculated by running the formulas in a spreadsheet program (LibreOffice Calc) and checked by a separate calculation. Menu steps are written for Google Sheets on the web and Excel for Microsoft 365.


Answers to Your turn, alone

Show the answers
  1. COUNTIF on column A: Adelie 152, Chinstrap 68, Gentoo 124. The mode is Adelie, with 152 penguins.
  2. =MODE(E2:E345) gives 190 mm. =COUNTIF(E2:E345, 190) gives 22 penguins.
  3. Not really: only 22 of the 342 measured penguins have exactly that length, so it says little about the rest. For measured numbers with few repeats, the mean or median is usually more useful.
  4. Count each size: 38 appears 1 time, 40 appears 2 times, 41 appears 1 time, 42 appears 2 times, 44 appears 1 time. Sizes 40 and 42 tie, so there are two modes: 40 and 42.