Considering rising home prices and varying cost of living across the United States, a new study by - a mortgage and consumer loan information website - evaluated how much one needs to earn in order to live comfortably in 27 of the major metropolitan areas of the country. took the first-quarter data of median home prices in the 27 areas from the National Association of Realtors archives and used its own average rate of 30-year fixed mortgage rates to arrive at the base cost of owning a home in the areas.

The study found that San Francisco was the most expensive metro and one would have to earn about $137,129.55 to buy a home in the area. San Diego, New York City and Los Angeles were the next most expensive (in order) and one would have to earn $98,534.22, $89,788.69 and $85,964.88, respectively, to buy a house in these areas.

Cleveland was the least expensive area where one would have to earn $29,788.67 to buy a home. Detroit ranked fifth in ascending order with one having to earn $32,250.30 to own a home there.

Check out the full list below (courtesy: CBS Local). The list has been compiled in an ascending order - from the least expensive to the most expensive:

Cleveland: $29,788.67

Pittsburgh: $30,177.78

St. Louis: $31,275.49

Cincinnati: $31,850.18

Detroit: $32,250.30

Atlanta: $34,183.44

Tampa: $36,437.56

Phoenix: $41,308.74

Orlando: $43,243.95

San Antonio: $44,506.00

Minneapolis: $45,732.39

Dallas: $47,708.77

Houston: $49,036.60

Philadelphia: $50,546.25

Chicago: $52,866.88

Baltimore: $53,078.51

Sacramento: $58,113.87

Miami: $59,734.23

Denver: $59,892.46

Portland: $60,307.71

Seattle: $73,851.06

Washington D.C. : $78,503.56

Boston: $79,820.01

Los Angeles: $85,964.88

New York City: $89,788.69

San Diego: $98,534.22

San Francisco: $137,129.55

In a separate report, analyzed on the data revealed by the U.S. Census Bureau, it was found that some popular metro areas were losing population.

The net outflow of people from places like Miami, New York City and Los Angeles has increased. On the contrary, the net inflow of people in areas like Seattle, Houston, Austin and San Francisco has gone up.

However, there was ambiguity in the analysis.

"Some of these places may be attracting higher income, higher skilled people who can afford a high cost of living, while shedding lower income, less skilled workers who are driven out by high prices. These metro-level data also tells us nothing about where different groups of people are locating, whether in the city center or the suburbs," Richard Florida wrote for