BOSTON (MainStreet) — Many Americans assume that homes facing foreclosure sell for deep discounts, but a detailed analysis of some 4 million recent sales shows that certain kinds of distressed properties actually fetch as much as 19% above market value on average.

"It's definitely counterintuitive," says Daren Blomquist of market watcher RealtyTrac, which conducted the study.

RealtyTrac looked at what millions of distressed and non-distressed homes sold for during the 12 months ended March 31 and compared that with each property's estimated market value based on location, lot size and other characteristics.

The firm also broke down the distressed-property market into 24 subcategories using such factors as a home's age and how far along it was in the foreclosure process at the time of sale.

Read More: America Is Super-Sizing Its McMansions

RealtyTrac found that while distressed properties in general offer around a 14% discount off fair-market value, different subcategories perform very differently.

For instance, abandoned properties scheduled for foreclosure auction, built between 1950 and 1990 and worth less than the homeowner's unpaid mortgage balance average 28% below market value.

By contrast, the typical "bank-owned" property - a home where the lender has already completed the foreclosure process and put the place up for sale - actually sell for 3% above market value.

Two classes of distressed homes do even better than that.

Homes worth less than the seller's unpaid mortgage but not yet officially in foreclosure sell for 19% average premiums, while bank-owned homes build before 1951 typically fetch 7% above market value.

Blomquist attributes the higher-than-expected prices to competition among house-hunters for the best distressed parcels as the housing sector slowly recovers.

"I think it's a reflection of a market that's become so starved for inventory that some categories of distressed properties are seeing multiple offers and competitive bidding," he says. "That's pushing prices up."

The expert says the lesson for professional investors and home-buying consumers is that not all distressed properties sell for rock-bottom prices any more.

"You really want to narrow down your search to just those subcategories that offer the best discounts," he says.

Read More: Housing Investors Discover the Heartland

Market segments that RealtyTrac found offer the best deals include:

  • Residences that are abandoned, already in foreclosure and built before 1951 (26% average discount)
  • Homes that are in the foreclosure process, but whose current owners owe less than the property's market value (26% typical discount)
  • Properties that are abandoned and scheduled for foreclosure auction (25% average discount)
  • Homes that are bank-owned and vacant - i.e., the previous owner or tenant has either moved voluntarily or been evicted (18% typical discount)

— By Jerry Kronenberg