I disagree that these are the two most important reasons for deciding between buying and renting. If somebody needs a rent vs buy calculator to begin with, chances are they have no business estimating something as unknowable as future home prices or stock market returns. I reject your notion that these estimates should be made by the average person trying to figure this out. There's too much room for error.
I kind of agree with this. But for different reasons.
For starters, most people I know that ask rent vs buy, aren't actually asking rent + invest or buy. They want to know, in most cases, if it makes sense to pay X more per month to own vs rent.
While I think this calculator is a good tool, I don't think it really aligns with how people view home ownership. Most people aren't looking at it solely as an investment vehicle (whether they should is a different story). There's the stability factor, the pride of ownership factor, the feeling that your monthly payment is going towards something rather than "thrown away", etc. I am quite certain that if I told most people they would definitely make 0.0001% more by renting for life and investing than by buying, they would still buy because there are non-financial benefits that home ownership delivers that is probably worth that 0.0001% premium for the majority of regular people.
So I kind of think these calculators, for the majority of people, should assume that investment returns match home appreciation returns. The expected ROI on returns from the market would have to be dramatically (and probably unrealistically) greater than returns on home appreciation for most people to pick renting over buying.
It's like putting a "Should I have children?" calculator. From a purely financial perspective, no. Children are almost never profitable (unless you produce the next Lebron James or something). But it's not purely a financial decision for most people, just like home buying.