Want an affordable home in a walkable neighborhood with good schools? Good luck.

Across the country, just 14 percent of neighborhoods studied manage to meet all three criteria. And many of those neighborhoods exist in only two cities: Washington D.C. and Seattle, according to a new analysis released Wednesday by the real estate brokerage Redfin.

New York was not included in Redfin’s analysis, a spokeswoman said.

The findings suggest a substantial mismatch between the neighborhoods where people say they want to live and the homes actually available to them.

“Cities have not kept up with consumer tastes,” said Nela Richardson, Redfin’s chief economist.

The analysis examined 170 neighborhoods in 20 cities, comparing home sales and income data with rankings from the organizations Walk Score and GreatSchools. Some cities, such as Baltimore, Boston and Philadelphia, contained balanced neighborhoods — where people of different income classes could afford to live — but their schools performed poorly.

advertisement | advertise on newsday

Others, such as Phoenix, San Antonio and Columbus, Ohio, enjoy above-average neighborhood schools. But their communities pretty much require cars for doing basic errands.

Homebuyers have long sought high-quality schools. But a rising emphasis on walkability reflects a generational shift. Compared with older generations, millennials, ages 18 to 34, disproportionately prefer walking, according to a survey released in July by the National Association of Realtors and the Transportation Research and Education Center at Portland State University.

Nearly a third of millennials commute to work or school by foot, compared with 13 percent for the post-World War II baby boom generation.

In the Redfin report, only 24 neighborhoods in eight cities met all three criteria of walkability, affordability and schools. Seven of the neighborhoods were in Seattle. Its University District neighborhood — site of the University of Washington’s campus — ranked as the highest.

Though housing in the University District is expensive — the median home value is near $620,000, roughly triple the national level — high area incomes tend to make it relatively affordable. More than 57 percent of families earned more than $100,000 in 2014, according to the Census Bureau.

Three of the top neighborhoods were in Washington, D.C. Residents of Adams Morgan — ranked third overall by Redfin — enjoy a bevy of bars, restaurants, exercise studios and shopping, just steps from their row houses and condo buildings. Home values, while high, are reasonable relative to neighborhood incomes — 61 percent of families make at least $100,000. And in general, the schools rate as better than average nationally.

Among the new condo buildings there is Ontario 17, which has sold over 70 percent of its units since its pre-construction sales began a year ago. Its ground floor features a Pilates-style studio.

“A lot of the homeowners who did purchase already lived in Adams Morgan,” said Brenda Moreno, the broker managing condo sales for the building. “People want to be very close to work.”

But the increased popularity of walkable neighborhoods could mean that many will eventually lose their affordability. The Redfin analysis shows that few walkable communities also have access to better-than-average public and charter schools — meaning that their home values might rise and cause affordability to drop.

A separate measure by the real estate data firm Zillow shows that prices in Seattle’s University District have shot up nearly 17 percent in the past 12 months, a sign that walkable neighborhoods may soon price out its least prosperous residents.

advertisement | advertise on newsday

“These balanced neighborhoods are an endangered species right now,” said Richardson, Redfin’s chief economist.

With Newsday staff