Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mortgage calculations.

Posted on 1999-07-01
13
Medium Priority
?
341 Views
Last Modified: 2010-04-06
Anyone have code for a mortgage calculator?
it should be able to do things like work out repayments if you input an interest rate, time period & amount.. and do table as well as decreasing loans (preferably).  + work out how much you can borrow based on income level.


Thanks for any help.
0
Comment
Question by:delphiexpert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1385732
<Ahem>

Take a look at http://ripplesoftware.webjump.com. You can download a late beta of Mortgage Planner from here. Its developed in Delphi... It will do all that you request in your question.

Give it a go and tell me what you think of it!

Of course if you are looking for code to integrate into another app then this won't help an awful lot...

Cheers,

Raymond.

0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385733
Yes I am actually looking for code for an app... so no, it won't help much.
But thanks anyway :)
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1385734
There is a math.pas file in delphi\source\rtl\sys directory which consist the code for some command financial functions including:

function Payment(Rate: Extended; NPeriods: Integer;  PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

function PeriodPayment(Rate: Extended; Period, NPeriods: Integer;  PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

function PresentValue(Rate: Extended; NPeriods: Integer;  Payment, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Let me know if this helps
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:delphiexpert
ID: 1385735
Looks promising.. however I don't have this math unit.  I've only got the standard version of Delphi 3, I guess it doesn't come with this version.
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1385736
give me your email address and I will send a copy to you
0
 
LVL 2

Accepted Solution

by:
kjteng earned 120 total points
ID: 1385737
The Delphi math unit is also download from:

http://marten.hypermart.net/units.htm
0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385738
Thanks, send it to emo@whoever.com & I'll take a look at it.
0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385739
Oh, don't bother - that URL will do nicely (when I loaded the page it didnt have the URL there :)
I'll take a look at it and see if it's suitable.  Thanks.

0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385740
OK call me stupid, but how do I use the routines to work out (for example) this:

Loan of $350,000 at an interest rate of 7%, over 25 years.
I need to know the payment for each period, ie its a table loan.
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1385741
remember to add math to your uses clause

procedure TForm1.Button1Click(Sender: TObject);
var NPeriods: Integer;
  ee, Rate, PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime;
begin
//  function Payment(Rate: Extended; NPeriods: Integer;
//  PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
  nPeriods := 25 * 12; // 25 * 12 months
  Rate := 0.07/12;   // interest per month
  PresentValue := 350000;
  FutureValue := 0;
  PaymentTime := ptEndOfPeriod; // pay at end of each month
  ee := Payment(Rate, NPeriods, PresentValue, FutureValue, PaymentTime);
  Showmessage(FloatToStr(ee));
end;


Your should get 2473.73
0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385742
OK, basically thats how I had it, except for the ending value.  Why is it 0, and not something else (the starting value for example)?
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1385743
Ending value = 0 mean by the end of  the 25 year the loan balance is 0.

If you are using this function for sinking fund investment, annuity or other similar computation, then the EndingValue = the money you would get back at the end of the investment period.

Hope this help
0
 
LVL 1

Author Comment

by:delphiexpert
ID: 1385744
Duh.  How stupid of me :)

Thanks for that, have the points, you deserved them.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question