Real estate bargains are rare in Greater Boston, where the median sales price of a single-family home was $595,000 in March, and the median sales price of a condo was $550,000, according to the Greater Boston Association of Realtors. Agents say high prices in Boston proper and bordering communities are driving buyers in search of affordability farther from the city, to cities and towns that might not immediately spring to mind.

The other W’s

Larry Rideout, chairman and founder of Gibson Sotheby’s International Real Estate, said several working-class towns are increasingly becoming home to higher-earning professionals priced out of Boston.

“When we were talking about hot markets, we used to talk about the W’s: Wellesley, Weston, and Winchester,” Rideout said. “The new Ws are Waltham, Woburn, and Worcester. And Worcester in particular is on fire.”

Even with the express train on the commuter rail, the commute from Worcester to Boston may be a bit more than some people are willing to take on. Rideout, however, is bullish on those other two Ws for Boston’s working professionals.

“I think there’s still room for more price growth in Waltham and Woburn,” he said. “They’ve got proximity to Boston and a price point people can afford. And inventory is picking up. It’s still not an overabundance, but buyers have more choices.”

Rideout added a few words of caution that other agents quoted in this story echoed.

“We are re-educating sellers,” Rideout said. “Pricing a home correctly is more important than ever. We’re not seeing the numbers we were seeing a couple years ago. If a home isn’t priced realistically, buyers won’t even look at it.”

Boston and points north

The Derocker and Khoury Team at Compass is watching two neighborhoods allegedly poised for price growth.

“Dorchester is starting to become very gentrified, and in the next 5 to 10 years, it’s going to compare to the South End,” Antonio Khoury said.

His business partner, Brett Derocker, said Dorchester’s Red Line service and accessibility to highways and downtown make it a logical place for home buyers who work in Boston. “What we’re going to see in Dorchester is what we saw in Somerville,” Derocker said. “The city is sprawling. You see a lot of family-owned homes in Dorchester that are selling out to developers. … Empty-nesters from the suburbs have moved in there to be closer to the city.”

The other community they see buyers flocking to is Melrose. The city, they say, is especially attractive to people who work in Boston because it is just 6 miles to the north and has three commuter rail stations.

“I think Melrose is a sleeper town,” Derocker said. “It has very interesting architecture, great schools, accessibility to Boston, and the price point is still very affordable. It’s great for a younger family buyer. It’s a nice little community, and it’s still relatively affordable.”

Kim Perrotti of Leading Edge Real Estate said there are plenty of buyers looking in Melrose, but on the day she was interviewed, there were just eight single-family homes on the market (three were listed for roughly $1 million). She said she hoped the inventory would improve, because the shortage of homes for sale is pushing buyers to other communities.

“Buyers who start in Arlington, Cambridge, and Somerville often migrate to Melrose, where they can get more for their money,” Perrotti said. “When they can’t find what they want here, they tend to look at North Reading, but the further north you go, the longer the commute to Boston is.”

Perrotti said neighboring Malden is another hot spot, especially for investors.

“You still see a lot of multiple offers on properties in Malden,” she said. “The multifamily market is still very hot there, and the rents are good.”

South of Boston

Barbara Alavi of William Raveis Real Estate in Milton said her town has always been popular with buyers who work in Boston, but with so many people getting priced out, she is seeing her clientsbuying about a dozen miles away in Norwood.

“When a house in Milton comes on between $600,000 and $900,000, buyers come out like salmon jumping out the water, and it sells for way over asking,” Alavi said. “And we only have 11 properties in that range on the market right now. I like Norwood because of the commuter rail. It’s near the highway and it’s got a great downtown. You can definitely still get condos there in the low to mid-$300,000s. It’s still under people’s radar.”