Mortgage Payment Calculator

Ricardo Carvalho

Shiny App Overview

  • This app calculates mortage rates reactively by taking in user inputs
  • These inputs include cost of the mortgage, downpayment percentage, interest rate and term of the mortgage loan
  • It does not, however, calculate and provide estimates mortgage insurance, real estate taxes, or homeowner's insurance

Features

  • Slider for downpayment percentage
  • Slider for term of loan payment
  • Instant calculations and onscreen explanations (along with amortization equation)
  • App is set in showcase mode so users can see code

The Math and Code behind it

\[ (\text{Principal})\frac{(\text{Interest rate})(1+\text{interest rate})^\text{Term}}{(1+\text{interest rate})^\text{Term}-1} \]

\[ f(a) + \frac{f'(a)}{1!} (x-a) + \frac{f''(a)}{2!} (x-a)^{2} + \frac{f'''}{3!} (x-a)^{3} + \ldots \]

An Example and why you want this app

  • For example, for a house with the following parameters…
cost=405000
downpayment=20
interest=3
term=15

…gets evaluated through the following formula:

value = (cost) * (1 - downpayment/100) * (interest/1200) * ((1 + interest/1200)^(term * 
    12))/((1 + interest/1200)^(term * 12) - 1)

…resulting in a mortgage payment of…

[1] 2237.485


So why you want this app?

  • So easy and fun to use!
  • Results are instant and non-cumbersome!
  • Instructions are displayed onscreen!