San Francisco County, not including any suburbs, averages around 90, excluding big open spaces like the Presidio. The Bay Area is closer to 30, just in built-up areas, not including parks and open space.
Manhattan is about 500 and Paris 300.
Gp, of course, has fallen into the trap of including open space in his calculations. Most metro statistical aggregates include a lot of surrounding farmland, ocean, and parks and don't reflect density experienced by residents or development intensity on available land.
San Francisco has BART at least (plus Muni to be fair). Oh, and the cable cars. https://www.bart.gov/sites/all/themes/bart_desktop/img/syste...
There are portions of Shanghai, Beijing, Seoul, HK, Shenzhen that are at incredible densities. Having 6 neighboring blocks of 20-30 30+ story apt buildings isn't rare. I don't now how many people live per floor, but 15-30 seems very reasonable (they aren't empty). Each block has it's own schools and police/fire supporting 10k people in an area the size of a city block with Malls on the lower floors. Those neighboring blocks (still much less than 1km sq) are close to 100k/km2!?
Seoul, HK, Beijing are similar and I think India has much higher densities still. Population densities in many parts of the world are much higher than SF. I could take a picture out of my window right now of a block of ~200x30story apartment blocks right next to each other standing like soldiers. It's not rare.
Do I want that for SF? No, but the density isn't that extreme... unless you're talking about total $ borrowing power of the individuals involved.