Right. This calculator is helpful: http://www.nytimes.com/interactive/business/buy-rent-calcula...
EDIT: Also, don't forget to change the "marginal tax rate" option under "Advanced Settings...Other..." Mortgage interest deductibility is (rightly or, as I think, wrongly) a substantial ownership subsidy, particularly for high-earners.