House Cost Calculator Explanation

This document explains how the House Cost Calculator works, including the equations used for each calculation.

Mortgage Monthly Payment

The mortgage monthly payment is calculated using the formula for an amortizing loan:

M = (r * P) / (1 - (1 + r)^(-n))

Where:

Other Monthly Payments

Other monthly payments include taxes, insurance, utilities, and maintenance fees. This is calculated as:

OtherMonthlyPayment = (AnnualTax / 12) + MonthlyInsurance + UtilityPerMonth + MaintenanceFeesPerMonth

Total Monthly Payment

The total monthly payment is the sum of the mortgage monthly payment and other monthly payments:

TotalMonthlyPayment = MortgageMonthlyPayment + OtherMonthlyPayment

Equity Monthly Gain

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)

Real Monthly Payment

The real monthly payment is the total monthly payment adjusted by the equity monthly gain:

RealMonthlyPayment = TotalMonthlyPayment - EquityMonthlyGain

Cash Gain After Sell

The cash gain after selling the house is calculated as:

CashGainAfterSell = Principal - BuyingCost - SellingCost + (SellingPrice - HousePrice)

Interest and Principal

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.