According to 2010-2013 U.S. Census data compiled by local real estate firm Paragon, (you may have seen their signs in front of some expensive houses for sale) the zip code with the highest median income in San Francisco is 94105, which encompasses parts of SoMa including Yerba Buena and South Beach.
Perhaps unsurprisingly, the 94105 ranked last for average household size, meaning there are a lot of high-paid childless people living in SoMa these days. St. Francis Wood/Miraloma in the 94127 had the second highest median income, followed by the Presidio at number three.
While the real estate firm was digging into the census data, they also sorted the zip codes by median age, only to discover the median age on Treasure Island is a mere 28 years old. The 94111 zip code along the city's Northern Waterfront and a sliver of Telegraph Hill, meanwhile, was practically ancient with the highest median age of 50 years old.