Created
April 15, 2026 20:31
-
-
Save kazad/08296124415e06cca280534c20aa01fa to your computer and use it in GitHub Desktop.
mortgage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Loan Details | |
| home price = $450,000 | |
| down payment = 20% | |
| interest rate = 6.5% | |
| term = 30 //@suffix(years) | |
| # Computed | |
| down amount = $home price * down payment | |
| loan amount = $home price - down amount | |
| r = interest rate / 12 //@hidden | |
| n = term * 12 //@hidden | |
| monthly payment = $round(loan amount * (r * (1+r)^n) / ((1+r)^n - 1), 2) | |
| # Key Numbers | |
| $monthly payment //@hero | |
| total cost = $round(monthly payment * n) //@hero | |
| total interest = $round(total cost - loan amount) //@label(Total Interest Paid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment