How to Find Mode in Excel for Grouped Data

Cody Schneider

Finding the mode in a simple list of numbers is a walk in the park for Excel, but things get tricky when your data is grouped into ranges, like age groups or sales brackets. Excel doesn't have a built-in function to find the mode for a frequency distribution directly. This article will show you how to calculate the mode for grouped data using a simple statistical formula right within your spreadsheet.

What is Grouped Data, and Why Can't I Just Use the MODE Function?

First, let's clear up a few key concepts. The mode is the value that appears most frequently in a dataset. In the set {2, 4, 5, 5, 6, 7}, the mode is 5 because it shows up twice, more than any other number.

Grouped data is data that has been organized into categories or class intervals. Instead of a long list of individual values, you have a summary table. For example, instead of listing the individual age of every person surveyed, you might group them like this:

  • 20-29 years old: 15 people

  • 30-39 years old: 28 people

  • 40-49 years old: 22 people

The problem is that once data is grouped, you lose the individual values. We know 28 people are in the "30-39" age group, but we don't know their exact ages. Is the most common age 32? Or 38? We can't tell. This is why Excel's standard =MODE() or =MODE.SNGL() functions won't work. Those functions look for a single, recurring number, which you don't have anymore.

Instead of finding the exact mode, we have to estimate it based on the frequency distribution. We do this by first identifying the class with the highest frequency (the modal class) and then using a formula to pinpoint an estimated mode within that range.

The Formula to Estimate Mode for Grouped Data

To calculate the mode from grouped data, we use a standard statistical formula that considers the frequency of the modal class as well as the frequencies of the classes directly before and after it. This helps us make a more accurate estimate of where the mode likely falls within that class.

The formula is:

Mode = L + [(fm - f1) / ((fm - f1) + (fm - f2))] * w

That might look intimidating, but it's simpler than it appears once you break it down. Here's what each part means:

  • L: The lower boundary of the modal class (the class with the highest frequency).

  • fm: The frequency of the modal class.

  • f1: The frequency of the class immediately before the modal class.

  • f2: The frequency of the class immediately after the modal class.

  • w: The width of the class interval (the size of the group, e.g., 10 for a range like "30-40").

Step-by-Step Guide: How to Find Mode in Excel for Grouped Data

Let's walk through an example. Imagine you have the test scores for a class of 60 students, grouped into intervals.

Step 1: Set Up Your Data Table

Organize your data in an Excel sheet. You'll need columns for the class intervals and their corresponding frequencies. It's also helpful to add columns for the lower boundary and class width to make the formula easier to build.

Your table should look something like this:

A: Score Range (Classes)

B: Lower Boundary (L)

C: Class Width (w)

D: Number of Students (Frequency)

50-60

50

10

8

60-70

60

10

12

70-80

70

10

21

80-90

80

10

14

90-100

90

10

5

Note: Fill in your actual data accordingly.

The Class Width (w) is calculated by subtracting the lower boundary of a class from the upper boundary (e.g., 80 - 70 = 10).

Step 2: Identify the Modal Class and Component Values

Look at column D (Frequency) to find the highest value. In this case, the highest frequency is 21, which corresponds to the score range 70-80. This is our modal class.

Now we can identify all our components for the formula:

  • L (Lower boundary of modal class) = 70

  • fm (Frequency of the modal class) = 21

  • f1 (Frequency of the class before) = 12 (from 60-70 group)

  • f2 (Frequency of the class after) = 14 (from 80-90 group)

  • w (Class width) = 10

Step 3: Build the Formula in Excel

Now, let's translate the statistical formula into an Excel formula. It's a good practice to put your component values into separate cells so your formula is clean and easy to read. This also makes it easy to update if your data changes.

Set up a small calculation area in your sheet:

Cell

Description

Value

G2

L (Lower boundary of modal class)

70

G3

fm (Freq of modal class)

21

G4

f1 (Freq before)

12

G5

f2 (Freq after)

14

G6

w (Class width)

10

With this setup, the formula for the mode becomes:

=G2 + ((G3 - G4) / ((G3 - G4) + (G3 - G5))) * G6

Enter this formula into an Excel cell (e.g., H2). When you do, you will get the estimated mode value, which is approximately 75.625.

This tells us that the estimated mode — the most common score — is approximately 75.63. This makes sense, as the frequency in the modal class (21) is much higher than the frequency in the class before it (12), but only moderately higher than the class after it (14). This pulls the estimated mode slightly above the midpoint of 75.

Important Considerations and Tips

While this formula is straightforward, there are a few scenarios to keep in mind.

What if the Modal Class is the First or Last Class?

This can happen. If your highest frequency occurs in the very first category of your dataset, what is f1 (the frequency before)?

Simple: f1 would be 0. The formula still works perfectly.

Likewise, if your modal class is the very last category, your f2 (the frequency after) would be 0. The calculation remains valid.

Uneven Class Widths

The standard formula assumes that all your class intervals are the same size (e.g., all have a width of 10). If your data has class intervals of varying widths (e.g., 20-25, 25-40, 40-50), this estimation method becomes less reliable. For most standard frequency distributions, maintaining consistent class widths is best practice for accurate analysis.

Automating the Component Selection

For advanced users, you could automate finding the L, fm, f1, and f2 values using functions like MAX, INDEX, and MATCH. This is especially useful if you have a large dataset or want a dynamic calculation that updates automatically. However, for most cases, visually identifying these values is quick and sufficient.

Final Thoughts

Calculating the mode for grouped data in Excel isn’t possible with a single function, but it's easily done by implementing the statistical formula using basic cell references. By breaking down your problem into identifying the modal class and its related frequency values, you can build a simple and effective calculator for your needs.

Constantly wrangling data in spreadsheets like this can become tedious, especially when your reports pull from various sources like Google Analytics, your CRM, or ad platforms. At some point, manual data prep takes more time than the actual analysis. That’s why we wanted to create a better way. With Graphed, you can securely connect your data sources once and then build reports simply by talking to an AI data analyst. Instead of grappling with cell references and formulas, just ask, "Show me a chart of sales grouped by deal size this quarter," and get an interactive dashboard in seconds.