Zipf's Law Calculator

Predict city population by rank using the rank-size distribution rule.

Predicted Population (Rank 2)
4,168,409
Largest city / Rank = 8,336,817 / 2

Rank-Size Distribution (Top 10)

Rank Predicted Population % of Largest

How to Use the Zipf's Law Calculator

  1. Select a country preset — or choose "Custom" and enter the population of any largest city.
  2. Enter the target rank — which position in the city hierarchy you want to predict (2 = second largest, 3 = third, etc.).
  3. Read the prediction — Zipf's Law predicts the population as the largest city divided by the rank number.
  4. 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.

Frequently Asked Questions

Zipf's Law is an empirical observation that in many datasets, the frequency of an item is inversely proportional to its rank. For cities, the 2nd largest city is roughly half the size of the 1st, the 3rd is one-third the size, and so on. The formula is: Population = Largest City / Rank.
Zipf's Law provides a remarkably good approximation for many countries, especially large nations with diverse economies. The US follows Zipf's Law closely. Countries with dominant primate cities (like France with Paris) deviate more significantly.
The exact mechanism is debated. One theory is random multiplicative growth (Gibrat's Law): each city grows by a random percentage each year, producing a power-law distribution over time. Another involves preferential attachment — larger cities attract more migrants, reinforcing the hierarchy.
Zipf's Law appears in word frequency, website traffic rankings, income distributions, earthquake magnitudes, and even musical note frequencies. It is one of the most universal patterns in empirical data across natural and human-made systems.
The rank-size rule is the geographic application of Zipf's Law to urban systems. It states that the population of a city ranked Rth equals the population of the largest city divided by R. Countries with balanced urban hierarchies follow this rule well, while primate-city countries deviate.