We are in the need of a Mortgage Calculator for our Drupal based enterprise wide real estate website, still in development. If anyone has coded a php mortgage calculator that would seemlessly integrate into our drupal site we would be interested.

We would also be willing to pay for someone to code one for us.

Comments

arthurthornton’s picture

I have developed a loan calculator (which calculates the amount of interest, the monthly payment, and the total amount to be lent), but it doesn't show things like percentage of interest and principle for each monthly payment. It requests the following from users: down payment, loan amount, interest amount, and loan term (in months). I have not developed a version for Drupal, nor do I plan on it. I would, however, be willing to give the formula to a Drupal developer for them to use. The formula is used by most banking institutions. This is the formula:
l=loan amount
i=interest
d=down payment
t=term (in months)
AVERAGE BALANCE: l-d*.54
WITH INTEREST: AVG_BAL*(i/100)*(t/12)
TOTAL AMOUNT: (l-d)+WITH_INTEREST
MONTHLY: TOTAL_AMT/t

In unprotected PHP, that would look like:

$avgbal = ($_POST['amt']-$_POST['dp'])*.54;
$withint = $avgbal*(str_replace("%", "", $_POST['apr'])/100);
$inttimesterm = $withint*($_POST['loanlength']/12);
$totalamt = ($_POST['amt']-$_POST['dp'])+$inttimesterm;
$monthly = $totalamt/$_POST['loanlength'];

if
$_POST['amt'] was the AMOUNT field
$_POST['dp'] was the DOWN PAYMENT field
$_POST['apr'] was the INTEREST field
$_POST['loanlength'] was the LENGTH in MONTHS

Thanks,
Arthur

kenuck’s picture

I'm in the process of creating one right now and it'll be made free to the drupal community. What are your requirements?

cheers

-----------------------------------------
http://www.netrift.com
http://rlisting.netriftsolutions.com - Drupal Real Estate Module for Drupal 5
http://ulisting.netriftsolutions.com - Drupal Real Estate Module for Drupal 6

kenuck’s picture

A very basic mortgage calculator can be downloaded here for free : http://www.netrift.com/product/uListingMC

cheers
-----------------------------------------
http://www.netrift.com - Custom modules
http://ulisting.netriftsolutions.com - Drupal Real Estate Module for Drupal 6
http://drupal.org/project/friend - Social Neworking for Drupal 6

Clint Eagar’s picture

Works very well, thanks for posting

tryitonce’s picture

thanks - great little module

Friso D’s picture

Dear Aaron,
I've installed your mortage calculator and It's just what I'm looking for. More so because you seem to be the only one to have developed a module like this in Drupal.

For my project I need to put your calculator in a block to be shown on particular nodes of my site.
I.e. the calculator has to be a teaser in on some of the pages to show the clients visiting the site how interesting the product is by simulating a loan application and subsequently stimulate them to make a loan inquiry through a form on the site.
I tried using modules like 'node as a block', 'node in a block' and 'views' to try and achieve this but since your module is not a node it does not show up anywhere.
Any clue as to how I can achieve this?
I don't know if I can post this as a feature request or, since you work on a commercial basis, I can ask you customize you module for me- in this case I’ll contact you privately through your website.

Thanks,
Friso

coloryan’s picture

I have several calculators on www.MortgageRiot.com, all for Drupal. If you see any that you like, let me know and I'll provide the code.

ClearXS’s picture

I think what misses is a Drupal "Calculate API" module, that should be basic for eventual add-on modules, like mortgage, scientific, administration, spreadsheet, financial reports, etcetera??!

grasmash’s picture

I would definitely appreciate using your affordability calculator Can you release the module on Drupal.org or else supply the files/code?

Thank you!

coloryan’s picture

Tried to attach to save space, but it doesn't allow attachments.

Paste this right into the box of the page and you should be good to go.

PS: Any credit to MortgageRiot is appreciated.

 
<script language="JavaScript"><!--

if (document.images) {
   HomeSmOff = new Image (70,18)
   HomeSmOn = new Image (70,18)
   BuySmOff = new Image (70,18)
   BuySmOn = new Image (70,18)
   ListSmOff = new Image (70,18)
   ListSmOn = new Image (70,18)
   SellSmOff = new Image (70,18)
   SellSmOn = new Image (70,18)
   InvSmOff = new Image (70,18)
   InvSmOn = new Image (70,18)
   LinksSmOff = new Image (70,18)
   LinksSmOn = new Image (70,18)
   CalcSmOff = new Image (70,18)
   CalcSmOn = new Image (70,18)
   GuideSmOff = new Image (70,18)
   GuideSmOn = new Image (70,18)
   emailSmOff = new Image (70,18)
   emailSmOn = new Image (70,18)
   
   HomeSmOff.src = 'images/HomeSmOff.jpg'
   HomeSmOn.src = 'images/HomeSmOn.jpg'
   BuySmOff.src = 'images/BuySmOff.jpg'
   BuySmOn.src = 'images/BuySmOn.jpg'
   ListSmOff.src = 'images/ListSmOff.jpg'
   ListSmOn.src = 'images/ListSmOn.jpg'
   SellSmOff.src = 'images/SellSmOff.jpg'
   SellSmOn.src = 'images/SellSmOn.jpg'
   InvSmOff.src = 'images/InvSmOff.jpg'
   InvSmOn.src = 'images/InvSmOn.jpg'
   LinksSmOff.src = 'images/LinksSmOff.jpg'
   LinksSmOn.src = 'images/LinksSmOn.jpg'
   CalcSmOff.src = 'images/CalcSmOff.jpg'
   CalcSmOn.src = 'images/CalcSmOn.jpg'
   GuideSmOff.src = 'images/GuideSmOff.jpg'
   GuideSmOn.src = 'images/GuideSmOn.jpg'
   emailSmOff.src = 'images/emailSmOff.jpg'
   emailSmOn.src = 'images/emailSmOn.jpg'

}
else {
   HomeSmOff = ""
   HomeSmOn = ""
   BuySmOff = ""
   BuySmOn = ""
   ListSmOff = ""
   ListSmOn = ""
   SellSmOff = ""
   SellSmOn = ""
   InvSmOff = ""
   InvSmOn = ""
   LinksSmOff = ""
   LinksSmOn = ""
   CalcSmOff = ""
   CalcSmOn = ""
   GuideSmOff = ""
   GuideSmOn = ""
   emailSmOff = ""
   emailSmOn = ""
}

function setMsg(msg) {
   window.status = msg
   return true
}

function imgOn(imgName) {
   if (document.images) {
       document[imgName].src = eval(imgName + "On.src")
   }
}

function imgOff(imgName) {
   if (document.images) {
       document[imgName].src = eval(imgName + "Off.src")       }
}

//-->
</script>

                        <table width="95%" border="0" align="center" cellpadding="3">
                          <tr> 
                            <td width="100%"><div align="center"><span class="ArticleTitle">Affordability 
                                Calculator</span> </div>
<p class="ArticleBody">How much house 
                              can I afford? The Affordability Calculator determines 
                              the largest mortgage and property sales price you 
                              can afford based on your current financial status. 
                              It is useful to have this estimate when you contact 
                              a lender. Being pre-approved can often times give 
                              you a stronger negotiating position when purchasing 
                              your home.</td>
                          </tr>

                          <tr>
                            <td class="ArticleBody">&nbsp;</td>
                          </tr>
                        </table>


                        <div align="center">
                          <script language="JavaScript">


function selectcell() {
  document.inputForm.moInc.select()
  document.inputForm.moInc.focus()
}

function newwindow() {
  window.open("mc_notes0.html","Enter","scrollbars,width=420,height=400")
}

function newwindow2() {
  window.open("mc_notes0.html#Financial_Info","Finan","scrollbars,width=420,height=400")
}

function newwindow3() {
  window.open("mc_notes1.html#Available_Funds","Funds","scrollbars,width=420,height=400")
}

function newwindow4() {
  window.open("mc_notes2.html#Taxes","Tax","scrollbars,width=420,height=400")
}

function newwindow5() {
  window.open("mc_notes3.html#Loan_Conditions","Loan","scrollbars,width=420,height=400")
}

function newwindow6() {
  window.open("mc_notes4.html","Est","scrollbars,width=420,height=400")
}

function newwindow7() {
  window.open("mc_notes5.html#Down","Down","scrollbars,width=420,height=400")
}

function newwindow8() {
  window.open("mc_notes6.html#Mo_Payment","Pay","scrollbars,width=420,height=400")
}

function newwindow9() {
 window.open("mc_notes7.html#Mo_Housing_Exp","Housing","scrollbars,width=420,height=400")
}


function chknos(nos)
{
var str = nos.value;
if(str.length == 0) {
 return false;
}

oneDecimal = false;
for (var i = 0; i <str.length; i++) {
 var y = str.substring(i, i + 1);
 if (y == "." && !oneDecimal) {
    oneDecimal = true;
    continue
 }
 if (y < "0" || y > "9") {
 alert("Please enter positive numbers only. Calculator will use the default value for this entry. Click on underlined items for help and default values.");
 return false;
 }
}
 return true;
}

function number(nos,def)
{
if(!chknos(nos)) {
 return def;
}

var use = nos.value;
if(use == "" || use == null || (0 + use) == 0) {
 return def;
}

return parseFloat(use); 
}

function f1(nos, y) {
var str = "" + Math.round(nos);
if (str.length == 0) {
   str = "0";
}
str = "$" + str;
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

function f2(nos, y, dec) {
  var str = "" + Math.round(eval(nos)*Math.pow(10,dec));
    while (str.length <= dec) {
      str = "0" + str;
    }
  var decpoint = str.length - dec;
  str = str.substring (0,decpoint) + "." +
    str.substring (decpoint, str.length);
if (str.length == 0) {
    str = "0";
}
str = str;
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

function f3(nos, y) {
var str = "" + Math.round(nos);
if (str.length == 0) {
     str = "0";
}
i = y - str.length;
while (0 < i--) {
 str = " " + str;
}
return str;
}

var newLoan = 0;

function compute(input)
{
var table = input.form;

percentDown = number(table.percentDown, 3);

moTtlInc = number(table.moInc,0)
moDebt = number(table.moDebt, 0)
percentCC = number(table.percentCC, 3);

if (percentDown < 5) {
    percentDown = 3.0; 
}

if (percentDown >= 20) {
   pmi_rate = 0;
   availInc = moTtlInc * 0.33;
   if ((moTtlInc * 0.38 - moDebt) <= (moTtlInc * 0.33)) {
      availInc = moTtlInc * 0.38 - moDebt;
   }
}

if (percentDown < 20) {
   availInc = moTtlInc * 0.28;
   if ((moTtlInc * 0.36 - moDebt) <= (moTtlInc * 0.28)) {
      availInc = moTtlInc * 0.36 - moDebt;
   }
}

if (percentDown <= 15) {
   pmi_rate = 0.0073 - (percentDown - 3) * 0.000108;
}

if (percentDown > 15 && percentDown < 20) {
    pmi_rate = 0.0060 - (percentDown - 15) * 0.00076;
}

taxRate = number(table.taxRate, 1.2) / 1200;

intRate = table.rate.options[table.rate.selectedIndex].text;

term = table.term.options[table.term.selectedIndex].text;

insRate = number(table.insRate, 0.3) / 1200;

downTotal = number(table.down, 0);

moFees = number(table.fees, 0) / 12;

loan = (1 - Math.pow(intRate/1200 + 1, -term*12))*
 (availInc) / (intRate/1200);

moTax = loan * taxRate * (1/(1 - percentDown/100));

moIns = loan * insRate * (1/(1 - percentDown/100));

mopmi = pmi_rate * loan /12;

for ( var i = 1; i <= 100; i++) {
    moPI2 = availInc - moFees - moTax - moIns - mopmi;
    moPI1 = (Math.round((moPI2)*Math.pow(10,3)))/1000;
    newLoan = (1 - Math.pow(intRate/1200 + 1, -term*12)) * moPI1 / (intRate/1200);
    moTax = newLoan * taxRate * (1/(1 - percentDown/100));
    moIns = newLoan * insRate * (1/(1 - percentDown/100));
    mopmi = pmi_rate * newLoan /12;
    moPI2 = availInc - moFees - moTax - moIns - mopmi;
    moPI = (Math.round((moPI2)*Math.pow(10,3)))/1000;
    if ((moPI1 - moPI) == 0) {
       
       i = 100;
    }
}


downPay = newLoan * ((1/(1 - percentDown/100)) - 1);



propValue = newLoan + downPay;

downClose = propValue * percentCC/100;

down_close = downClose + downPay;

addDown = downTotal - down_close;

table.moInc.value = f3(moTtlInc, 1);
table.moDebt.value = f3(moDebt, 1);
table.down.value = f3(downTotal, 1);
table.taxRate.value = f2(taxRate*1200, 1, 2);
table.insRate.value = f2(insRate*1200, 1, 2);
table.fees.value = f3(moFees*12, 1);


table.percentDown.value = f2(percentDown, 1, 1);
table.percentCC.value = f2(percentCC, 1, 1);

totalPay = moPI + moTax + moIns + moFees + mopmi;
if (newLoan <= 0) totalPay =0;
table.totalPay.value = f1(totalPay, 10);

if (newLoan <= 0) moTax = 0;
table.moTax.value = f1(moTax, 10);

if (newLoan <= 0) moIns =0;
table.moIns.value = f1(moIns, 10);

table.moFees.value = f1(moFees, 10);

if (newLoan <= 0) downClose = 0;
table.downClose.value = f1(downClose, 10);

if (newLoan <= 0) mopmi = 0;
table.mopmi.value = f1(mopmi, 10);

if (newLoan <= 0) down_close = 0;
table.down_close.value = f1(down_close, 10);

if (newLoan <= 0) addDown = 0;
table.addDown.value = f1(addDown, 10);

if (moPI <= 0) moPI = 0;
table.moPI.value=f1(moPI, 10);

if(newLoan <= 0) newLoan = 0;
table.maxLoan.value = f1(newLoan, 10);

if (newLoan <= 0) propValue = 0;
table.propValue.value = f1(propValue, 10);

if (newLoan <= 0) downPay = 0;
table.downPay.value = f1(downPay, 10);

intRate=intRate*1000
document.cookie="condition_loan="+intRate.toString()+term.toString()+(Math.round(newLoan)).toString()

}

function checkLoan(form) {
   var moInc = document.inputForm.moInc.value;
   if (isNaN(newLoan) || newLoan == 0 || newLoan < 1000 || moInc == 0) {
        alert("Maximum Mortgage Amount is either blank, zero or less than 1000. You must enter enough income to generate a mortgage loan amount of 1000 or greater to run an Amortization Table.")
   document.inputForm.moInc.select()
   document.inputForm.moInc.focus()
   
   }else{

window.open("amortz.html","Amortz","menubar,scrollbars,width=520,height=400")
}
}


<!-->

                        </script>
                          <noscript>
  

  

                          <table width="95%" border="0" align="center" cellpadding="2">
                            <tr>
                              <td width="95%" height="86" valign="bottom" class="ArticleBody"><strong>It 
                                    appears your browser has JavaScript turned off.</strong><br>
                                To use the Affordability Calculator you need Internet 
                                Explorer 4.01, Netscape Navigator 3.0 or AOL 4.0 
                                (or later versions) with JavaScript turned on.<br>
                                Open your browser preferences and enable JavaScript 
                                (some browsers call it JScript).<br>
                                You do not have to restart your browser or computer 
                                after you enable JavaScript. Simply click the 'Reload' 
                              button.</td>
                            </tr>
                          </table>
                          </noscript>

  
                      </div>
                        <form method="POST" name="inputForm">
    <div align="center"><center>
                              <table border="0" cellpadding="0" cellspacing="0" width="95%" >
                                <tr class="ArticleTitle"> 
                                  <td align="center" valign="top" colspan="2" width="275"><strong>Enter 
                                    Data Here</strong></td>
                                  <td width="10" >&nbsp;</td>
                                  <td align="center" valign="top" colspan="2" width="320"><strong>Your 
                                    Estimated Results</strong></td>

          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody"><b>Monthly Income - $</b></td>
            <td width="70" class="Normal"> 
              <input type="text" size="8" name="moInc" onChange="compute(this)">
            </td>
            <td width="10">&nbsp;</td>
                                  <td width="230" class="ArticleBody"><strong>Maximum Mortgage Amount</strong></td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="maxLoan" value="$0" onChange="compute(this)">

            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody"><b>Monthly Obligations - $</b></td>
            <td width="70" class="Normal"> 
              <input type="text" size="8" name="moDebt" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">Down Payment</td>

            <td width="90" class="Normal"> 
              <input type="text" size="10" name="downPay" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Down Payment - %</td>
            <td width="70" class="Normal"> 
              <input type="text" size="6" name="percentDown" value="20.0" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>

                                  <td width="230" class="ArticleBody"><strong>Property 
                                    Sales Price</strong></td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="propValue" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr> 
           <td width="205" class="ArticleBody">Closing Costs - %</td>
            <td width="70" class="Normal"> 
              <input type="text" size="6" name="percentCC" value="3.0" onChange="compute(this)">

            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Closing Costs</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="downClose" value="$0" onChange="compute(this)">
            </td>
          </tr>
                                <tr > 
                                  <td colspan="2" width="275" class="ArticleTitle">Buyer(s) 
                                    Available Cash Funds</td>

            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">Down Payment &amp; Closing Costs</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="down_close" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Savings &amp; Cash - $</td>

            <td width="70"> 
              <input type="text" size="8" name="down" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">Funds Surplus / Shortage (-)</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="addDown" value="$0" onChange="compute(this)">
            </td>
          </tr>

          <tr > 
                                  <td valign="bottom" colspan="2" width="275" class="ArticleBody">Taxes 
                                    and Insurance</td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Monthly Loan Payment</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="moPI" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Annual Property Tax - %</td>

            <td width="70" class="Normal"> 
              <input type="text" size="6" name="taxRate" value="1.20" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Monthly Property Tax</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="moTax" value="$0" onChange="compute(this)">
            </td>
          </tr>

          <tr > 
                                  <td width="205" class="ArticleBody">Annual Hazard Insurance- %</td>
            <td width="70" class="Normal"> 
              <input type="text" size="6" name="insRate" value="0.30" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Monthly Hazard Insurance</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="moIns" value="$0" onChange="compute(this)">

            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Annual Condo Fee - $</td>
            <td width="70" class="Normal"> 
              <input type="text" size="6" name="fees" value="0" onChange="compute(this)">
            </td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Monthly Condo Fee</td>

            <td width="90" class="Normal"> 
              <input type="text" size="10" name="moFees" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr > 
                                  <td valign="bottom" colspan="2" width="275" class="ArticleTitle"><b>Loan 
                                    Parameters</b></td>
            <td width="10" >&nbsp;</td>
                                  <td width="230" class="ArticleBody">&nbsp;Monthly PMI Insurance</td>
            <td width="90" class="Normal"> 
              <input type="text" size="10" name="mopmi" value="$0" onChange="compute(this)">

            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Annual Interest Rate - %</td>
            <td width="70" class="Normal"> 
              <select name="rate" size="1" onChange="compute(this)">
                <option>4.00</option>
                <option>4.125</option>

                <option>4.250</option>
                <option>4.375</option>
                <option>4.500</option>
                <option>4.625</option>
                <option>4.750</option>
                <option>4.875</option>

                <option>5.00</option>
                <option>5.125</option>
                <option>5.250</option>
                <option>5.375</option>
                <option>5.500</option>
                <option>5.625</option>

                <option>5.750</option>
                <option>5.875</option>
                <option>6.000</option>
                <option>6.125</option>
                <option>6.250</option>
                <option>6.375</option>

                <option>6.500</option>
                <option>6.625</option>
                <option>6.750</option>
                <option>6.875</option>
                <option>7.000</option>
                <option>7.125</option>

                <option>7.250</option>
                <option>7.375</option>
                <option>7.500</option>
                <option>7.675</option>
                <option selected>7.750</option>
                <option>7.875</option>

                <option>8.000</option>
                <option>8.125</option>
                <option>8.250</option>
                <option>8.375</option>
                <option>8.500</option>
                <option>8.675</option>

                <option>8.750</option>
                <option>8.875</option>
                <option>9.000</option>
              </select>
            </td>
            <td width="10">&nbsp;</td>
                                  <td width="230" class="ArticleBody">Monthly Housing Expense</td>

            <td width="90" class="Normal"> 
              <input type="text" size="10" name="totalPay" value="$0" onChange="compute(this)">
            </td>
          </tr>
          <tr > 
                                  <td width="205" class="ArticleBody">Loan Term in years</td>
            <td width="70" class="Normal"> 
              <select name="term" size="1" onChange="compute(this)">
                <option>15</option>

                <option>20</option>
                <option>25</option>
                <option selected>30</option>
                <option>35</option>
                <option>40</option>
              </select>

            </td>
            <td width="10" >&nbsp;</td>
            <td colspan="2" width="320">&nbsp;</td>
          </tr>
          <tr > 
            <td colspan="2" width="275"> 
              <input type="button" name="calculate" value="Calculate My Input Now!" onClick="compute(this)" class="Normal">
            </td>
            <td width="10" >&nbsp;</td>
            <td colspan="2" width="320"> 
              <input type="reset" name="clear_form" value="Clear the Calculator" class="Normal">

            </td>
          </tr>
        </table>
                              <div align="right"></div>
      </center>
    </div>
</form>
tryitonce’s picture

thanks for the generous donation.

I am just playing around with this Affordability Calculator and have a question about the Monthly Obligations - $. It seems that 1000 is okay - after that the reslut goes to 0.
1. What are the "Monthly Obligations - $" - what should go in there and how high could it be before the is no money left to buy a house?
2. I add the following to illustrate:
Enter Data Here
Monthly Income - $ 5000
Monthly Obligations - $ 1000
Down Payment - % 20
Closing Costs - % 3
Buyer(s) Available Cash Funds
Savings & Cash - $ 0
Taxes and Insurance
Annual Property Tax - % 1.2
Annual Hazard Insurance- % 0.3
Annual Condo Fee - $ 3600
Loan Parameters
Annual Interest Rate - % 6
Loan Term in years 30

With this I get:
Maximum Mortgage Amount $79386
Down Payment $19846
Property Sales Price $99232
Closing Costs $2977
Down Payment & Closing Costs $22823
Funds Surplus / Shortage (-) $-22823
Monthly Loan Payment $476
Monthly Property Tax $99
Monthly Hazard Insurance $25
Monthly Condo Fee $300
Monthly PMI Insurance $0
Monthly Housing Expense $900

Now - if I increase Monthly Obligations - $ 2000

The result goes to 0 - is that correct? And why?

I will need later to change a few things incl. Currency - probably to neutral and the terms to more UK / European vocabulary - reference to MortgageRiot - is no problem - thanks .....

coloryan’s picture

The monthly obligation is the the current debt load - car payments, credit cards, etc. The US standard rule of thumb is that no more than 30% of your monthly income should go towards outstanding debt (called the DTI or debt to income ratio). Other loans are done, obviously given the current state of things, but they require a little more thinking.

5000 - 2000 = 3000/month, less 300 for the condo fee leaves the client with less than enough to service the debt load of any home.

tryitonce’s picture

Thanks - well explained - and they should have thought about this before 2008 and imposed this on the banks world wide.

See for changes and amendments done to suite our site better - http://www.mallsandmore.com/en/retail-mall-shopping-center/affordability... for the changes and reference to your site.

One question - would it be easy to add points to separate larger numbers - i.e. 1000000 = 1.000.000? What would by the syntax?

Thanks a lot !!!!!

Baibhav Kumar’s picture

Thanks Buddy,
The code works perfect as i was searching.
Great work man.

andreiianusco’s picture

Hi,

Please provide the amortization calculator. I need to make a few adjustments to it as I am not dealing with standard loans, but I am sure it could be helpful.

Thank you,
Andrei

Anonymous’s picture

I know this thread is really old but I came across this page and seeing your calculators on MortgageRiot I was wondering if you would still be willing to share the code to your calculators or if there was an official drupal module or release of these calculators someplace on the web.

Thank you so much for your help.

pbisla’s picture

Are you able to provide me with the code for the payment calculator please?

ailgm’s picture

There are quite a few financial calculator widgets available at this website. I was able to customize the colours to suit my site and then just paste the code they provided into a block (300px wide) -- they seem to work pretty well.
http://www.dollartimes.com/calculators/on-your-site/all-calculators.htm

ClearXS’s picture

http://drupal.org/project/views_calc - "Views Calc" simple calculations to views table; SUM, AVERAGE, COUNT, MIN, MAX, or AVG selected columns, spreadsheet-like plug in theme, custom dynamic fields in any view using SQL snippets like CONCAT('field_first_name', ' ', 'field_last_name') or DATE_FORMAT(node.created, '%m/%%d/%Y')

=> I think this module should be used for the calculations and basic presentation. The basics that might fail, should be mentioned on the project page as an issue. Developers who want it to be different, should try first to cummunicate and work together with the developer of this module?

THEN, for mortgage a.s.o. other calculations and features are necessary. Some for bookkeeping/accounting and all kinds of financial presentations. I think those should go in follow up modules, using a calculation(&presentation) API like Views Calc. I haven't looked if such modules exist yet?