Hilbert's Hotel Paradox Calculator

Simulate how a fully occupied hotel with infinitely many rooms can still accommodate one guest, a finite group, or an infinite bus.

Infinite hotel room simulator
Select an arrival scenario and trace a numbered guest or passenger to the room produced by the rearrangement.

About Hilbert's Hotel paradox

Hilbert's Hotel is a thought experiment introduced by mathematician David Hilbert to illustrate the unusual behavior of countably infinite sets. Imagine a hotel with rooms numbered 1, 2, 3, and so on without end. Every room is occupied, so a finite hotel manager would display a no-vacancy sign. In the infinite hotel, however, the manager can still create space by moving guests according to a rule that pairs every existing guest with a different room. When one new guest arrives, guest 1 moves to room 2, guest 2 moves to room 3, and in general guest n moves to room n plus 1. Every existing guest retains a room and room 1 becomes free. For a finite group of k new guests, existing guest n can move to room n plus k, leaving the first k rooms open. This calculator uses the entered number as both the finite group size and the guest being traced, so the displayed destination is twice that number. The infinite-bus scenario is even more surprising. Moving every current guest from room n to room 2n places all existing guests in the even-numbered rooms. The infinitely many odd-numbered rooms remain available. Passenger n from the bus can then occupy room 2n minus 1. This creates a one-to-one assignment for every old guest and every new passenger even though both groups are infinite and the hotel was already full. The paradox does not claim that real hotels can contain infinite people. It demonstrates that infinite cardinality does not obey every intuition learned from finite counting. The natural numbers can be put in one-to-one correspondence with a proper subset such as the even numbers, so both sets have the same countably infinite size. No final guest must move and no largest room is required because the reassignment is a mathematical mapping rather than a sequence that must finish one move at a time. Use the simulator to inspect specific room assignments rather than trying to list the entire infinite process. Any positive whole-number index follows the same rule. The examples connect the formulas to concrete guests, while the explanation shows why no two people receive the same room and why every designated room has exactly one occupant.

Hilbert's Hotel examples

ArrivalAssignment ruleSpace created
One new guestGuest n moves to room n + 1Room 1 is free for the arrival.
Five new guestsGuest n moves to room n + 5Rooms 1 through 5 become available.
One infinite busOld guest n goes to 2n; passenger n goes to 2n - 1Even rooms hold old guests and odd rooms hold bus passengers.

How to use the infinite hotel simulator

  1. Choose whether one guest, a finite group, or one infinite bus arrives.
  2. Enter the positive whole-number index of the guest or passenger you want to trace.
  3. Select Simulate room assignment to apply the scenario's one-to-one mapping.
  4. Compare the old-guest and new-arrival assignments in the result panel.

Hilbert's Hotel FAQ

How can a full hotel accept another guest?

Each current guest moves from room n to room n plus 1. This preserves a room for every existing guest while freeing room 1.

Can the hotel accept infinitely many new guests?

Yes, if the arrivals are countably infinite. Existing guests move to even rooms and the new passengers take odd rooms, producing a unique room for everyone.

Does the reassignment ever finish?

The argument describes a complete mathematical mapping rather than people moving one after another in real time. Every numbered guest has an immediately defined destination, so no last move is needed.

What does countably infinite mean?

A set is countably infinite when its members can be paired one-to-one with the positive whole numbers. The natural numbers, even numbers, and integers are standard examples.

Why do the even numbers have the same size as all natural numbers?

The rule n maps to 2n and pairs every natural number with exactly one even number. Infinite sets can therefore have the same cardinality as a proper subset of themselves.