Nairobi
696 km²
Shanghai
6,341 km²
Kenya
China
Area Comparison
Nairobi is 9.1x smaller than Shanghai
Population Comparison
Nairobi has 5.3x fewer people than Shanghai
In terms of area, Shanghai is 9.1x the size of Nairobi. Shanghai spans 6,341 km² (2,448 mi²) while Nairobi covers 696 km² (269 mi²) — a difference of 5,645 km². You could fit Nairobi inside Shanghai approximately 9 times.
To put Nairobi's size in perspective, its area of 696 km² is about 1.1x smaller than New York City. Meanwhile, Shanghai at 6,341 km² is about 1.5x the size of Los Angeles metro.
Picture Nairobi another way: its area is large enough to fit about 97,000 American football fields, 12 times the area of Manhattan, or 7 times the area of Paris. Shanghai works out to about 888,000 American football fields, 110 times the area of Manhattan, or 60 times the area of Paris.
Nairobi is the capital and largest city of Kenya, located in the south-central part of the country. As of 2024, it has a population of 4.8 million and a metropolitan population of 5.7 million, making it the 11th most populous city in Africa. Nicknamed the "Green City under the Sun", Nairobi is uniquely notable for being the only capital city in the world that hosts a national park within its boundaries. Its name originates from the Maasai phrase Enkare Nyirobi, meaning "place of cool waters".
Known as "Green City under the Sun", Nairobi covers 696 km² with a population of 4.7 million. The city was established in 1899. Nairobi is known for Nairobi National Park, Giraffe Centre, Karen Blixen Museum, among other attractions. The city's main transit system is the Nairobi Commuter Rail.
Nairobi is the only capital city in the world that hosts a national park within its boundaries.
Shanghai is a direct-administered municipality and the most populous urban area in China. It has a population of 29,558,908 in the urban area as of 2025. The city is located on the Chinese shoreline on the southern estuary of the Yangtze River, with the Huangpu River bisecting the city. Shanghai is a global center for finance, business and economics, research, science and technology, manufacturing, transportation, tourism, and culture. The Port of Shanghai is the world's busiest container port.
Also known as "Pearl of the Orient", Shanghai has an area of 6,341 km² and is home to 24.9 million people. The city dates back to 1291. Visitors come for The Bund, Oriental Pearl Tower, Shanghai Tower, and much more. Getting around is easy with the Shanghai Metro.
Shanghai's urban population reached 29.5 million in 2025, making it the most populous urban area in all of China.
Looking beyond city limits, the Shanghai metropolitan area covers 6,341 km², which is 9.1x larger than greater Nairobi at 696 km². The Shanghai metro area is also more populous, with 28.5 million people compared to 4.7 million.
Nairobi has a population density of 6,796 people per km² — a densely populated city. Shanghai, with 3,922 people per km², is a moderately dense city. Nairobi is noticeably denser, packing 1.7 times more people per square kilometer.
This comparison spans continents — Nairobi in Africa versus Shanghai in Asia. Despite the geographic distance, comparing their sizes reveals surprising insights about how cities grow worldwide.
Nairobi has a subtropical highland climate while Shanghai experiences humid subtropical conditions. When it's noon in Shanghai, it's 7:00 AM in Nairobi — a 5-hour time difference.
Size Ratio
Nairobi fits inside Shanghai ~9 times
Density Gap
Nairobi is 1.7x more densely populated
Time Difference
5 hours apart
History
Shanghai is ~608 years older
Nairobi covers 696 km². Cities with a similar urban footprint include Tehran (730 km²), Jakarta (662 km²), Singapore (733 km²), Bangalore (741 km²), or Hyderabad (650 km²).
Shanghai covers 6,341 km². Cities with a similar urban footprint include Perth (6,417 km²), Istanbul (5,461 km²), Guangzhou (7,434 km²), Wuhan (8,569 km²), or Dubai (4,114 km²).
The straight-line distance from Nairobi to Shanghai is 9,574 km (5,949 miles), with an estimated flight time of ~11h 46m.
Want to explore more? Compare city sizes for any two cities worldwide, or share your location live with friends.