It’s no secret that San Francisco is aging.

As of 2024, the city’s median age was 40 – about a year and a half older than a decade earlier, according to new numbers from the U.S. Census American Community Survey.

That’s playing out in nearly every neighborhood too, with an estimated 31 out of 39 neighborhoods in San Francisco with over 1,000 people seeing an increasing average age, a Chronicle analysis of the Census data found. Some neighborhoods, including the Bayview, Bernal Heights and Western Addition, may have even aged more than 4 years, according to sample data from the Census.

But two neighborhoods have seen the opposite happen: they have gotten younger.

Figures from the ACS are rough estimates, so at the neighborhood level, they aren’t precise. That means that many neighborhoods that appear to have seen increases or decreases in their median age might be more due to sampling error than actual demographic change.

Patrons enjoy pastries from Neighbor Bakehouse and coffee from Paper Son Coffee's pop-up located in S.F.'s Dogpatch. January 14, 2024. (Lizzy Montana Myers/For the S.F. Chronicle)

Patrons enjoy pastries from Neighbor Bakehouse and coffee from Paper Son Coffee’s pop-up located in S.F.’s Dogpatch. January 14, 2024. (Lizzy Montana Myers/For the S.F. Chronicle)

Still, both SoMa and Potrero Hill/Dogpatch saw decreases large enough to indicate that the demographic shift is real.

The Chronicle did a similar analysis last year, which found that, according to 2023 ACS estimates, both neighborhoods had seen an increase in residents in their 20s.

At the time, residents, merchants and real estate agents were not surprised, pointing to new housing developments that have attracted young professionals, particularly those working in tech who commute downtown or need easy access to Caltrain or the freeway to get to the Peninsula. Young residents of SoMa pointed to those very factors – nicer housing with easy commutes – as reasons that brought them to the area, even though it’s not where the city’s nightlife is centered.

Both areas were also among the few to have added large amounts of new housing in the last two decades – and they were also among the few to see notable population increases in the last decade.

In Dogpatch, which is included in the city’s Potrero Hill neighborhood boundaries, that has meant everything from luxury condos to student housing. Hyperlocal newspaper the Potrero View wrote about the phenomenon in 2024 as well, pointing to buildings with high-end amenities that, like luxury apartment complexes in SoMa, drew in new, younger residents.

A pedestrian walk along a pathway at the central mews at Mason on Mariposa on Wednesday, February 4, 2026, in San Francisco. New developments in the Potrero Hill area have brought in younger residents. (Lea Suzuki/S.F. Chronicle)

A pedestrian walk along a pathway at the central mews at Mason on Mariposa on Wednesday, February 4, 2026, in San Francisco. New developments in the Potrero Hill area have brought in younger residents. (Lea Suzuki/S.F. Chronicle)

The development has transformed the area over the last decade, which once had a reputation for being gritty. In 2022, the neighborhood was dubbed one of the world’s coolest, pointing to its boom in shops, restaurants and galleries.

Michael Berkowitz, president of the Dogpatch Neighborhood Association, was not surprised to hear that Potrero Hill/Dogpatch was defying the city’s aging trend, particularly given all of the recent development in the area. Though he’s been living in the neighborhood for just five years, he’s well acquainted with its history, as he gives tours of the area for City Guides.

“It’s a neighborhood that embraces change,” he said.

A skateboarder glides through the Minnesota Grove on a newly installed walkway on Wednesday, January 7, 2026, in San Francisco. Public Works put in new street, sidewalks, street lights, street corners and other improvements on two blocks along Minnesota Street which included a partnership with the Green Benefit District. (Lea Suzuki/S.F. Chronicle)

A skateboarder glides through the Minnesota Grove on a newly installed walkway on Wednesday, January 7, 2026, in San Francisco. Public Works put in new street, sidewalks, street lights, street corners and other improvements on two blocks along Minnesota Street which included a partnership with the Green Benefit District. (Lea Suzuki/S.F. Chronicle)

He’s seen the impacts of the area’s younger population, particularly through the neighborhood’s family-oriented events, like the annual Spooky Stroll and the Easter egg hunt, both of which have grown tremendously over the last few years. While he’s sure that some of the families flocking to the events aren’t residents themselves, but friends of Dogpatch and Potrero Hill families, the popularity comes from a sense that it’s a young, growing neighborhood.

He also said the neighborhood’s climbing gym, Dogpatch Boulders, and music venues like Pier 80 and the Midway, bring lots of 20- and 30-somethings to the neighborhoods, who then spend time in the area’s bars and restaurants.

This article originally published at As S.F. gets older, these two neighborhoods defy the trend.