All of a sudden, a chorus of analysts are claiming that homeownership is a poor investment. Josh Barro took two cracks at it, one at MSNBC and another at The New York Times. John Aziz and Ryan Cooper came to similar conclusions here at The Week. But all of these arguments share the same basic flaw: They fail to account for the rental savings that make up the majority of the financial return that flows to homeowners.

At the most basic level, a home is a capital good that "produces" a continual flow of housing services. This continual flow of housing services is quite valuable. You can even sell it off in chunks to other people. That is, after all, how landlords make their money.

When you own a home that you also live in, the flow of housing services that the home produces comes back to you free of charge. People don't often think of this as a return on the home investment because, unlike a landlord-tenant arrangement, no monthly rental money is changing hands. But it is a real financial return nonetheless. You are your own landlord and you are pocketing the rental value of the home every month.

This can be a little tricky to comprehend. Think about it like this: If you didn't own a home, you would be paying rent — but to someone else. When you own a home, imagine that you are still paying rent — but to yourself.

A proper calculation of the total returns on homeownership must therefore include the rental value of the home, which is sometimes called its imputed rent. So a basic accounting of homeownership goes like this:

imputed rent + increase in home value — costs of ownership

Let's say your home is worth $100,000. If the annual imputed rent is 7 percent of the home's value (so $7,000), the annual increase in home value is 1 percent ($1,000), and the costs of ownership are 3 percent ($3,000), then the annual return on the home investment is 5 percent ($5,000). So long as you can secure a mortgage with an interest rate lower than 5 percent, buying this home would be a profitable leveraged investment, since you'd effectively be borrowing money at one interest rate and then investing it at a higher one.

Now as many of you are probably muttering to yourself, the numbers are not always going to line up to be as profitable as what I outlined above. But that hardly justifies the categorical claim that homeownership is a stupid investment. It can be a bad investment and it can be a good investment. It just depends on the circumstances and what exactly the numbers in our equation are.

Additionally, our nation's fiscal policy provides extraordinary amounts of support to homeowners, which greatly increases the likelihood that buying a home will be a good investment. We don't tax imputed rent as income, which increases the after-tax value of a homeowner's imputed rent. We don't tax capital gains on homes unless they are extremely high, which increases the after-tax value of home value increases. We allow homeowners to deduct their mortgage interest from their federal taxes, which decreases the after-tax mortgage interest rate. Finally, we allow homeowners to deduct local property taxes from their federal taxes, which decreases the costs associated with owning a home.

So on all four relevant variables — imputed rent, home value increases, costs of ownership, and mortgage interest rates — we have what amounts to federal welfare programs that make the deal much sweeter for homeowners. Homeownership can be profitable in many cases without these policies, but with them, profitability is even more likely.

Now, I see these homeowner-support policies as totally unconscionable and unjustifiable. They provide hundreds of billions of dollars every year in federal aid to a group of people who are disproportionately well-off. Even among homeowners, these policies direct more dollars to the richer ones than the poorer ones. We should get rid of all of these subsidies.

But even without homeowner welfare programs, homeownership can be profitable. Writing off home-buying as a categorically terrible investment is as problematic as trumpeting home-buying as a can't-miss proposition.