Owning stocks is a great way to build wealth over the long term, but what about real estate? More specifically, what about the house you live in, could that be a long-term market-beating investment, too? On a Fool Live episode recorded on March 5, Fool contributor Brian Stoffel does the math. The answer may surprise you.

10 stocks we like better than Walmart
When investing geniuses David and Tom Gardner have an investing tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Walmart wasn't one of them! That's right -- they think these 10 stocks are even better buys.

See the 10 stocks

Stock Advisor returns as of 2/1/20

Brian Stoffel: Yeah, I want to take one just real quick. What I wanted to do is I want to reiterate that we're not saying that buying a home is a bad decision. Like we said, there's 11 homes between the three of us. Clearly, we think there's value in that. We're also not saying that you can't make money off of it [your home], because clearly there are people who have made money off of it. I think the point that we do want to make and I think the reason I want to make it is because I wish I would've understood this sooner, is that if it's purely financial, spoiler alert, it's almost never purely financial. All the things that you two just talked about, OK, are super important and not really financial.

But if what we're talking about is purely financial, then here's an example. One person put in, and I don't think this was what this person was intending, but bought [their] first home in 1972 for $42,000 and happily six homes later living in a three-million-dollar home. Let's just say that was the same home that had appreciated from $42,000 to three-million between 1972 and today. I don't think that was their intention, but that sounds amazing, right guys?

Brian Withers: Yeah.

Brian Stoffel: Sounds amazing. It is amazing. That's great. At the same time, just because I think this perspective is so important, I went back and I looked if you had just invested $42,000 in the S&P 500 and reinvested the dividends every year starting on January 1, 1972. I hate when people do these calculations because no one ever does things exactly like this. I get it.

But [compared to your] three million dollar home, if you made those investments [in the S&P], that'd be worth $10 million today, a one-time lump sum investment of $42,000 back in 1972. I just think that it's really worth understanding if it's just about the dollars and cents, how much more value is created in the stock market?

The other part I'll throw out there is, Robert Shiller is a professor from Yale, he's also won the Nobel [Prize], he's shown that by and large, we have periods of time where it can be incredibly lucrative to buy and sell homes, it really can be. But over the long run, it pretty much just keeps pace with inflation. When he explains why, it makes sense. They're [houses are] degrading goods. I live in a 100-year-old house, it's definitely degrading. Every day, it's [laughs] degrading more and more and more. I totally feel Professor Shiller there. It's just something to keep in mind. But we're not saying that people can't make money off of it, we're not seeing that it's a bad decision.