Synthetic Zipf corpus Real text overlay Fitted power-law curve
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Zipf's Law: Word Frequency vs Rank

Every large body of natural-language text obeys a strikingly simple pattern: if you rank its words by how often they occur, frequency falls off as a power of rank, f(r) ≈ C / r^s, with s close to 1. This simulator makes that pattern tangible by generating a synthetic corpus from an explicit Zipfian probability table — draw N tokens from a vocabulary of V words weighted by 1/r^s — and rendering the resulting rank/frequency counts as a 3D skyline in log-log space, where a true power law shows up as a straight descending line. A second row tokenizes whatever text you paste into the box, counts real word frequencies, fits the same log-log line live, and overlays it in amber next to the synthetic teal city, so you can watch a genuine paragraph of English land on almost exactly the same slope as the mathematical model.