I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
COST (GBP)
this unit 2.11
sub units 0.00
+
0
FinanceBanking

n Periods

Enumation of Payment point
Controller: CodeCogs

Interface

C++

NPeriods

 
doublenPeriodsdoublerate
doublepmtValue
doublepresentValue
doublefutureValue
Finance::Banking::PaymentPointtype = pp_EndOfPeriod )
Calculates the number of periods for an investment based on periodic, constant payments and a constant interest rate. The function works using the following equation:

Rearranged to give: where:
  • nper is the value we are trying to calculate, the number of periods,
  • fv is the <em>future value</em> of the investment,
  • pv is the <em>present value</em> of the investment,
  • pmt is the payment made each period.

Example 1

#include <iostream>
#include <codecogs/finance/banking/nperiods.h>  
 
int main(void)
{
  printf("nPeriods(0.01, -100, -1000, 10000, pp_StartOfPeriod) = %lf\n",
         Finance::Banking::nPeriods(0.01,
        -100, -1000, 10000, Finance::Banking::pp_StartOfPeriod));
 
  printf("nPeriods(0.01, -100, -1000, 10000, pp_EndOfPeriod) = %lf\n",
         Finance::Banking::nPeriods(0.01,
        -100, -1000, 10000, Finance::Banking::pp_EndOfPeriod));
 
  printf("nPeriods(0.01, -100, 1000, 0, pp_EndOfPeriod) = %lf\n",
         Finance::Banking::nPeriods(0.01,
        -100, 1000, 0,  Finance::Banking::pp_EndOfPeriod));
 
  return 1;
}
Output:
nPeriods(0.01, -100, -1000, 10000, pp_StartOfPeriod) = 59.673866
nPeriods(0.01, -100, -1000, 10000, pp_EndOfPeriod) = 60.082123
nPeriods(0.01, -100, 1000, 0, pp_EndOfPeriod) = 10.588644

constant over the life of the annuity.

amount that a series of future payments is worth right now.

beginning or the end of each period. It is set to either: pp_EndOfPeriod or pp_StartOfPeriod.

Parameters

rateThe interest rate per period of the investment.
pmtValueThe payment made each period. This value must remain
presentValueThe <em>present value</em> of the investment, or the lump-sum
futureValueThe <em>future value</em> of the investment.
typeA value indicating whether the payment is made at the

Returns

The number of periods of the investment.

Authors

James Warren (August 2005)
Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.


Other Documentation

This enumerate type describes the payment points, which can either occur at the begining or end of each periond, i.e
  • pp_EndOfPeriod
  • pp_StartOfPeriod
Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.