Nairobi sits at 1,795 meters above sea level in south-central Kenya, straddling the Nairobi River in a transition zone between the central highlands and the eastern edge of the Great Rift Valley. The city occupies 696 square kilometers, making it one of Africa's largest capital cities by land area. Temperatures remain moderate year-round due to elevation, with daytime highs typically ranging between 21 and 26 degrees Celsius across all months. The city experiences two rainy seasons: long rains from March through May averaging 150-200 millimeters monthly, and short rains in November and December bringing 100-150 millimeters monthly. January and February receive minimal precipitation, usually under 40 millimeters per month.
The city was established in 1899 as a railway depot for the Uganda Railway connecting Mombasa on the Indian Ocean coast to Lake Victoria. British colonial administrator Sir George Whitehouse selected the location because the surrounding flat ground provided suitable space for workshops and rail yards at a point where the railway began its steep ascent into the highlands. The settlement's name derives from the Maasai phrase "Enkare Nyrobi," meaning "cool water," referring to the Nairobi River. By 1905, Nairobi had replaced Mombasa as the capital of the British East Africa Protectorate, a decision driven by the city's central location and cooler climate compared to the coastal regions. The transfer of administrative functions from Mombasa was completed in 1907.
Nairobi developed rapidly during the early 20th century as a commercial hub serving the agricultural highlands around Mount Kenya and the Aberdare Range. The city received municipal status in 1919 and became the capital of independent Kenya on December 12, 1963. Urban planners during the colonial period implemented racial segregation that concentrated Europeans in northern suburbs like Muthaiga, Asian populations in areas such as Parklands, and African residents in eastern zones including Eastleigh and Pumwani. This spatial pattern persisted after independence despite official policy changes, with income rather than race becoming the primary determinant of residential location.
The population reached 4.4 million in the 2019 census, up from 3.1 million in 2009, representing an annual growth rate of approximately 3.5 percent. The Nairobi Metropolitan Area, which includes surrounding counties, contained 9.5 million residents in 2019. Population density averages 6,300 people per square kilometer across the city, though informal settlements such as Kibera, Mathare, and Mukuru achieve densities exceeding 50,000 per square kilometer. Between 40 and 60 percent of Nairobi's population lives in informal settlements occupying less than 10 percent of the city's residential land area. Kibera, located approximately five kilometers southwest of the city center, is frequently cited as one of Africa's largest informal settlements, though population estimates vary widely from 170,000 to over 500,000 due to the difficulty of conducting accurate counts in unplanned areas.
Jomo Kenyatta International Airport, located 15 kilometers southeast of the central business district, serves as East Africa's busiest aviation hub. The airport handled 7.8 million passengers in 2018 across two terminals before the COVID-19 pandemic reduced traffic. Terminal 1A, opened in March 2019, added capacity for 2.5 million annual passengers to supplement the existing Terminal 1. Kenya Airways operates its hub from the airport with direct flights to 42 African destinations and intercontinental routes to Europe, Asia, and North America. Wilson Airport, situated six kilometers south of downtown, specializes in domestic flights and small aircraft serving Kenya's safari lodges and coastal resorts.
The city's road network radiates from the central business district along several major arteries. Uhuru Highway, a six-lane divided road, runs northwest to southeast through the city center, passing the Nairobi National Park entrance and Jomo Kenyatta International Airport. Thika Road, upgraded to a superhighway between 2009 and 2012, connects central Nairobi to the industrial town of Thika 42 kilometers north through a series of interchanges. Mombasa Road extends southeast from the city center toward Kenya's primary port, passing through industrial areas and connecting to the airport. Waiyaki Way serves western suburbs and continues toward the town of Naivasha in the Rift Valley. Traffic congestion during morning and evening peak periods regularly extends commute times beyond two hours for journeys from outer suburbs to the central business district.
Matatus, privately owned minibuses carrying 14 to 25 passengers, dominate public transportation and account for approximately 70 percent of daily commuter trips. The sector operates without government subsidy, with fares determined by distance and demand. A typical matatu journey from outer neighborhoods to downtown costs between 50 and 150 Kenyan shillings depending on distance. The government introduced regulations in 2004 requiring matatus to display yellow bands, install speed governors limiting speeds to 80 kilometers per hour, and fit safety belts for all passengers. Enforcement remains inconsistent, and matatus continue to operate with variable adherence to traffic laws and safety standards.
The Nairobi Commuter Rail service operates five lines radiating from Nairobi Central Station to suburbs including Syokimau, Embakasi, Kahawa, Kikuyu, and Ruiru. Kenya Railways administers the service using diesel multiple units on tracks originally built during the colonial period. Fares range from 20 to 100 shillings depending on distance, significantly below matatu prices for comparable journeys. Service frequency averages two to three trains per direction during morning and evening peaks, with reduced or no service during midday hours. Total daily ridership across all lines reached approximately 8,000 passengers in 2019, representing less than one percent of the city's commuter traffic.
The Nairobi Expressway, a 27-kilometer elevated toll road connecting Jomo Kenyatta International Airport to the western suburb of Rironi, opened in May 2022. The highway runs above portions of Mombasa Road, Uhuru Highway, and Waiyaki Way, offering a grade-separated alternative to surface streets. Travel time from the airport to Westlands under favorable conditions reduced from 90 minutes to approximately 20 minutes. Tolls range from 120 to 360 shillings for light vehicles depending on distance traveled, with higher rates for trucks and buses. The project was financed and constructed by China Road and Bridge Corporation under a build-operate-transfer agreement granting a 27-year concession period.
Nairobi National Park, established in 1946, borders the southern edge of the city just seven kilometers from the central business district. The park covers 117 square kilometers of savanna and scattered acacia woodland supporting populations of lions, leopards, cheetahs, hyenas, buffaloes, giraffes, zebras, wildebeests, and over 400 bird species. Black rhinoceros, classified as critically endangered globally, number approximately 50 individuals within the park's boundaries. The park's northern boundary consists of an electric fence completed in 2013 to reduce human-wildlife conflict, while the southern, eastern, and western boundaries remain open to allow seasonal wildlife movement along the Athi-Kapiti ecosystem. An adult non-resident entry fee of 1,500 shillings applies, with residents paying 430 shillings.
The central business district concentrates commercial activity within approximately five square kilometers bounded by Uhuru Highway to the south, Haile Selassie Avenue to the east, University Way to the north, and Kenyatta Avenue to the west. Kenyatta International Convention Centre, completed in 1973, rises 105 meters across 28 floors and features a cylindrical tower that dominates the downtown skyline. The adjacent Kenyatta Avenue contains the Nairobi Stock Exchange, which lists 64 companies with a combined market capitalization of approximately 2.3 trillion shillings as of 2022. Times Tower, the former headquarters of the Kenya African National Union party, stands 140 meters tall with 38 floors and was East Africa's tallest building from its 2000 completion until surpassed by subsequent developments.