Infinite Monkey Theorem

A chimpanzee at a typewriter
The hypothetical typist

The Infinite Monkey Theorem says that a monkey hitting random keys on a typewriter for an infinite amount of time will, almost surely, eventually type any given text including the complete works of Shakespeare.

This page is a small demonstration. Type a target word below and the generator spits out random letters from a–z as fast as your browser can manage. When the rolling stream happens to contain your word, the search stops.

Target
20×
Attempts
0
Elapsed
0.00s
Rate
0/s
Status
idle
Your random string will appear here...

The math

Each letter has a 1-in-26 chance. For a target of length N, the expected number of letters to generate is roughly 26N — every extra letter makes the search 26× harder.

Length Expected attempts Est. time