That calculator is good, but simplifies a lot of things. For example, there's no easy way to include rent you charge to someone renting a room in your home. After using the NYTimes one a bunch of times, I found this one, which is much more full-featured:
I stumbled upon that calculator after writing one of my own one afternoon; it's cool!
Another key factor: house price appreciation and your ROI of capital. If house prices (adj. for inflation) don't rise much (as last 100 yrs or even 40 have shown) and you can make several percentage points above inflation on investing what you would have put into a down-payment, it doesn't matter how long you live in the home.
It's all in what kinda SWAGs you make. The default values in the NYtimes calculator are 1100/mo equiv. for $172k, but based on price to rent ratios here in Austin (near 20? http://www.deptofnumbers.com/affordability/texas/austin/) that home price would be near $250k
The other key factor is, is there interesting property available for rent when and where you need it. I'm currently looking for a bigger place for me and my family and the overlap between property available for rent and property I'd consider living in is pretty close to zero. So as such the relative financial merits of the two options are pretty much irrelevant.
http://www.nytimes.com/interactive/business/buy-rent-calcula...
As you pointed it out, a key factor is how long you are going to remain in the house.