Calculate the real cost of a mortgage
By the inyourbrowser.com editorial team · Reviewed and tested September 30, 2026
A workflow for anyone weighing up a home purchase: combine a mortgage payment calculation with the opportunity cost of the down payment to see the true financial picture. The plan is to compute monthly payment and total interest, then run the same down payment through a compound interest projection. Both tools run in your browser.
You will need
- Mortgage calculator to compute payment and total interest
- Compound interest calculator to estimate the opportunity cost of the down payment
Step-by-step instructions
- Work out the monthly payment and total interest: enter the home price, your down payment, the interest rate you expect, and the term in years.
- Note the monthly payment. This is the affordability figure most buyers focus on, but it is only one part of the picture.
- Note the total interest paid over the full term. This is the extra money you will hand over to the lender, on top of the principal.
- Project what the down payment could earn: enter your down payment as the principal (starting amount).
- Pick an annual growth rate to test and set the time period to the same number of years as the mortgage. The answer moves a lot with this rate, so run it at two or three values, for example 4, 6 and 8 percent. Use a nominal rate, not an after-inflation one, because the mortgage rate is nominal too.
- Add the mortgage calculator's Total interest to the compound interest calculator's Total interest earned, not to its final amount. The final amount includes the down payment itself, which you keep either way, as equity in the home or as an invested balance. The sum is what the loan costs you plus what the down payment could have earned, before rent, upkeep and changes in the home's price.
- Adjust the inputs to test scenarios: a bigger down payment, a shorter term, a higher interest rate, or a different investment growth assumption. The comparison shifts quickly.
Expected output and how to verify
You should end with three numbers: monthly mortgage payment, total interest paid over the term, and the interest the down payment would earn over the same period (Total interest earned). To verify, the Monthly P&I figure times the number of months should equal the loan amount plus the total interest (within rounding). The compound interest calculator's final amount should equal the down payment plus Total interest earned, and the interest grows faster over longer periods.
Calculations are estimates for informational purposes only. Consult a financial professional for advice.
Common pitfalls
- Forgetting to use the same term in both calculators makes the comparison meaningless. Match the years exactly.
- Picking an unrealistically high growth rate inflates the opportunity cost and makes the mortgage look worse than it probably is. Use a conservative figure and run a second pass with a higher one to bracket the range.
- The comparison ignores property appreciation, maintenance, taxes, and the rent you would otherwise pay. Treat the numbers as a starting point for a deeper analysis, not the final answer.
Variations
For a refinance decision, run the mortgage calculator twice (once with current terms, once with the refinance offer) and compare total interest. For a rough rent versus buy view, also add up the rent you would pay over the same term and set it against the total interest and the investment growth; the compound interest calculator models a single starting amount, not regular deposits.
Frequently asked questions
- What is opportunity cost in this context?
- It is the return your down payment could have earned if you invested it instead. Adding it to the mortgage interest shows what buying costs in interest and forgone returns, before taxes, upkeep and price changes, which you can then set against renting plus investing.
- What growth rate should I use?
- There is no single right figure, and the result moves a lot with it. Run the comparison at two or three rates, for example 4, 6 and 8 percent, and use a nominal rate to match the mortgage rate. Calculations are estimates for informational purposes only. Consult a financial professional for advice.
- Does the comparison account for rent?
- The two calculators leave rent out. For a fuller picture, set the total against the rent you would otherwise pay over the same term. The point of the workflow is to make the trade-off visible, not to give a single answer.
- Why not just look at the monthly payment?
- The monthly payment shows affordability today, but it hides total interest paid over the term and the opportunity cost of locking up the down payment. The workflow combines both views.
Read next
How loan, mortgage, salary, and ROI calculations work: formulas and assumptions.
Reviewed and tested September 30, 2026.