The New York Times has a very cool calculator up — it lets you see whether it makes more sense to buy or to rent. You input your rent, the price and down payment for the home you’re considering, your mortgage interest rate, and your property taxes.

Then you guess: You choose how much you think the property value will go up each year, and how much the rent will increase. The app will then show you how long you’d have to own a house for it to make financial sense:

(Click to enlarge.)

There’s some obvious guesswork — it’s hard to say how much property values will increase (although Case-Shiller found that, in general, it tracks inflation.) Still, it’s a clear and useful tool. Click here to test it out.

Oh, and if you’re not sure about some numbers, check out Realtor.com to get more information.