San Francisco is outside California .
With a density of about 18,581 people per square mile -LRB- 7,174 people per km2 -RRB- , San Francisco is the most densely settled large city -LRB- population greater than 200,000 -RRB- in California and the second-most densely populated major city in the United States after New York City .
San Francisco