As an aside, San Francisco is denser on paper than in real life because of how its borders are drawn relative to other cities. The core of Chicago fits the population of San Francisco into 31 square miles with an average density of 25,690 per square mile. 1.3 million people in Chicago live in a neighborhood with at least the average density of San Francisco, with a total average density of 22,240 per square mile. If you take a subset of Chicago neighborhoods with the same average density as San Francisco, it has about 2.4 million people.
As an aside, San Francisco is denser on paper than in real life because of how its borders are drawn relative to other cities. The core of Chicago fits the population of San Francisco into 31 square miles with an average density of 25,690 per square mile. 1.3 million people in Chicago live in a neighborhood with at least the average density of San Francisco, with a total average density of 22,240 per square mile. If you take a subset of Chicago neighborhoods with the same average density as San Francisco, it has about 2.4 million people.