This document explains how the House Cost Calculator works, including the equations used for each calculation.
The mortgage monthly payment is calculated using the formula for an amortizing loan:
M = (r * P) / (1 - (1 + r)^(-n))
Where:
Other monthly payments include taxes, insurance, utilities, and maintenance fees. This is calculated as:
OtherMonthlyPayment = (AnnualTax / 12) + MonthlyInsurance + UtilityPerMonth + MaintenanceFeesPerMonth
The total monthly payment is the sum of the mortgage monthly payment and other monthly payments:
TotalMonthlyPayment = MortgageMonthlyPayment + OtherMonthlyPayment
Equity monthly gain is calculated as the principal paid per month adjusted for buying and selling costs, plus any increase in house value:
EquityMonthlyGain = (Principal / TotalMonths) - (BuyingCost / TotalMonths) - (SellingCost / TotalMonths) + ((SellingPrice - HousePrice) / TotalMonths)
The real monthly payment is the total monthly payment adjusted by the equity monthly gain:
RealMonthlyPayment = TotalMonthlyPayment - EquityMonthlyGain
The cash gain after selling the house is calculated as:
CashGainAfterSell = Principal - BuyingCost - SellingCost + (SellingPrice - HousePrice)
Over the holding period, interest and principal are calculated using the remaining loan amount and monthly interest rate. For each month:
Interest = RemainingLoanAmount * MonthlyInterestRate
Principal = MortgageMonthlyPayment - Interest
The remaining loan amount decreases by the principal paid each month.