Mortgage Calculator

For a new project (Real Estate Website), the client would like to have a mortgage calculator, similar to one he have seen on this site (click the link Mortgage Calculator half way the page).

I try to figure out what would be the best way of making something similar? To be honest, I don’t see how the figures, as given in the example, are build up?

On this particular property, I used a down payment of 10% (13.500) and left the mortgage period to the default 20 years.

I understand the calculation for the down payment ( price x (down payment / 100) )

Edit: this is solved. I made a stupid mistake with the amount for the down payment!

But, and maybe this is very stupid, I really don’t see how they come to the Amount Financed, in this case 18.090.000?

If I have any other questions I will be back!

I have some problems figuring out how the monthly payments are calculated in the example of post #1 (Principal & Interest ONLY)

The figures are as follow:

Total Amount 135.000 €
Down Payment 10%: 13.500 €
Interest Rate: 4%
Amount Financed: 121.500 €

The monthly rate according to the example is 736 € but math is not my strongest point plus I never bought a house, so I don’t see how they come to this amount?

Any help would be highly appreciated.

What about this is ColdFusion? You’re wanting advice on math, if I’m not mistaken.

Hi aaron.

This, as you see is the formula the use on the site:


Monthly Payment = 121.500 € * (0 € / (1 - ((1 + 0 €)-(240))))

I tried to translate this into CF but without success. And since I’m using CF to build the calculator I thought I might as well ask the question here. If you can point me to the right forum, that’s okay for me as well

Lets see the CF code you’re trying to write and any errors you’re getting.

Cheers,
James

Hi Clarkee21. So far I have the following variables:


<cfset downpayment = Form.property_price * ( Form.down_payment / 100 ) />
<cfset financed = Form.property_price - downpayment />
<cfset monthly_interest = Form.interest_rate / ( 12 * 100 ) />

and that’s the point where I don’t see it any longer :frowning:
Based on the formula provided I tried:


<cfset monthly_payment = financed * (Form.interest_rate / (1 - ((1 + Form.interest_rate)-(240))))>

Edit: Should be:


<cfset monthly_payment = financed * (monthly_interest / (1 - ((1 + monthly_interest)-(240))))>

but that is obviously not working! No errors but just a ridiculous number ( I should have listen better at school)

Okay. I got it and it was way simpler than anticipated.

I thought I share it with you all. It might come in handy:


<cfset Form.property_price = 135000 /><!--- Used as example --->  
<cfset Form.down_payment = 10 /><!--- Used as example ---> 
<cfset Form.interest_rate = 4 /><!--- Used as example --->    
<cfset downpayment = Form.property_price * ( Form.down_payment / 100 ) />
<cfset financed = Form.property_price - downpayment />
<cfset monthly_interest = Form.interest_rate / ( 12 * 100 ) />
<cfset v = ((1+monthly_interest)^240) />
<cfset t = (monthly_interest*v)/(v-1) />
<cfset monthly_payment = financed * t  />

Instead of sticking everything within one formula I created two extra variable v and t

I did a type of mortgage calculator for my office, and I use cfscript for the calculations. Seems I’m a bit late though, since you already found a solution. :slight_smile: