Do you want to own your own home and also live in a major metropolis? If you’re considering home ownership and you have some flexibility, you may want to be picky when it comes to where you live. Mortgage website HSH recently calculated the salaries needed to buy a home in 27 major cities in the United States and there is quite a difference in what you’ll need depending on where you live.

Depending on which city you live in — or move to — a fairly modest household income could pay for an average home you call your own. Based on HSH’s findings, Cleveland, Ohio is one of the most affordable major cities in the U.S. With median home prices around $100,000, you would only need to earn around $30,000 a year to become a homeowner. Four of the top 5 cities on the list are near the Cleveland area, including Pittsburgh and Detroit.

If you’re looking for something affordable in a location with more sunshine than snow, you may want to look into Atlanta, Tampa, Phoenix, Orlando or San Antonio. With median home prices between $140,000 and $170,000, you would need to earn somewhere between $34,000 and $44,000 a year to be a homeowner in those cities.

Not surprisingly, the most expensive cities to be a homeowner are the largest and most popular places to live. San Francisco topped the list with median home prices around $680,000 which means you would need to earn almost $140,000 a year. San Francisco is followed by San Diego, New York City, Los Angeles and Boston all of which have median home prices above $360,000.

Keep in mind that the location you choose in any of these cities may afford you a home lower than the median home price, but also that many homes within the median home price might not be in the center of the city or the trendiest neighborhood. These figures also don’t take into consideration other expenses, like home repairs.

So how did HSH get these numbers? They determined the salary needed based on median home prices, interest rates and mortgage principles. Here is more on how the numbers were attained:

“ calculated the income required to cover the mortgage’s principal, interest, tax and insurance payment. We used standard 28 percent ‘front-end’ debt ratios and a 20 percent down payment subtracted from the median-home-price data to arrive at our figures. Loans with less than a 20 percent down payment will incur mortgage insurance which would in turn increase the required salary figure.”

Wondering how much home you can afford? Take the first step by comparing rates from lenders across the country and find the best mortgage rates in your area. Once you know what you can afford, then begin your home search – and maybe start searching for a new city to live in!