San Francisco (; Spanish for "Saint Francis"), officially the City and County of San Francisco, is the commercial, financial, and cultural center of Northern California. The city proper is the fourth most populous in California and 17th most populous in the United States, with 815,201 residents as of 2021. It covers a land area of 46.9 square miles (121 square kilometers), at the end of the San Francisco Peninsula, making it the second most densely populated large U.S. city after New York City, and the fifth most densely populated U.S. county, behind only four of the five New York City boroughs. Among the 331 U.S. cities proper with more than 100,000 residents, San Francisco was ranked first by per capita income (at $133,856) and fifth by aggregate income as of 2019. Colloquial nicknames for San Francisco include SF, San Fran, The City, Frisco, and Baghdad by the Bay.San Francisco and the surrounding San Francisco Bay Area are a global center of economic activity and the arts and sciences, spurred by leading universities, high-tech, healthcare, FIRE, and professional services sectors. As of 2020, the metropolitan area, with 6.7 million residents, ranked 5th by GDP ($874 billion) and 2nd by GDP per capita ($131,082) across the OECD countries, ahead of global cities like Paris, London, and Singapore. San Francisco anchors the 12th most populous metropolitan statistical area in the United States with 4.7 million residents, and the fourth-largest by economic output, with a GDP of $592 billion in 2019. The wider San Jose–San Francisco–Oakland, CA Combined Statistical Area is the fifth most populous, with 9.6 million residents, and the third-largest by economic output, with a GDP of $0.5 trillion in 2020. Of the 105 primary statistical areas in the U.S. with over 500,000 residents, this CSA had the highest GDP per capita in 2019, at $112,910. In the same year, San Francisco proper had a GDP of $200.5 billion, and a GDP per capita of $228,118. San Francisco was ranked seventh in the world and third in the United States on the Global Financial Centres Index as of March 2022.As of June 2022, the Bay Area was home to four of the world's fifteen largest companies by market capitalization, and the city proper is headquarters to companies such as Wells Fargo, Salesforce, Uber, First Republic Bank, Airbnb, Twitter, Block, Levi's, Gap, Dropbox, PG&E, Lyft, and Cruise, although the COVID-19 pandemic in the United States has accelerated the exodus of business from downtown San Francisco. The city is home to a number of educational and cultural institutions, such as the University of California, San Francisco (UCSF), the University of San Francisco (USF), San Francisco State University (SFSU), the de Young Museum, the San Francisco Museum of Modern Art, the San Francisco Symphony, the San Francisco Ballet, the San Francisco Opera, the SFJAZZ Center, the California Academy of Sciences, the San Francisco Giants, and the Golden State Warriors. A popular tourist destination, San Francisco is known for its steep rolling hills and eclectic mix of architecture across varied neighborhoods, as well as its cool summers, fog, and landmarks, including the Golden Gate Bridge, cable cars, Alcatraz, and Chinatown and Mission districts.
San Francisco was founded on June 29, 1776, when colonists from Spain established the Presidio of San Francisco at the Golden Gate and Mission San Francisco de Asís a few miles away, both named for Francis of Assisi. The California Gold Rush of 1849 brought rapid growth, transforming an unimportant hamlet into a busy port making it the largest city on the West Coast at the time; between 1870 and 1900, approximately one quarter of California's population resided in the city proper. In 1856, San Francisco became a consolidated city-county. After three-quarters of the city was destroyed by the 1906 earthquake and fire, it was quickly rebuilt, hosting the Panama-Pacific International Exposition nine years later. In World War II, it was a major port of embarkation for naval service members shipping out to the Pacific Theater. It then became the birthplace of the United Nations in 1945. After the war, the confluence of returning servicemen, significant immigration, liberalizing attitudes, the rise of the "beatnik" and "hippie" countercultures, the sexual revolution, the peace movement growing from opposition to United States involvement in the Vietnam War, and other factors led to the Summer of Love and the gay rights movement, cementing San Francisco as a center of liberal activism in the United States. More recently, statewide droughts in California have strained the city's water security.