Should you buy or rent? That’s a question we each face at some point.

It doesn’t always make sense to buy. Depending on your location, your marital status, your income level, how long you intend to live in a particular location, and a handful of other variables, renting may actually make more sense than purchasing a home.

Here’s a web-based rent vs. buy calculator that can help you play with different scenarios.

I used the calculator to look back at the first home purchase my wife and I made. In 1993 we were paying $550 in rent. We took out a $112,000 mortgage on our first homel, paying $5000 down. We lived there exactly ten years. According to the calculator, we saved almost $67,000 by buying!

We paid approximately $108,000 to live in our home for ten years, and would have paid $83,000 if we had continued to rent. The calculator indicates we should have had $92,000 equity in our home (which is almost exactly correct, actually), giving us a net savings of $67,000.

If home prices are rising, the increase in equity is nearly the same as the magic of compound interest.