ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Financial functions
  • Time unit
  • Managing errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
FinPeriodInterest (Function)
In french: FinIntérêtPériode
Calculates for a given period the amount of interests due for a loan paid off by fixed periodic payments with a fixed interest rate.
// Amount of interests due for the second year of a loan.
// This is a loan of $25000 with a 5% interest rate over 6 years.
ResInterestPeriod = FinPeriodInterest(25000, 5, 2, 6)
Syntax
<Result> = FinPeriodInterest([<Capital> [, <Rate> [, <Period> [, <Duration>]]]])
<Result>: Real or currency
Amount of interests. This amount can be:
  • negative: a payment must be made;
  • positive: a credit must be made.
<Capital>: Optional real or currency
Amount of the loan (0 by default).
<Rate>: Optional real
Interest rate, expressed in percentage (1 by default). For example, for a 5% rate, this parameter will be set to 5.
<Period>: Optional integer
Period over which the amount of interests must be calculated (1 by default).
<Duration>: Optional real
Number of periods for the loan (1 by default).
Remarks

Time unit

The calculations can be performed according to months or years. <Rate>, <Duration> and <Period> must correspond to the same unit.
Therefore, to get the amount of interests due on the 5th month of a 3-year loan, with a yearly interest rate of 5%, you can use:
  • units expressed in months (for a monthly payment for example):
    • <Duration> = 3 x 12 months = 36
    • <Period> = 5
    • <Rate> = 5% / 12
  • units expressed in years (for a yearly payment for example):
    • <Duration> = 3 years
    • <Period> = 5/36
    • <Rate> = 5%

Managing errors

Caution: FinPeriodInterest returns no error code. To determine if this function has generated errors, use FinError. To get more details on the error, use ErrorInfo with the errMessage constant.
Related Examples:
WD Loan Complete examples (WINDEV): WD Loan
[ + ] The power of WINDEV and the ease-of-use of WLanguage have allowed us to develop this application within a single day!

This example is used to simulate loans and to:
- calculate the amount of the monthly repayments from the amount borrowed
- calculate the amount that can be borrowed from a given monthly repayment
- calculate the income of an investment from a monthly payment

For each case, you have the ability to view the amortization table corresponding to your parameters.
The Financial functions Unit examples (WINDEV Mobile): The Financial functions
[ + ] Use of financial functions.
This example calculates the number of payments needed to pay back a loan, the total cost of a loan as well as the interests returned by an investment.
Component: wd290mat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help