I've come to believe that for millions of Americans, a house is a large liability masquerading as a safe asset.

Not just because of the recent housing crash, although what an eye-opener that was.

But because after watching real estate implode last decade, the average American still believes their home will make a great long-term investment. The best long-term investment, even.

As my colleague David Hanson wrote last week, a recent Gallup poll shows that Americans now believe housing is the best long-term investment, beating out stocks, bonds, and gold.

They might be right, only because the average stock investor does so poorly that a home may indeed be their best investment. But housing has historically been a terrible bet for people who think it will return more than inflation. To show you what I mean, I have to tell you about my visit to Yale economist Robert Shiller's office a year ago.

Shiller -- who won the Nobel Prize last year -- is regarded as the world's foremost housing expert. He has married historical data with deep insight into human psychology to offer some of the best housing analysis anyone's ever produced.

Not only is Shiller brilliant, but he's one of the nicest guys I've ever met, easy to talk to and puts things in clear, easy-to-understand language. As we sat in his office eating donuts and drinking coffee, I asked him, in the broadest terms I could, what homeowners should expect out of their homes in the long run.

"The housing boom in the early 2000s was driven by a sense that housing is a wonderful investment. It was not informed by good history," he said. Most people now agree on that much.

"If you look at the history of the housing market, it hasn't been a good provider of capital gains. It is a provider of housing services," he explained.

By that, he means a home gives you a place to live, a place to sleep, a place to store your stuff.

But that's it. Americans believed -- and still believe -- that the value of their home will increase above the rate of inflation.

And that, Shiller says, is wrong.

"Capital gains have not even been positive. From 1890 to 1990, real inflation-corrected home prices were virtually unchanged."

Shiller -- a pioneer of behavioral finance and one of the calmest, levelheaded economists I know -- becomes animated at this point, almost irritated. Debunking the notion that housing is a great investment is one of his favorite topics.

Housing prices, he argues, could decline over long periods of time -- decades, even.

"Why is that?" he asks me. I really don't know.

"Well, I think you have to reflect on the fact that it's done it before. Home prices declined for the first half of the 20th century [adjusted for inflation]. Economists discussed that back then. Why are they going down? The conclusion was ... of course home prices go down. There's technical progress. They are a manufactured good. Back in 1900, homes were handmade, you know, craftsmen. But now, in 1950, we can get all kinds of power tools and prefab. And [construction workers] were just better in 1950 than we were in 1900. So of course prices will go down."

Shiller also mentions that certain homes go out of style over time, dragging down prices. "What kind of houses will they be building in 20 years?" he wonders aloud. "They may have lots of new amenities. They will be computerized or something in some way that we can't anticipate now. So people won't want these old homes."

His animation peaked with a line I'll never forget.

"To me, the idea that buying a home is such a great idea is just wrong. They may very well decline for the next 30 years in real terms."

Real home prices may decline for the next 30 years.

The best thing about Shiller, and what sets him apart from your typical pundit, is that he has data to back up every point he makes.

In the early 2000s, Shiller wanted to see what nationwide home prices looked like over the long term. He was shocked to learn that no one had ever actually put that data together.

He dug around in libraries, crunched the numbers, and came up with an index that measured nationwide home prices going back to the 1890s.

This was a first. "The strange thing is, nobody else had ever made a plot like that. I can tell you, no one had ever seen that picture," he told me, shaking his head in disbelief. "People plot all kinds of data. Why wouldn't someone have done that? I still haven't figured it out."

The chart, measuring nationwide home prices adjusted for inflation, was this one:

From 1890 -- just three decades after the Civil War -- through 2012, home prices adjusted for inflation literally went nowhere. Not a single dime of real growth. For comparison, the S&P 500 increased more than 2,000-fold during that period, adjusted for inflation. And from 1890 to through 1980, real home prices actually declined by about 10%.

The reason Shiller warns that home prices could fall going forward is the simple observation that, heck, they've done it in the past. It's what history tells us to expect out of our homes. The entire idea that home prices increase in real terms over time is a figment of the 2000s housing bubble.

It's important to reiterate what a home does do: It provides a place to live. A place to raise your kids. A place to spend the holidays with your family. A place to barbecue with your neighbors. Even a place to rent out. That has tremendous value, of course. Shiller owns a home. He'd buy another if he needed one. "Basically, if I were in the market right now because I wanted a house, I would buy a house," he said.

The problem is that Americans expect more out of their homes than just a place to live. In 2010 -- years after the housing bubble burst -- Shiller's surveys showed Americans still expected their home to appreciate by more than 6% a year over the following decade. If history is any guide, that's probably about twice as fast as they'll actually appreciate by. Despite the housing crash, people still expect stock-like returns out of their homes.

Since a home is most Americans' largest asset, you can see how this becomes a problem. When you have inflated expectations about the largest asset you own, you walk down the path of financial disappointment. The value of American homes fell by nearly $7 trillion from 2007 to 2011. People who thought their homes would return enough to pay for retirement learned that Mr. Market carries a sledgehammer and takes no prisoners.

Everyone should live in a home they can afford and provides the lifestyle they desire. But assuming it's a superior long-term investment, one to rival stocks, is dangerous. There's just no evidence backing it up.

I think people run into two problems when thinking about the value of their house.

A home is typically the asset people hold the longest. They sell stocks after a few months, but keep a home for years, or decades. When you own something for that long, the returns you think you earned can be overwhelmingly due to inflation. The Consumer Price Index has increased six-fold since 1970. If you bought a house for $30,000 in 1970 and it's worth $180,000 today, you've earned nothing after inflation. You think you've made a fortune, but you haven't gone anywhere. Add in property taxes, insurance and repairs, and you're down.

Yes, you got to live in the house. That's huge. But it doesn't make living free.

If you have a mortgage, you're paying interest. If you own outright, or have a lot of equity, there's an opportunity cost of having money tied up in an asset that barely keeps up with inflation when you could have had it in something else, like stocks.

Say you and I both have $250,000. I buy a house for $250,000 cash, and you rent a house across the street for $1,000 a month and put $250,000 in the S&P 500. After 20 years, I'll have a house worth $200,000 in real terms, and you'll have a portfolio of stocks worth $330,000 adjusted for inflation (assuming the market's average real rate of return, and a 2% inflation rate on my rent payments). The difference between those two amounts is the opportunity cost of owning a house (and I didn't even include taxes, repairs, or insurance). In reality, it's hard to rent the same house for 20 years straight, and a lot of regions don't offer attractive rentals at all, so this probably isn't feasible. But it shows that the decision to own can be more about lifestyle and stability, not financial returns.

So, by all means, own a home. Just keep your expectations in check.

Check back every Tuesday and Friday for Morgan Housel's columns on finance and economics.