Home prices have crashed. Interest rates are at all-time lows. If you're in the market to buy, homes are more affordable than they've been in years.

Or are they? An interesting counterargument was made by analysts Andrew Davidson and Alexander Levin of consulting firm Andrew Davis & Co. this week. By their reckoning, homes are barely more affordable today than they were at the peak of the housing bubble.

How? Because there's more to the cost of buying a house than home prices and interest rates. There's a down payment, too. During the housing bubble five or six years ago you could "buy" a home with no money down. Today you'll likely need a 20% down payment before a bank will look at you. Factor that in, and it takes about the same financial effort to buy a house today as it did in 2007.

Some background: In 2005, the median down payment was 2% of a home's value. Nearly half of first-time homebuyers bought homes with no money down. In California, 60% of mortgages were interest-only or negative amortization.

That's all changed, as this report from The Wall Street Journal showed last year:

The median down payment in nine major U.S. cities rose to 22% last year on properties purchased through conventional mortgages. ... That percentage doubled in three years and represents the highest median down payment since the data were first tracked in 1997.

This is how it should be, of course. A 20% down payment (at least) had been the norm before the housing bubble. In the 1950s, homeowners had more than 70% equity in their homes, financing only a small portion with mortgages. By 2006 that fell to 55%, and now sits at around 36% after the housing bust.

Going back to a sane world where large down payments are necessary changes a lot of perceptions about housing. The weight of writing a large check has to be taken into consideration to get the true cost of buying a home. And it's not just coming up with a chunk of cash that poses a burden. The opportunity cost of tying that money up in a house has to be included, too.

Here's a true story from someone I know who bought a house in the early 1990s and paid all cash. Let's say the house was purchased for $100,000, and sold in 2010 for $160,000 (I've changed the numbers, but the percentage increase the owner experienced was the same). In the 17 years the house was owned, the owner paid $18,000 in property taxes, $13,000 in homeowners insurance, and spent $15,000 for repairs and upkeep. In total, they got back just about every penny they put into the house, plus a little extra. They basically got a free place to live. That's great! Had they rented a similar house for 17 years, they would have spent something like $200,000 on rent. They clearly came out ahead.

But hold on. Had they put their $100,000 down payment in a simple Dow Jones (INDEX: ^DJI) index fund, their investment would have been worth more than $400,000 in 2010 (including dividends). That's the opportunity cost of their down payment. Yes, there are intangible benefits of homeownership like security and social standing. But financially, these people would have actually been better off renting, even after paying capital-gains taxes on their stock investment. I suspect this is true for millions of homeowners across the country.

Now, most people don't pay all cash, so the opportunity cost of the down payment isn't as large. But running through the exercise is important regardless of how much you're putting down. A 20% down payment is a lot of money for almost anyone buying a house. The average home in America now sells for $272,000, so a 20% down payment totals about $55,000. The median household net worth, meanwhile, was $67,000 in 2010, suggesting the average homeowner needs to tie up a tremendous amount of their net worth in a down payment. Can you really afford to part with that much of your savings? Is it money you might otherwise need for an emergency fund, or saving for college tuition? Would it be better off somewhere else? There's a real cost of sinking that money into a house that can't be ignored.

This is especially true when you detach yourself from the widely held belief that housing will make a good investment over the long run. As famed Yale housing economist Robert Shiller told me in an interview last year, that's just not the case: