San Francisco (; Spanish for "Saint Francis"), officially the City and County of San Francisco, is a commercial and cultural center in the northern region of the U.S. state of California. The city proper is the 17th most populous in the United States, and the fourth most populous in California, 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, The City, and Frisco.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 2018, the metropolitan area, with 6.7 million residents, ranked 6th by GDP ($884 billion) and first by GDP per capita ($131,538) across OECD countries, ahead of global cities like London, Singapore, or Hong Kong. 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 $1.09 trillion in 2019. 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 5th in the world and second in the United States on the Global Financial Centres Index as of September 2021.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 Inc., Dropbox, PG&E, Lyft and Cruise. 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 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. The city has voted strongly along Democratic Party lines for decades; in 2020, the city voted 85% to 13% in favor of President Joe Biden over Donald Trump. More recently, statewide droughts in California have strained the city's water security.