Housing Cost Calculator: Rent vs. Buy

by Gary Oberbrunner

Input Parameters

Apartment

Condo

Tax Information

(eligible for cap gains excl)

Other

Summary
Yearly Breakdown
Assumptions
Chart
About

Summary of Analysis

Showing analysis for 5 years.
Condo cost is the final cost assuming it's sold in that year.

Yearly Cost Breakdown

Analysis Assumptions

Cost Comparisons

Cumulative Costs Over Time

This chart shows the total costs accumulated over time for both options. The condo cost is the net cost after sale, assuming the condo is sold in that year.

Annual Housing Expenses

This chart shows the year-by-year expenses for each housing option, assuming the condo is not sold:

About This Calculator

This calculator performs a nominal financial analysis comparing the costs of renting versus buying a home over a specified time period. All future costs are in future dollars (not inflation-adjusted).

Key Calculations

Mortgage Calculations

Monthly mortgage payments are calculated using the standard amortization formula. For each payment, we determine how much goes to interest versus principal reduction, which impacts equity building and tax benefits.

Down Payment Options

This calculator provides three different ways to fund your down payment:

  • Cash on Hand: Uses your existing cash savings with no additional cost.
  • Selling Stocks: Incurs capital gains tax on the amount liquidated net of cost basis, representing the opportunity cost of selling investments. Enter the total stock gain since purchase in percent.
  • Loan: Finances the down payment with a separate loan, adding monthly payments but avoiding the upfront capital gains tax.

Each option has different financial implications, and the calculator shows how these choices affect the economics of homeownership over time.

Annual Ownership Costs

Beyond mortgage payments, we account for property taxes (calculated as a rate per $1,000 of property value) and HOA fees (calculated as a percentage of property value per month). These expenses typically increase as the property appreciates. Additionally, we include fixed monthly costs for heating and maintenance (such as repairs, plumbing, appliances, etc.) that are not covered by HOA fees.

Tax Benefits

The calculator includes tax savings from deducting mortgage interest and property taxes based on your combined federal and state marginal tax rates, subject to current tax law limitations:

  • SALT Deduction Limit: State and Local Tax deductions (including property tax) are capped at $40,000 per year (as of 2025).
  • Mortgage Interest Deduction Limit: Interest is only deductible on mortgage debt up to $750,000.

Note that while mortgage interest and property taxes are typically deductible subject to these limits, interest on a home equity loan used for a down payment on a different property is not tax-deductible under current US tax laws.

Property Appreciation

We model how property value changes over time using a fixed annual appreciation rate. This impacts your equity growth and the final sale price of the property.

Rental Costs

Rental costs start at your specified monthly rent and increase annually at your chosen rate to reflect typical market conditions.

Sale Proceeds Calculation

When selling the property, we calculate proceeds by taking the appreciated value, then subtracting:

  • Realtor fees (as a percentage of sale price)
  • Capital gains tax on any profit (sale price minus purchase price)
  • Remaining mortgage balance
  • Remaining loan balance (if applicable)

Total Cost Comparison

The total cost of ownership includes all annual costs minus the net proceeds from selling. For renting, it's simply the cumulative rent paid. The crossover point occurs when one option becomes more economical than the other.

Today's Dollars (Discounting)

When this option is checked, all future amounts are adjusted to reflect what they'd be worth in today's money. This is called discounting, and it uses a discount rate to account for the time value of money - the principle that a dollar today is worth more than a dollar in the future.

Each expense and revenue is discounted based on the year it occurs, using the formula: Present Value = Future Value / (1 + Discount Rate)^Year.

For example, if the discount rate is 3%, then $1,000 received 10 years from now is only worth about $744 today.

This gives you a more accurate picture of the true economic impact of your housing decision.

This is especially important when projecting the sale of a property many years in the future. In this app, selling in year N means you receive the full sale proceeds in that year, so the entire amount is discounted. That can make future sale values appear much smaller in today’s dollars, even though the actual (future) amount might be quite large.

Seeing amounts in today’s dollars helps you make more meaningful comparisons across time.

Methodology Notes

This calculator makes several simplifying assumptions:

  • All tax rates remain constant throughout the analysis period
  • Property appreciation and rent increases occur at constant annual rates
  • All mortgage interest is tax-deductible (consult a tax professional about your specific situation)
  • No major repairs or renovations are included in the ownership costs
  • No transaction costs other than realtor fees and capital gains tax are included in the sale

The analysis is intended to provide a framework for decision-making rather than a precise prediction of future costs.

This applet by Gary Oberbrunner is open-source under an MIT license. Source is at github

.