Mortgage Calculator

Hi TB Community!

I am trying to create a mortgage calculator

I look online and apparently the formula for a monthly mortgage payment is as such:
M = P [ i(1 + i)^n ] / [ (1 + i)^n –1]
Where:
M: is the monthly payment
P: is the loan amount
i: is the interest rate (divided by 12)
n: is the number of monthly payments (so if 30 years, then 360 (30x12))

Using my own variables - here is what I entered:
image
The snippet is giving me this error:
image

I really appreciate any guidance on how I should correctly enter the mortgage payment calculation so that TB understands it / any sample snippets

Hey Everyone! No need to respond here!! I figured it out, I will share the results a little bit later :grinning:

3 Likes