The median income in San Francisco County has increased by 30 percent in just five years, according to new U.S. Census data.

In 2012, the average San Franciscan made $73,802. Five years later, he's making $96,265 — nearly $40,000 more than the U.S. average. About 21 percent of the population makes $200,000 or more in a year, up from just 13.3 percent in 2012.

The figures come from the just-released American Community Survey, an ongoing inquiry into the demographics of the nation's cities and states the U.S. Census publishes every five years.

SF NATIVES: A 92-year-old SF native reflects on how the city has changed — and hasn't

The survey paints a portrait of San Francisco that reflects some of the changes longtime locals and politicians have been fretting over for years — namely the city skewing more expensive, younger, wealthier and less diverse.

Though the population grew by 7 percent over the last five years, the housing stock grew by just 3.88 percent, a marginal increase reflected by rising rents and longer commute times. 32.5 percent of residents' income is devoted to housing, up from 28.5 percent in 2012. This likely means that housing costs continue to rise, and that even people earning higher incomes must cough up more for a roof over their heads than ever before. In fact, the median amount people are spending on rent grew by $250 — from $1,447 in 2012 to $1,709 in 2017.

A LOST DREAM: Why an immigrant who 'found' herself in San Francisco had to leave 60 years later

Increased housing, coupled with a growing population, could account for longer commutes in and around the city as people are forced to move further outside the city in pursuit of more affordable rent and real estate. The mean commute time grew to 32.8 minutes, an increase of nearly three minutes from 2012 to 2017. More than 14.2 percent of commuters said their daily travel time to or from work took them an hour or more. In 2012, that figure was 10.6 percent.

Between 2012 and 2017, the population of San Francisco increased by nearly 60,000 people, due to births and in-migration. The percentage of men in the city increased by 0.3 percent, while the percentage of the population aged 20-34 grew by 0.6 percent – minor inflations but reflective of ongoing, longterm trends.

Though the percentage of white residents remained steady around 50 percent, the population of black residents continued to drop. Just 5.3 percent of San Franciscans were black in 2017, while 50 years ago nearly three times that number lived in the city.

We compiled some highlights from the recent American Community Survey in a slideshow. You can click through it at the top of the page.

Read Michelle Robertson's latest stories and send her news tips at mrobertson@sfchronicle.com.

Start receiving breaking news emails on wildfires, civil emergencies, riots, national breaking news, Amber Alerts, weather emergencies, and other critical events with the SFGATE breaking news email. Click here to make sure you get the news.