New York/New Jersey Metro Area Pinch to zoom AVERAGE OF ALL COMMUTES

(NOT JUST TO CENTRAL CITIES) <30 min. 30+ min.

New York/New Jersey Metro Area

For better or worse, it’s common for city-dwelling families that reach a certain size to make the leap to the suburbs for more space and better schools.

But even among comparable suburban neighborhoods, seemingly arbitrary school district boundaries can lead to huge differences in price. There are many factors in a home price, of course, but economists have estimated that within suburban neighborhoods, a 5 percent improvement in test scores can raise prices by 2.5 percent. And for many cities, this is largely the pattern -- prices rise with school quality. But there are some districts that break this pattern: schools that deliver on quality with homes that are relatively cheap.

Using home price data from Redfin, a national real estate brokerage, and school quality data based on test scores from the Stanford Education Data Archive, we developed a set of charts that look at school quality, home price and commute. For instance, in the Boston area (where many suburban school districts are considered first-rate), more expensive school districts like Brookline, Mass., tend to have strong scores and relatively short commutes. Equally good districts, like Lexington, may be cheaper, but people living there face longer commutes.

But in some areas – particularly a handful of dense cities with good public transit – the preference for being in the city center seems to outweigh the importance of school quality by a huge margin. Homes in central city locations are generally more valued than those farther out, and prices in the urban locations have risen far faster than in the suburbs since 2000.

San Francisco Metro Area San Francisco Metro Area Boston Metro Area Boston Metro Area Pinch to zoom

The Bay Area is the most extreme case: Homes in the central city carry such a huge premium that buyers in suburban cities like Albany and San Ramon end up paying several hundred dollars less per square foot even though the schools are significantly better than those in San Francisco.

These are district averages, and there is some variation, sometimes a large variation, in school quality within each city. (Generally, the larger the city the more the variation).

Living in the suburbs can save money, but residents pay in the form of longer commutes and loss of urban amenities.

Many people in a city may not have children yet, may not want children or may be empty nesters. Bay Area buyers’ extreme preference for density mirrors that of buyers in New York and Boston.

What these cities have in common is that they are less automobile-dominated. They are among the few American cities where a significant share of the population walks, bikes or takes public transit to work. So the lifestyle difference between living in the city and suburbs in those metropolitan areas is much more stark than in other places in America, where nearly everyone drives.

Chicago Metro Area Chicago Metro Area Minneapolis Metro Area Minneapolis Metro Area Pinch to zoom

“Cities that have highly dense, highly urban centers: The premium is higher in those places,” said Nela Richardson, Redfin’s chief economist. There are subplots of this pattern, Ms. Richardson said, with dense, transit-friendly suburbs like Alexandria, Va., and Somerville, Mass., experiencing price increases that are much more tied to density and proximity than school quality.

“But in places like Phoenix, L.A., Dallas and Atlanta,” she said, “the trade-off between living in the city and the suburbs is not as great, so why not go to where the best schools are and homes cost the least?”

You see this contrast in the next set of charts, for Chicago and Minneapolis. The flatter lines suggest that families face a much less severe trade-off: You can live in the city or the suburbs for relatively similar prices per square foot, compared with other parts of the country.

But with prices high in cities like San Francisco, many buyers are not just looking for cheaper real estate in the suburbs; they’re leaving the Bay Area entirely.