Skip to content
ENExplore Calculators

Pigeonhole Principle Calculator

Work out pigeonhole principle instantly with clear inputs, formula shown and shareable results.

About Pigeonhole Principle Calculator

The pigeonhole principle says n items in m containers force some container to hold at least ⌈n/m⌉. Turning it around, forcing k items into one container requires m(k − 1) + 1 items.

Formulas

Pigeonhole principle

with n items in m boxes, some box holds ≥ ⌈n/m⌉

Generalised form

to force k in one box you need m(k − 1) + 1 items

Worked example

With the default values below, Pigeonhole Principle Calculator returns Some container must hold at least this many of 9. Change any input above and every figure here is recalculated in your browser.

Inputs used

Items to placeminimum 1
100
Containers availableminimum 1
12

Results

Some container must hold at least this many
9
Items needed to force a shared container
13
Items needed to force three in one container
25
Empty containers forced
No, every container could hold at least one

Step by step

  1. 1Values used
  2. 2Pigeonhole principle
  3. 3Generalised form
  4. 4Some container must hold at least this many= 9
  5. 5Items needed to force a shared container= 13
  6. 6Items needed to force three in one container= 25
  7. 7Empty containers forced= No, every container could hold at least one

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

100 items in 12 containers?

Some container holds at least ⌈100/12⌉ = 9.

The classic birthday example?

With 366 possible birthdays, 367 people force a shared birthday — that is the principle with m = 366, k = 2.

Pigeonhole Principle Calculator | Calcrivo