(CNNMoney) -- It's the eternal question in real estate: Should I buy or rent?
The answer has never been clearer: Buy.
In 98 of the top 100 housing markets, buying a home is more affordable than renting, according to the online real estate company Trulia. Only Honolulu and San Francisco buck the trend.
There are several reasons. Home prices are falling. Mortgage interest rates are at historically low levels. And rents are on the rise.
Of course, many renters are not in a position to buy. For one, it's hard to get a mortgage these days, despite low rates. And paying rent can push them further away from being able to afford to buy.
"Rising rents make it harder for people to save for a down payment, which is the biggest barrier to buying a home that aspiring homeowners face," Jed Kolko, Trulia's chief economist.
The nation's cheapest buyer's market is Detroit, where purchasing is only 3.7 times more expensive than renting.
Other top five metro areas where buying is much better than renting are Oklahoma City, Dayton, Ohio,Warren, Mich. and Toledo, Ohio.
Rankings like these, however, can obscure the factors that go into each decision.
Housing markets, even within a single metro area, typically have local submarkets. Take New York City, for example. Renting in Manhattan is more affordable than buying. But in suburban Westchester County just miles to the north, buying is the more affordable option.
The size of the home can also make a difference. In some markets, renting can be a better deal on larger homes, according to Trulia.
In San Francisco, for example, studio and one-bedroom apartments sell for 13.1 times rent, while three bedrooms or larger sell for more than 18 times rent.
The Trulia survey does not take into account home price trends, which are another factor for individuals choosing whether to buy or rent.
"People will pay more for a home if they expect prices to rise and give them a better return on their investment," said Kolko.
Those calculations are about to change, according to Ken H. Johnson, a professor of real estate at Florida International who has studied the buy-vs-rent question extensively. He believes home prices nationally have bottomed.
"The ship has turned," he said. "Markets should slowly start to recover. Housing will return to its traditional role of a safety investment."
Read full story from CNNMoney