Zipf's Law Calculator
Predict city population by rank using the rank-size distribution rule.
Rank-Size Distribution (Top 10)
| Rank | Predicted Population | % of Largest |
|---|
How to Use the Zipf's Law Calculator
- Select a country preset — or choose "Custom" and enter the population of any largest city.
- Enter the target rank — which position in the city hierarchy you want to predict (2 = second largest, 3 = third, etc.).
- Read the prediction — Zipf's Law predicts the population as the largest city divided by the rank number.
- Review the table — see the predicted size distribution for ranks 1 through 10.
Understanding Zipf's Law for City Sizes
Zipf's Law is one of the most striking empirical regularities in the social sciences. Named after linguist George Kingsley Zipf, who first documented it for word frequencies, the law has been found to govern an astonishing variety of phenomena — from city populations to website traffic to income distributions.
The Rank-Size Rule Formula
Applied to cities, Zipf's Law takes the elegantly simple form:
Populationrank = Populationlargest / Rank
The second-largest city has half the population of the largest; the third has one-third; the tenth has one-tenth. This inverse relationship holds with remarkable precision across many countries and time periods.
How Well Does It Fit Real Data?
The United States is a textbook example. New York City (~8.3 million) predicts Los Angeles at ~4.15 million (actual: ~3.9 million), Chicago at ~2.78 million (actual: ~2.7 million), and Houston at ~2.08 million (actual: ~2.3 million). The predictions are not perfect but are strikingly close given the formula uses only one input — the largest city's size.
Why Does This Pattern Exist?
Economists and geographers have proposed several mechanisms. The random growth model (Gibrat's Law) shows that if all cities grow by random percentages each year, the resulting distribution converges to a power law over time. The preferential attachment model suggests that larger cities attract more migrants, creating a self-reinforcing hierarchy. In reality, both mechanisms likely contribute.
Countries That Break the Pattern
Not every country follows Zipf's Law. Nations with a single primate city — a capital that dominates the urban landscape — deviate significantly. France (Paris dwarfs all other French cities), Thailand (Bangkok), and Argentina (Buenos Aires) all show a top-heavy distribution. In contrast, countries with federal systems or distributed economies (Germany, the US, Brazil) tend to follow the rank-size rule more closely.
Beyond City Sizes
Zipf's Law appears in word frequencies (the 2nd most common word appears half as often as the 1st), website traffic (the 2nd most popular site gets half the visits), firm sizes, earthquake magnitudes, and even the frequency of musical notes in compositions. Understanding this universal pattern provides insight into how complex systems self-organize.