Mortgage Calculator Tutorial
In this tutorial we will create a mortgage calculator which can calculate the fixed month payment and also the remaining loan balance. You can downlaod the category here . Always create the units in the following order: Constants, Variables, Conversions, then Results, because units can refer to other units only after they are created.
We need to create the following units:
Variables: Interest, Loan Amount, Years to Pay, Months Paid
Results: Monthly Payment, Remaining Loan
Create a new category by tapping Menu > Category > New Category. Enter: "Mortgage" in the Name field and tap OK.
1. Interest Unit
Create a new unit by tapping Menu > Unit > New Unit.
- Enter "Interest" in the Name field, tap Next button.
- Select Variable in the Type combo box since Interest is a variable, tap Next button.
- Enter "6" in Value/equation field, this will represent 6%, tap Next button.
- Enter "%" in the Suffix field, tap Next button.
- Select 2 in Precision combo box , now tap OK button.
We have now created a Interest unit. If you have made a mistake, tap Menu > Unit > Edit Unit to correct the mistake.
2. Loan Amount Unit
Now we need to create another variable unit for the loan amount. So, tap Menu > Unit > New Unit.
- Enter "Loan Amount " in the Name field, tap Next button.
- Select Variable in the Type combo box since Total people is a variable, tap Next button.
- Enter "100000" in Value/equation field, we are borrowing $100,000. Tap Next button.
- Enter "$" in the Prefix field, tap Next button.
- Select 0 in Precision combo box , now tap OK button.
3. Years to Pay
Now we need to create another variable unit to represent the term of the loan, in years. So, tap Menu > Unit > New Unit.
- Enter "Years to Pay" in the Name field, tap Next button.
- Select Variable in the Type combo box, tap Next button.
- Enter "25" in Value/equation field. Tap Next button.
- Since we do not require a prefix or suffix for this unit just tap Next button.
- Select 0 in Precision combo box , now tap OK button.
4. Months Paid
Now we need to create another variable unit to represent the term of the loan, in years. So, tap Menu > Unit > New Unit.
- Enter "Months Paid" in the Name field, tap Next button.
- Select Variable in the Type combo box, tap Next button.
- Enter "0" in Value/equation field. Tap Next button.
- Since we do not require a prefix or suffix for this unit just tap Next button.
- Select 0 in Precision combo box , now tap OK button.
5. Monthly Payment Unit
We should have something like the screen shot on the right. We have created all the variable units we need. To complete the mortgage calculator we need to add the result units, Monthly Payment and Remaining Loan. For Monthly Payment the formula used is:
L(c(1 + c)^n )/((1 + c)^n - 1)
Where L = Loan Amount, c = monthly interest rate, and n = term of the loan in months. NOTE: we will need to convert the [Interest] to a monthly rate, so c = [Interest]%/12. We will also need to convert [Years to Pay] to months, so n = [Years to Pay]*12. The Monthly Payment formula for CalcConvert is:
[Loan Amount]*(([Interest]%/12)*(1 + ([Interest]%/12))^([Years to Pay]*12))/((1 + ([Interest]%/12))^([Years to Pay]*12) - 1).
Tap Menu > Unit > New Unit.
- Enter "Monthly Payment" in the Name field, tap Next button.
- Select Result in the Type combo box, tap Next button.
- Enter "[Loan Amount]*(([Interest]%/12)*(1 + ([Interest]%/12))^([Years to Pay]*12))/((1 + ([Interest]%/12))^([Years to Pay]*12) - 1)" in the Value/equation field, tap Next button.
- Enter "$" in the Prefix field, tap Next button.
- Select 2 in Precision combo box , now tap OK button.
6. Remaining Loan Unit
We're nearly finished now. We just need to add one more unit to calculate the remaing loan balance. The remaining loan formula is:
L((1 + c) n - (1 + c)^p )/((1 + c)^n - 1)
Where L = Loan Amount, c = monthly interest rate, n = term of the loan in months, and p = months paid. NOTE: we will need to convert the [Interest] to a monthly rate, so c = [Interest]%/12. We will also need to convert [Years to Pay] to months, so n = [Years to Pay]*12. The Remaining Loan formula for CalcConvert is:
[Loan Amount]*((1 + ([interest]%/12))^([Years to Pay]*12) - (1 + ([Interest]%/12))^[Months Paid])/((1 + ([Interest]%/12))^([Years to Pay]*12) - 1).
Tap Menu > Unit > New Unit.
- Enter "Remaining Loan" in the Name field, tap Next button.
- Select Result in the Type combo box, tap Next button.
- Enter "[Loan Amount]*((1 + ([interest]%/12))^([Years to Pay]*12) - (1 + ([Interest]%/12))^[Months Paid])/((1 + ([Interest]%/12))^([Years to Pay]*12) - 1)" in the Formula field.
NOTE: It would have been easier to use [Total to Pay]/[Total People] but Result units cannot reference other Result units.
- Enter "$" in the Prefix field, tap Next button.
- Select 0 in the Precision combo box, now tap OK button.
Remember to Press Ctrl+Q to close CalcConvert, this will save the tip calculator. We now have a fully functional tip calculator. You can download the tip calculator category here .
Have a question about this tutorial or CalcConvert, view CalcConvert's forum.
|