The 3 best practical examples of pigeonhole principle (with extra real-world twists)

If you’ve ever wondered why some patterns are guaranteed to happen no matter how random things look, the pigeonhole principle is your new best friend. In this guide, we’ll walk through clear, real-world examples of 3 practical examples of pigeonhole principle, and then stretch each one into several everyday situations. These examples of how the principle shows up in birthdays, phone numbers, traffic, and even data storage will help you see that this is not just a contest math trick—it’s a way of thinking about limits and guarantees. We’ll keep it conversational and step-by-step, so even if you’re new to combinatorics, you’ll be able to follow along. By the end, you’ll recognize examples include classic classroom problems, modern 2024–2025 data scenarios, and some surprisingly down-to-earth cases like sock drawers and crowded highways. Let’s turn this abstract idea into something you can actually use when solving math problems—or just winning arguments with your friends.
Written by
Taylor
Published
Updated

Most textbook explanations start with a dry definition. Let’s flip that. We’ll start with real examples of 3 practical examples of pigeonhole principle, then unpack the idea behind them.

At its heart, the pigeonhole principle says:

If you put more objects than containers, at least one container must hold more than one object.

That’s it. Simple. But the way this idea shows up in real life is surprisingly powerful.

We’ll build around three core themes:

  • People and birthdays
  • Objects and limited categories (like socks or phone numbers)
  • Data and modern constraints (like passwords and storage)

From each theme, we’ll spin off several examples, so you’ll end up with more than 3 practical examples, all rooted in the same principle.


Example 1: Birthday patterns in any big enough group

Let’s start with one of the best examples of the pigeonhole principle that students actually remember: birthdays.

Imagine you walk into a crowded lecture hall with 400 students. You might wonder: Is there a day of the year that is definitely someone’s birthday at least twice? Three times? Ten times?

There are 366 possible birthdays if you include February 29. Those are your “pigeonholes.” The students are your “pigeons.”

1A. Guaranteeing a shared birthday

If you have 367 people, the pigeonhole principle says at least two of them share a birthday. Why?

  • Pigeonholes: 366 possible birthdays
  • Pigeons: 367 people

Once every birthday has at most one person, that covers 366 people. The next person is forced to share a birthday with someone.

That’s the classic example of pigeonhole principle you’ll see in many math courses.

1B. Guaranteeing a birthday with at least k people

Let’s push this further into a more practical style question you might see on a contest or exam:

In a university with 10,000 students, show that there is a day of the year that is the birthday of at least 28 students.

We use the same idea:

  • Pigeons: 10,000 students
  • Pigeonholes: 365 days (ignore Feb 29 for simplicity)

If every day had at most 27 birthdays, the maximum number of birthdays would be:

[
365 \times 27 = 9{,}855.
]

But we have 10,000 students. That’s more than 9,855, so this “at most 27 per day” scenario is impossible.

So at least one day must have 28 or more birthdays. That’s the pigeonhole principle in slightly upgraded form.

1C. 2024–2025 twist: social media “birthday clusters”

In the age of social media, platforms often show you “Today is X people’s birthday.” On a large platform with millions of users, the pigeonhole principle guarantees that some dates will have enormous clusters of birthdays.

For example, if a platform has 200 million active users who entered a real birthday:

  • Pigeons: 200,000,000 birthdays
  • Pigeonholes: 366 possible days

On average, that’s more than 546,000 birthdays per day. The pigeonhole principle tells you at least one day has at least that many birthdays (and probably more, due to non-uniform birth patterns).

Demographers and health agencies sometimes study birth patterns by date. For instance, the CDC publishes birth statistics by month and day in the U.S. (CDC natality data). Even though real birth distributions are not perfectly uniform, the pigeonhole principle still gives a clean minimum guarantee.


Example 2: Everyday objects and limited categories

The next family of examples of 3 practical examples of pigeonhole principle lives in your drawers, closets, and office.

2A. The sock drawer problem

This is one of the best examples because it’s so visual.

Say you have:

  • 10 pairs of black socks
  • 10 pairs of white socks

All mixed in a dark drawer. You reach in without looking. How many socks do you need to pull out to guarantee you have at least one matching pair?

You might get unlucky: black, white, black, white… But the pigeonhole principle makes it simple.

  • Pigeonholes: 2 colors (black, white)
  • Pigeons: the socks you pull out

If you pull out 3 socks, the worst case is: black, white, and then the third sock must be either black or white. That means you must have at least two of one color. So with 3 socks, you are guaranteed a matching pair.

The general pattern: if there are n colors, then n + 1 socks guarantee a match. That’s a clean example of pigeonhole principle with a real-life feel.

2B. The office meeting example

Imagine a company has 13 teams and 145 employees. You want to show that at least one team has at least 12 employees.

  • Pigeonholes: 13 teams
  • Pigeons: 145 employees

If every team had at most 11 employees, the total would be:

[
13 \times 11 = 143.
]

But there are 145 employees. That’s 2 more than 143, so at least one team must have 12 or more employees.

This is not just a puzzle. It’s the same reasoning HR or operations teams might use informally when thinking about workload distribution.

2C. Phone numbers and area codes

Consider U.S. phone numbers with area codes. Suppose a city has 2 million active phone numbers but only 5 area codes assigned to it.

  • Pigeonholes: 5 area codes
  • Pigeons: 2,000,000 phone numbers

By the pigeonhole principle, at least one area code must contain at least:

[
\left\lceil \frac{2{,}000{,}000}{5} \right\rceil = 400{,}000
]

phone numbers.

Even if the distribution is uneven, you’re guaranteed that some area code is heavily loaded. This kind of reasoning shows up in telecom planning and capacity discussions, even if engineers don’t always name it as an example of the pigeonhole principle.

The North American Numbering Plan Administration (NANPA) tracks area code usage and assignments (nanpa.com). While they use more detailed forecasting, the basic idea of “too many numbers, not enough codes” is a live pigeonhole story.


Example 3: Modern data, passwords, and storage limits

Now let’s bring the pigeonhole principle into 2024–2025 territory: data, passwords, and digital systems.

These are some of the most practical examples of 3 practical examples of pigeonhole principle because they show up in cybersecurity, storage, and algorithm design.

3A. Password collisions

Imagine a website that forces every user to pick a 4-digit PIN from 0000 to 9999.

That’s:

  • Pigeonholes: 10,000 possible PINs
  • Pigeons: users

If the site has 10,001 users, then by the pigeonhole principle, at least two users must share the same PIN, even if they all tried to be original.

This is why short PINs and passwords are risky. There just aren’t enough “holes” for all the “pigeons” if the user base gets large. Modern password advice from organizations like NIST (NIST Digital Identity Guidelines) increasingly emphasizes longer, more complex passphrases precisely because the space of possibilities needs to be large.

3B. Hashing and data storage

In computer science, hashing functions map large sets of inputs (like files or passwords) into smaller sets of outputs (hash values). No matter how clever the hash function, if more inputs exist than outputs, collisions are guaranteed.

That’s the pigeonhole principle in action.

For example, suppose a system uses a hash that outputs 64-bit values. There are:

[
2^{64} \approx 1.84 \times 10^{19}
]

possible outputs. That’s huge, but still finite. If someone stored more than that many distinct files, at least two different files would have the same hash.

In practice, we don’t come close to that number, but the guarantee is still there in theory. Cryptographers design systems to make collisions extremely unlikely in practice, but they can’t escape the logic of the pigeonhole principle.

3C. Data compression limits

Here’s a classic thought experiment that leans heavily on the pigeonhole principle:

Can you design a perfect compression algorithm that makes every file shorter, with no exceptions?

Suppose we look at all possible files of length 1,000 bits. There are:

[
2^{1000}
]

such files. If you try to compress each one into a shorter file (say 999 bits or less), the number of possible outputs is:

[
2^0 + 2^1 + \dots + 2^{999} = 2^{1000} - 1.
]

So you have:

  • Pigeons: \(2^{1000}\) input files
  • Pigeonholes: \(2^{1000} - 1\) possible shorter outputs

More pigeons than holes. By the pigeonhole principle, at least two different input files must map to the same compressed file. That means you cannot decompress uniquely.

So a “magic” compression tool that makes every file smaller is mathematically impossible. Real-world compression (like ZIP, PNG, MP3) only works well on structured or redundant data, not on every possible bitstring.

3D. Traffic and congestion in cities

Let’s step away from pure digital and look at urban life in 2024–2025.

Imagine a city with 200,000 commuters and 10 major highway routes into downtown.

If every route could somehow limit itself to 19,999 commuters, the total would be:

[
10 \times 19{,}999 = 199{,}990.
]

But we have 200,000 commuters. That’s 10 more people than that cap. The pigeonhole principle tells us that at least one route must carry 20,000 or more commuters.

So even with perfect planning, certain bottlenecks are mathematically unavoidable when the number of travelers exceeds what evenly distributed capacity can handle. Transportation planners often run more complex simulations, but this kind of lower-bound reasoning is a simple example of pigeonhole thinking.

Organizations like the U.S. Department of Transportation (transportation.gov) publish congestion studies that implicitly reflect these capacity-versus-demand limits.


Pulling it together: why these are the best examples of pigeonhole principle

Across these examples of 3 practical examples of pigeonhole principle, we’ve seen the same pattern:

  • Birthday and people problems show that with enough people and limited dates, repetition is forced.
  • Sock drawers, teams, and phone numbers highlight how limited categories guarantee clustering.
  • Passwords, hashing, compression, and traffic bring the principle into modern 2024–2025 life, from cybersecurity to commuting.

What makes these some of the best examples is that they’re not just abstract puzzles. They answer questions like:

  • How many people guarantee a shared birthday?
  • How many socks do I need to grab in the dark?
  • Why can’t every user have a different 4-digit PIN on a big site?
  • Why can’t compression shrink every file?

Whenever you see a situation with more items than categories, your “pigeonhole radar” should turn on. Chances are, there’s a guaranteed repetition or crowding effect waiting to be pointed out.


FAQ: Common questions about pigeonhole principle examples

What are some real examples of the pigeonhole principle in daily life?

Real examples include grabbing socks from a drawer (enough socks guarantee a matching color), assigning students to days of the week for presentations (enough students guarantee at least one busy day), and sharing 4-digit PINs among many users on a large website (enough users guarantee at least two share a PIN).

Can you give an example of the pigeonhole principle in cybersecurity?

Yes. If a site has more users than possible passwords in its allowed format, then by the pigeonhole principle some users must share passwords. For instance, with 10,000 possible 4-digit PINs and 10,001 users, at least two users share the same PIN. This is one reason security guidelines, like those from NIST, encourage longer passwords.

How is the pigeonhole principle used in computer science?

Examples include hash functions (more inputs than outputs guarantee hash collisions), data compression (you cannot compress every possible file into a shorter file without losing information), and load balancing (more tasks than servers guarantee at least one server handles multiple tasks). These are standard topics in algorithms and information theory courses at universities such as MIT and Harvard.

Are the birthday paradox and pigeonhole principle the same thing?

They are related but not the same. The birthday paradox is about probability: with 23 people, there’s about a 50% chance two share a birthday. The pigeonhole principle gives a certainty statement: with 367 people, two must share a birthday. The paradox talks about likelihood; the pigeonhole principle talks about guarantees.

Why are these called “examples of 3 practical examples of pigeonhole principle” if there are more than three?

The three main pillars here are birthdays, everyday objects (like socks and teams), and modern data problems (passwords, hashing, traffic). Each pillar branches into several concrete scenarios. Grouping them this way gives a cleaner structure while still offering many real examples to practice with.

Explore More Combinatorial Problem Solving

Discover more examples and insights in this category.

View All Combinatorial Problem Solving