<prompt> Human: As far as I understand it, its all comes down to your ROI - compute how much your down payment would be if you invested it in the stock market, and compare that to how much your house would be worth in the same amount of time. For an 800,000 home SF Bay Area, I would need a 20 down payment of 160,000. If I instead invested the 160,000 in the stock market and get a 10 return historical average returns, Id have 3.173MM in 30 years again, assumes 10 compounding interest. I would have made 3MM. If I instead put the money into a house, I would own the house in 30 years. Assuming the 800,000 house appreciates at 3.5 annually a number I read in a local publications, the house would be worth 2.28MM in 30 years. After the loan was paid off, assuming I made regular payments I would have paid much much more than 800,000 over the 30 years. But lets say I did end up only spending 800,000, best case I would have made 1.482MM 2.28-.8001.482. But realistically my net return would be much less than 1.482 due to interest on the mortgage...and the cost for home maintenance which I didnt even include!Which gets me to my real question1. Did I make an incorrect assumption in how to go about comparing the two outcomes?2. If I didnt, Im having a hard time understanding why I should put my 160,000 into a real estate investment which has a mortgage and home maintenance costs one article I read said assume 1 of your home value per year, so 8,000year for this example instead of just putting it in the stock market. Yes I realize that 10 stock market return is not guaranteed - its just the historical average. Yes I realize that the home appreciation value I used 3.5 could end up being more or less and therefore significantly impacts the outcome. But If I were to put my money somewhere, it just seems smarter to bet on the stock market instead of real estate.Yet people are always investing in real estate. What am I missing?!Can anyone recommend an online calculator that can help me with this comparison?EDIT Yes I realize Im making some broad assumptions. But thats why Im here - looking for feedback on ways to think through this scenario. EDIT 2 The two scenarios I described above will not impact my current living situation - meaning I am not evaluating whether to move or not. So this is not a should I rent or should I buy question. My question is trying to understand which will result in a better return on investment - if I put funds in the stock market or in an investment property. I apologize for not making this clear. EDIT 3 The purpose of the investment property would be to generate rental income. I now realize that because my analysis only mentioned appreciation value, it was natural for the reader to assume that appreciation was the only ROI I was banking on - and based on the equation I used, youd be right to think that!. My mistake. But Im hearing loud and clear that I need to factor in rental income. Im also hearing loud and clear that investing for rental income is much more complicated than putting that 160,000 into an index fund, which may or may not get a better ROI. Thank you everyone for your feedback.  <response>: 10 isnt a realistic assumption and the you need to factor in rental incometaxesmaintenance to get a realistic comparison. That being said the outcome will likely be the same, just not quite so drastic. One reason people look towards real estate as an investment as rental properties is that while the odds of large gains are significantly less, in contrast the chances of total loss a la Enron are significantly less as well. Index funds effectively nullify this risk of catastrophic loss however. But, in defense of real estate, theyre not making any more of it 