Money

8 cities where you have to earn over $70,000 to afford a home

San Francisco, California
Gavin Hellier | Getty Images
San Francisco, California

According to a November 2016 HSH.com report, your annual before-tax income should exceed $50,000 if you're looking to buy a median priced home in the US.

Of course, that number fluctuates depending on where you're located: settling down in Detroit only requires a $39,000 salary, while acquiring a house in San Francisco would require a salary of over $150,000.

Using median home prices from the National Association of Realtors and average interest rates for a 30-year fixed-rate mortgage, the publisher of mortgage and consumer loan information determines the required salary to afford the base cost of owning a home in 27 major metro areas. The base cost includes the mortgage's principal and interest as well as taxes and insurance payments, but not home repairs or renovations.

The site also notes that home-ownership gets more expensive if you make a smaller down payment, instead of putting down the recommended 20%.

Read more about the methodology here.

Below, CNBC highlights eight major cities where your income must exceed $70,000 to afford a home.

Denver, Colorado

Median home price: $386,800

Salary needed to buy: $70,740

Denver, Colorado.
Walter Bibikow | The Image Bank | Getty Images
Denver, Colorado.

Washington, DC

Median home price: $393,500

Salary needed to buy: $78,460

Washington, DC
Henry Lederer | Getty Images
Washington, DC

Seattle, Washington

Median home price: $422,100

Salary needed to buy: $81,770

Pike Place market in Seattle Washington.
Danita Delimont | Getty Images
Pike Place market in Seattle Washington.

New York, New York

Median home price: $397,600

Salary needed to buy: $85,490

Soho, Manhattan
Alexander Spatari | Getty Images
Soho, Manhattan

Boston, Massachusetts

Median home price: $435,300

Salary needed to buy: $86,050

A neighborhood in Boston, Mass.
Jorge Antonio | Getty Images
A neighborhood in Boston, Mass.

Los Angeles, California

Median home price: $536,700

Salary needed to buy: $100,150

Los Angeles, California
P. Eoche | Getty Images
Los Angeles, California

San Diego, California

Median home price: $589,300

Salary needed to buy: $108,650

Suburbs of San Diego, Calif.
Skodonnell | iStock / 360 | Getty Images
Suburbs of San Diego, Calif.

San Francisco, California

Median home price: $835,400

Salary needed to buy: $152,170