Pigeonhole principle calculator
Apply the pigeonhole principle: if N items go into M containers, at least one container must hold ⌈N/M⌉ items — no distribution can keep every container below that. Enter the items and containers to get that guaranteed minimum, and set a target k to find how many items you must place to force some container to reach k, namely M·(k−1)+1. A simple idea with surprisingly deep consequences across combinatorics and computer science.
Related tools
All Combinatorics tools →The Pigeonhole principle calculator turns Items N, Containers M, Target k per container into Guaranteed max in fullest container ⌈N/M⌉, Items needed to force k in one: M·(k−1)+1, Do N items already force k?, instantly and for free. For instance, with Items N = 10, Containers M = 3 and Target k per container = 2 it returns Guaranteed max in fullest container ⌈N/M⌉ = 4, Items needed to force k in one: M·(k−1)+1 = 4 and Do N items already force k? = yes.
How to use it
- Enter your values: Items N, Containers M, Target k per container.
- Read the result instantly: Guaranteed max in fullest container ⌈N/M⌉, Items needed to force k in one: M·(k−1)+1, Do N items already force k?.
Frequently asked questions
How does the Pigeonhole principle calculator work?
It takes Items N, Containers M and Target k per container and derives Guaranteed max in fullest container ⌈N/M⌉, Items needed to force k in one: M·(k−1)+1 and Do N items already force k? from them. The calculation is live as you type, so the result updates on every change.
Which values does the calculator ask for?
3 values: Items N, Containers M and Target k per container. Nothing else is required — no account, no file upload.
What does a typical calculation look like?
With Items N = 10, Containers M = 3 and Target k per container = 2, the calculator returns Guaranteed max in fullest container ⌈N/M⌉ = 4, Items needed to force k in one: M·(k−1)+1 = 4 and Do N items already force k? = yes. Those figures come from running this exact tool, so you can reproduce them by entering the same values.
How much does the result change with different inputs?
It moves a lot. Using Items N = 20, Containers M = 6 and Target k per container = 4 instead, Items needed to force k in one: M·(k−1)+1 goes from 4 to 19 — which is why it is worth testing a few scenarios rather than trusting a single figure.
What does it give for smaller values?
Scaled down to Items N = 5, Containers M = 2 and Target k per container = 1, Guaranteed max in fullest container ⌈N/M⌉ comes out at 3. The relationship is worth checking at both ends before you rely on a single result.
When would I actually use this?
Counting possibilities before enumerating them: hands in a card game, passwords of a given shape, seatings around a table, or lottery odds.
What is the most common mistake?
Choosing a permutation when order does not matter. Picking three people from ten gives 720 arrangements but only 120 groups — the two differ by a factor of six here, and far more as the numbers grow.
Where do the figures come from, and how current are they?
Counting formulas are exact by definition. Large factorials are computed with arbitrary precision where needed, so a result is not silently rounded into scientific notation.