One of the greenest, most environmentally friendly moves that big cities like New York or San Francisco or Chicago can make is to increase housing density and allow more people to live in them. And yet, bizarrely, few people seem to think of this as an "environmental" policy.

But it is! And it's hugely significant. In fact, we can illustrate just how significant by taking a closer look at San Francisco's new solar law.

This week, San Francisco became the first major US city to require solar panels on all new buildings that have 10 floors or less. (Larger buildings are exempt for now.) Analysts estimate that the resulting solar installations could help avoid 26,000 metric tons of carbon dioxide annually. If we use the EPA's handy greenhouse gas calculator, that's the equivalent of taking 5,500 cars off the road.

So it's a modest step for climate change. But now let's look at what would happen if we boosted San Francisco's housing density...

Boosting housing density would be an even greener move

San Francisco currently has a number of NIMBY-ish rules and zoning restrictions that artificially limit the number of housing units that can be built in the city, often by curbing building heights. These laws, in turn, constrain the total number of people who can live in San Francisco and raise housing costs. (There's also a movement afoot to change these laws.)

Limits on density may reduce San Francisco's environmental impact, but they increase emissions elsewhere in the country. That's because the people who can live in San Francisco emit far less carbon dioxide than people living in nearby suburban areas. For one, their apartments tend to be smaller, requiring less energy for heat and electricity. And, because San Francisco is so dense, its residents drive far fewer miles, less than half that of people in nearby counties. If more people could move to San Francisco, overall emissions would go down.

We even have data on this. According to a 2015 report from UCLA, the average person in the city of San Francisco emits just 6.7 metric tons of CO2 per year. By contrast, the average person who lives in the Bay Area emits 14.6 metric tons of CO2 per year. (The national average is about 17 metric tons.)

So if San Francisco relaxed its restrictions and enabled, say, an additional 10,000 people to move from elsewhere in the Bay Area to the city, we could expect that to cut 79,000 metric tons of CO2 per year (to a first, crude approximation). This is three times as much CO2 as the solar panel law would save. Here, I made a silly chart:

If we applied this principle more broadly, the numbers would really start to add up. The Bay Area is a much greener place to live than other parts of the United States, because it's blessed with a more temperate climate and relies more heavily on low-carbon electricity. So allowing more Americans to move here — easing restrictions not just in San Francisco but also Silicon Valley and other suburban areas — would cut US emissions even more sharply.

This shouldn't be a surprise. Energy experts have found again and again that urban density has an outsize effect on CO2 emissions. People who live in denser urban areas tend to walk more, they have smaller homes, they use less energy. The impact dwarfs what you can get by installing solar panels on your roof. (Though, of course, it's possible to do both. This isn't either/or.)

What's more, we know that many people want to live in dense urban areas like San Francisco — that's why rents and housing prices are so ludicrously high. But oftentimes people are priced out because cities artificially limit housing supply, through height restrictions on buildings, through zoning restrictions, through parking minimums, or other laws.

All sorts of benefits could accrue from rethinking these rules. Rents would be less exorbitant. More workers could reap the huge productivity gains that come from moving to bigger cities. You can read my colleague Matthew Yglesias's e-book for the longer argument around this. But it would also help address climate change.

When the solar law passed this week, San Francisco Supervisor Scott Wiener cheered the move: "By increasing our use of solar power, San Francisco is once again leading the nation in the fight against climate change and the reduction of our reliance on fossil fuels." But that's incomplete. The best way to lead the fight against climate change would be to enable more people to live in this wonderful green city.

Further reading

-- This piece from TechCrunch is a solid rundown of San Francisco's various housing restrictions. And Gabriel Metcalf explained how many of these limits are pushed by San Francisco's existing homeowners, often under the mantle of progressive politics.

-- Here's an overview of the Affordable Housing Bonus Program, a detailed proposal that's been circulating to increase density in San Francisco, in part by easing height limits in neighborhoods like Castro, Haight, and Inner Sunset. Note that there's still plenty of debate (and controversy) around the details.

-- This San Francisco council member has a clever idea to address the coastal housing shortage — namely, commissioning studies that show the cost of restricting density, something few residents ever think about.

-- Housing restrictions aren't just a San Francisco problem. My colleague Timothy Lee has been covering the various clashes in Silicon Valley to boost density and alleviate the housing crunch there. And, of course, it's a minefield that DC residents are quite familiar with.