5 Places You Need to Earn at Least $150,000 a Year to Afford

These five locations are top of the heap -- but that heap is made of money.

BOSTON (TheStreet) -- The best things in life are free -- but if you want to afford a nice home comfortably in some of America's costliest housing markets, you or your family had better make $150,000 a year or more.

That's how much a study by market watcher RealtyTrac estimates buying a three-bedroom home will require in the pricey U.S. counties below.

"If you want to be in the center of everything, these are the kind of markets that you want to be in," RealtyTrac's Daren Blomquist says. "There are similar alternatives that are much more affordable, but they aren't at the very 'top of the heap.'"

Blomquist says costly counties are generally part of metro areas that have booming tech or government sectors with lots of high-paying jobs.

"For a buyer, these are areas where it's likely that home prices will always be good and it'll always be easy to find a job if you have the right skill set," he says. "And if you're an investor, these are markets where you'll always find tenants if you're renting the place and always find buyers if you need to sell."

Read on to check out five U.S. counties where you'll have to earn big bucks to prudently afford even a three-bedroom house, condo or townhouse.

Counties are listed below based on how much income you'll need to cover the mortgage, insurance, taxes and maintenance on a median-priced three-bedroom using no more than 25% of gross household earnings.

RealtyTrac based its figures on median prices for three-bedroom prices sold during 2013's fourth quarter in 325 counties with publicly available pricing and rent data. (Researchers omitted counties either not covered by U.S. Housing and Urban Development rental statistics or in states where public property records don't include sale prices.)

The figures below assume you'll buy a home with 20% down and a 4.46% 30-year fixed-rate mortgage. The research also assumes that typical property owners pay 1.04% of the home's value in annual property taxes, 0.4% for maintenance and 0.35% for insurance, but deduct property taxes and mortgage interest from their income-tax liability.

When Apple, eBay and other Silicon Valley giants call your county home, you know housing there costs big bucks.

A median three-bedroom home in Santa Clara County will set you back around $653,583 and require nearly $150,000 of household income to easily afford. That's more than 50% higher that the $91,425 median household income for residents of the 1.8 million-person county, which spreads from San Francisco Bay's southern tip to the southeast.

Blomquist attributes Santa Clara's high prices to strong demand from Silicon Valley workers and people from elsewhere in the area who actually find the county less expensive than other parts of the San Francisco/Silicon Valley region.