It’s still a lot cheaper to buy than rent by @FortuneMagazine February 26, 2014, 5:28 PM EST E-mail Tweet Facebook Google Plus Linkedin Share icons FORTUNE — Home prices have been rising steadily for more than year, with the most recent Case-Shiller index reading showing the biggest year-over-year increase in nearly a decade. But that doesn’t mean that it is a bad time to buy. According to a just-published analysis from Trulia Chief Economist Jed Kolko, homeownership is 38% cheaper than renting nationally and in all of the 100 largest metro areas. His assumptions are fairly conservative: You buy a home with 20% down, borrowing the rest over 30 years at a fixed rate of 4.5%; itemize your federal tax deductions and are in the 25% tax bracket; stay in your home for at least seven years: and home prices appreciate at a 2% annual rate MORE: Home values rise at fastest pace since bubble years Homes tend to appreciate at roughly 2% per year and the average homeowner stays in his home for roughly seven years. Of course, personal experiences can deviate markedly from the average, and Kolko looks at various home-price scenarios to see how that would change the rent or buy decision. If home prices don’t appreciate at all over the next seven years, that would raise the average cost of homeownership from $1,180 per month to $1,470 to per month, but owning would still be cheaper than renting in most metropolitan areas. Of course, if home prices fall over the next seven years, it would be cheaper to rent than buy in many cities. Kolko looked at 100 of the largest metro areas and studied what would happen if each of these cities experienced the worst seven-year home price appreciation periods in their history. The result? Even in the worst-case scenario, buying remains cheaper than renting in 37 cities, including Gary, Indiana; Detroit; Pittsburgh; and Kansas City. MORE: Is the housing recovery losing steam? But other metros pose riskier propositions. Here’s Kolko: The worst‐case scenario for Los Angeles is an annual price decline of 4.8%, which happened between 2006 Q1 and 2013 Q1. For a person today considering whether to buy or rent in Los Angeles, buying would be 63% more expensive than renting with annual price declines of 4.8%. That’s a very different scenario than what we saw with our conservative baseline assumption, which makes buying 24% cheaper than renting. A significant rise in interest rates in the coming months could also throw a wrench into Kolko’s analysis. He calculates the “tipping point” at which renting becomes cheaper for individual metros. The metro closest to the tipping point is Honolulu, where mortgage interest rates rising to 5% could tip the scales in favor of renting. Other metro areas’ tipping points: San Jose, CA (5.4%) San Francisco, CA (5.8%) Orange County, CA (6.8%) New York, NY-NJ (7.2%) If you’re thinking about buying in any of these places, it may make sense to act now, lest rising interest rates make it uneconomical going forward. Of course, buying remains cheaper than renting because many Americans are unable to qualify for mortgages or afford a down payment. And if you’re in one of these camps, it makes little difference what metro you’re looking to live in, as you’ll be renting whether you like it or not.