ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Calculation\Financial Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Calculation\Financial:

Static Public Member Functions

static ACCRINT ( $issue, $firstInterest, $settlement, $rate, $parValue=1000, $frequency=1, $basis=0, $calcMethod=true)
 ACCRINT. More...
 
static ACCRINTM ($issue, $settlement, $rate, $parValue=1000, $basis=0)
 ACCRINTM. More...
 
static AMORDEGRC ($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis=0)
 AMORDEGRC. More...
 
static AMORLINC ($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis=0)
 AMORLINC. More...
 
static COUPDAYBS ($settlement, $maturity, $frequency, $basis=0)
 COUPDAYBS. More...
 
static COUPDAYS ($settlement, $maturity, $frequency, $basis=0)
 COUPDAYS. More...
 
static COUPDAYSNC ($settlement, $maturity, $frequency, $basis=0)
 COUPDAYSNC. More...
 
static COUPNCD ($settlement, $maturity, $frequency, $basis=0)
 COUPNCD. More...
 
static COUPNUM ($settlement, $maturity, $frequency, $basis=0)
 COUPNUM. More...
 
static COUPPCD ($settlement, $maturity, $frequency, $basis=0)
 COUPPCD. More...
 
static CUMIPMT ($rate, $nper, $pv, $start, $end, $type=0)
 CUMIPMT. More...
 
static CUMPRINC ($rate, $nper, $pv, $start, $end, $type=0)
 CUMPRINC. More...
 
static DB ($cost, $salvage, $life, $period, $month=12)
 DB. More...
 
static DDB ($cost, $salvage, $life, $period, $factor=2.0)
 DDB. More...
 
static DISC ($settlement, $maturity, $price, $redemption, $basis=0)
 DISC. More...
 
static DOLLARDE ($fractional_dollar=null, $fraction=0)
 DOLLARDE. More...
 
static DOLLARFR ($decimal_dollar=null, $fraction=0)
 DOLLARFR. More...
 
static EFFECT ($nominalRate=0, $periodsPerYear=0)
 EFFECT. More...
 
static FV ($rate=0, $nper=0, $pmt=0, $pv=0, $type=0)
 FV. More...
 
static FVSCHEDULE ($principal, $schedule)
 FVSCHEDULE. More...
 
static INTRATE ($settlement, $maturity, $investment, $redemption, $basis=0)
 INTRATE. More...
 
static IPMT ($rate, $per, $nper, $pv, $fv=0, $type=0)
 IPMT. More...
 
static IRR ($values, $guess=0.1)
 IRR. More...
 
static ISPMT (... $args)
 ISPMT. More...
 
static MIRR ($values, $finance_rate, $reinvestment_rate)
 MIRR. More...
 
static NOMINAL ($effectiveRate=0, $periodsPerYear=0)
 NOMINAL. More...
 
static NPER ($rate=0, $pmt=0, $pv=0, $fv=0, $type=0)
 NPER. More...
 
static NPV (... $args)
 NPV. More...
 
static PDURATION ($rate=0, $pv=0, $fv=0)
 PDURATION. More...
 
static PMT ($rate=0, $nper=0, $pv=0, $fv=0, $type=0)
 PMT. More...
 
static PPMT ($rate, $per, $nper, $pv, $fv=0, $type=0)
 PPMT. More...
 
static PRICE ($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis=0)
 PRICE. More...
 
static PRICEDISC ($settlement, $maturity, $discount, $redemption, $basis=0)
 PRICEDISC. More...
 
static PRICEMAT ($settlement, $maturity, $issue, $rate, $yield, $basis=0)
 PRICEMAT. More...
 
static PV ($rate=0, $nper=0, $pmt=0, $fv=0, $type=0)
 PV. More...
 
static RATE ($nper, $pmt, $pv, $fv=0.0, $type=0, $guess=0.1)
 RATE. More...
 
static RECEIVED ($settlement, $maturity, $investment, $discount, $basis=0)
 RECEIVED. More...
 
static RRI ($nper=0, $pv=0, $fv=0)
 RRI. More...
 
static SLN ($cost, $salvage, $life)
 SLN. More...
 
static SYD ($cost, $salvage, $life, $period)
 SYD. More...
 
static TBILLEQ ($settlement, $maturity, $discount)
 TBILLEQ. More...
 
static TBILLPRICE ($settlement, $maturity, $discount)
 TBILLPRICE. More...
 
static TBILLYIELD ($settlement, $maturity, $price)
 TBILLYIELD. More...
 
static XIRR ($values, $dates, $guess=0.1)
 XIRR. More...
 
static XNPV ($rate, $values, $dates)
 XNPV. More...
 
static YIELDDISC ($settlement, $maturity, $price, $redemption, $basis=0)
 YIELDDISC. More...
 
static YIELDMAT ($settlement, $maturity, $issue, $rate, $price, $basis=0)
 YIELDMAT. More...
 

Data Fields

const FINANCIAL_MAX_ITERATIONS = 128
 
const FINANCIAL_PRECISION = 1.0e-08
 

Detailed Description

Deprecated:
1.18.0

Definition at line 16 of file Financial.php.

Member Function Documentation

◆ ACCRINT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINT (   $issue,
  $firstInterest,
  $settlement,
  $rate,
  $parValue = 1000,
  $frequency = 1,
  $basis = 0,
  $calcMethod = true 
)
static

ACCRINT.

Returns the accrued interest for a security that pays periodic interest.

Excel Function: ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis][,calc_method])

1.18.0

See also
Financial::periodic() Use the periodic() method in the Financial class instead
Parameters
mixed$issuethe security's issue date
mixed$firstInterestthe security's first interest date
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$ratethe security's annual coupon rate
mixed$parValueThe security's par value. If you omit par, ACCRINT uses $1,000.
mixed$frequencyThe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
mixed$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
mixed$calcMethodIf true, use Issue to Settlement If false, use FirstInterest to Settlement
Returns
float|string Result, or a string containing an error

Definition at line 60 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest\periodic().

69  {
71  $issue,
72  $firstInterest,
73  $settlement,
74  $rate,
75  $parValue,
76  $frequency,
77  $basis,
78  $calcMethod
79  );
80  }
static periodic( $issue, $firstInterest, $settlement, $rate, $parValue=1000, $frequency=FinancialConstants::FREQUENCY_ANNUAL, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD, $calcMethod=self::ACCRINT_CALCMODE_ISSUE_TO_SETTLEMENT)
ACCRINT.
+ Here is the call graph for this function:

◆ ACCRINTM()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::ACCRINTM (   $issue,
  $settlement,
  $rate,
  $parValue = 1000,
  $basis = 0 
)
static

ACCRINTM.

Returns the accrued interest for a security that pays interest at maturity.

Excel Function: ACCRINTM(issue,settlement,rate[,par[,basis]])

1.18.0

See also
Financial::atMaturity() Use the atMaturity() method in the Financial class instead
Parameters
mixed$issueThe security's issue date
mixed$settlementThe security's settlement (or maturity) date
mixed$rateThe security's annual coupon rate
mixed$parValueThe security's par value. If you omit par, ACCRINT uses $1,000.
mixed$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 109 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\AccruedInterest\atMaturity().

110  {
111  return Securities\AccruedInterest::atMaturity($issue, $settlement, $rate, $parValue, $basis);
112  }
static atMaturity( $issue, $settlement, $rate, $parValue=1000, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
ACCRINTM.
+ Here is the call graph for this function:

◆ AMORDEGRC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORDEGRC (   $cost,
  $purchased,
  $firstPeriod,
  $salvage,
  $period,
  $rate,
  $basis = 0 
)
static

AMORDEGRC.

Returns the depreciation for each accounting period. This function is provided for the French accounting system. If an asset is purchased in the middle of the accounting period, the prorated depreciation is taken into account. The function is similar to AMORLINC, except that a depreciation coefficient is applied in the calculation depending on the life of the assets. This function will return the depreciation until the last period of the life of the assets or until the cumulated value of depreciation is greater than the cost of the assets minus the salvage value.

Excel Function: AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

1.18.0

See also
Financial::AMORDEGRC() Use the AMORDEGRC() method in the Financial class instead
Parameters
float$costThe cost of the asset
mixed$purchasedDate of the purchase of the asset
mixed$firstPeriodDate of the end of the first period
mixed$salvageThe salvage value at the end of the life of the asset
float$periodThe period
float$rateRate of depreciation
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string (string containing the error type if there is an error)

Definition at line 149 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization\AMORDEGRC().

150  {
151  return Amortization::AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis);
152  }
static AMORDEGRC( $cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
AMORDEGRC.
+ Here is the call graph for this function:

◆ AMORLINC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::AMORLINC (   $cost,
  $purchased,
  $firstPeriod,
  $salvage,
  $period,
  $rate,
  $basis = 0 
)
static

AMORLINC.

Returns the depreciation for each accounting period. This function is provided for the French accounting system. If an asset is purchased in the middle of the accounting period, the prorated depreciation is taken into account.

Excel Function: AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])

1.18.0

See also
Financial::AMORLINC() Use the AMORLINC() method in the Financial class instead
Parameters
float$costThe cost of the asset
mixed$purchasedDate of the purchase of the asset
mixed$firstPeriodDate of the end of the first period
mixed$salvageThe salvage value at the end of the life of the asset
float$periodThe period
float$rateRate of depreciation
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string (string containing the error type if there is an error)

Definition at line 184 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Amortization\AMORLINC().

185  {
186  return Amortization::AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis);
187  }
static AMORLINC( $cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
AMORLINC.
+ Here is the call graph for this function:

◆ COUPDAYBS()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYBS (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPDAYBS.

Returns the number of days from the beginning of the coupon period to the settlement date.

Excel Function: COUPDAYBS(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPDAYBS() Use the COUPDAYBS() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
int$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string

Definition at line 221 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPDAYBS().

222  {
223  return Coupons::COUPDAYBS($settlement, $maturity, $frequency, $basis);
224  }
static COUPDAYBS( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPDAYBS.
Definition: Coupons.php:44
+ Here is the call graph for this function:

◆ COUPDAYS()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYS (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPDAYS.

Returns the number of days in the coupon period that contains the settlement date.

Excel Function: COUPDAYS(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPDAYS() Use the COUPDAYS() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string

Definition at line 258 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPDAYS().

259  {
260  return Coupons::COUPDAYS($settlement, $maturity, $frequency, $basis);
261  }
static COUPDAYS( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPDAYS.
Definition: Coupons.php:107
+ Here is the call graph for this function:

◆ COUPDAYSNC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPDAYSNC (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPDAYSNC.

Returns the number of days from the settlement date to the next coupon date.

Excel Function: COUPDAYSNC(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPDAYSNC() Use the COUPDAYSNC() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string

Definition at line 295 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPDAYSNC().

296  {
297  return Coupons::COUPDAYSNC($settlement, $maturity, $frequency, $basis);
298  }
static COUPDAYSNC( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPDAYSNC.
Definition: Coupons.php:178
+ Here is the call graph for this function:

◆ COUPNCD()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNCD (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPNCD.

Returns the next coupon date after the settlement date.

Excel Function: COUPNCD(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPNCD() Use the COUPNCD() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, depending on the value of the ReturnDateType flag

Definition at line 333 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPNCD().

334  {
335  return Coupons::COUPNCD($settlement, $maturity, $frequency, $basis);
336  }
static COUPNCD( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPNCD.
Definition: Coupons.php:243
+ Here is the call graph for this function:

◆ COUPNUM()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPNUM (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPNUM.

Returns the number of coupons payable between the settlement date and maturity date, rounded up to the nearest whole coupon.

Excel Function: COUPNUM(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPNUM() Use the COUPNUM() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
int|string

Definition at line 371 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPNUM().

372  {
373  return Coupons::COUPNUM($settlement, $maturity, $frequency, $basis);
374  }
static COUPNUM( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPNUM.
Definition: Coupons.php:297
+ Here is the call graph for this function:

◆ COUPPCD()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::COUPPCD (   $settlement,
  $maturity,
  $frequency,
  $basis = 0 
)
static

COUPPCD.

Returns the previous coupon date before the settlement date.

Excel Function: COUPPCD(settlement,maturity,frequency[,basis])

1.18.0

See also
Financial::COUPPCD() Use the COUPPCD() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$frequencythe number of coupon payments per year. Valid frequency values are: 1 Annual 2 Semi-Annual 4 Quarterly
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, depending on the value of the ReturnDateType flag

Definition at line 409 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Coupons\COUPPCD().

410  {
411  return Coupons::COUPPCD($settlement, $maturity, $frequency, $basis);
412  }
static COUPPCD( $settlement, $maturity, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
COUPPCD.
Definition: Coupons.php:357
+ Here is the call graph for this function:

◆ CUMIPMT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMIPMT (   $rate,
  $nper,
  $pv,
  $start,
  $end,
  $type = 0 
)
static

CUMIPMT.

Returns the cumulative interest paid on a loan between the start and end periods.

Excel Function: CUMIPMT(rate,nper,pv,start,end[,type])

1.18.0

See also
Financial::interest() Use the interest() method in the Financial class instead
Parameters
float$rateThe Interest rate
int$nperThe total number of payment periods
float$pvPresent Value
int$startThe first period in the calculation. Payment periods are numbered beginning with 1.
int$endthe last period in the calculation
int$typeA number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.
Returns
float|string

Definition at line 439 of file Financial.php.

References $end, $start, $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative\interest().

440  {
442  }
$type
$start
Definition: bench.php:8
static interest( $rate, $periods, $presentValue, $start, $end, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
CUMIPMT.
Definition: Cumulative.php:32
+ Here is the call graph for this function:

◆ CUMPRINC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::CUMPRINC (   $rate,
  $nper,
  $pv,
  $start,
  $end,
  $type = 0 
)
static

CUMPRINC.

Returns the cumulative principal paid on a loan between the start and end periods.

Excel Function: CUMPRINC(rate,nper,pv,start,end[,type])

1.18.0

See also
Financial::principal() Use the principal() method in the Financial class instead
Parameters
float$rateThe Interest rate
int$nperThe total number of payment periods
float$pvPresent Value
int$startThe first period in the calculation. Payment periods are numbered beginning with 1.
int$endthe last period in the calculation
int$typeA number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.
Returns
float|string

Definition at line 469 of file Financial.php.

References $end, $start, $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Cumulative\principal().

470  {
472  }
$type
static principal( $rate, $periods, $presentValue, $start, $end, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
CUMPRINC.
Definition: Cumulative.php:97
$start
Definition: bench.php:8
+ Here is the call graph for this function:

◆ DB()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::DB (   $cost,
  $salvage,
  $life,
  $period,
  $month = 12 
)
static

DB.

Returns the depreciation of an asset for a specified period using the fixed-declining balance method. This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the depreciation already deducted from the initial cost.

Excel Function: DB(cost,salvage,life,period[,month])

1.18.0

See also
Financial::DB() Use the DB() method in the Financial class instead
Parameters
float$costInitial cost of the asset
float$salvageValue at the end of the depreciation. (Sometimes called the salvage value of the asset)
int$lifeNumber of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
int$periodThe period for which you want to calculate the depreciation. Period must use the same units as life.
int$monthNumber of months in the first year. If month is omitted, it defaults to 12.
Returns
float|string

Definition at line 504 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation\DB().

505  {
506  return Depreciation::DB($cost, $salvage, $life, $period, $month);
507  }
static DB($cost, $salvage, $life, $period, $month=12)
DB.
+ Here is the call graph for this function:

◆ DDB()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::DDB (   $cost,
  $salvage,
  $life,
  $period,
  $factor = 2.0 
)
static

DDB.

Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.

Excel Function: DDB(cost,salvage,life,period[,factor])

1.18.0

See also
Financial::DDB() Use the DDB() method in the Financial class instead
Parameters
float$costInitial cost of the asset
float$salvageValue at the end of the depreciation. (Sometimes called the salvage value of the asset)
int$lifeNumber of periods over which the asset is depreciated. (Sometimes called the useful life of the asset)
int$periodThe period for which you want to calculate the depreciation. Period must use the same units as life.
float$factorThe rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).
Returns
float|string

Definition at line 536 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation\DDB().

537  {
538  return Depreciation::DDB($cost, $salvage, $life, $period, $factor);
539  }
static DDB($cost, $salvage, $life, $period, $factor=2.0)
DDB.
+ Here is the call graph for this function:

◆ DISC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::DISC (   $settlement,
  $maturity,
  $price,
  $redemption,
  $basis = 0 
)
static

DISC.

Returns the discount rate for a security.

Excel Function: DISC(settlement,maturity,price,redemption[,basis])

1.18.0

See also
Financial::discount() Use the discount() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
int$priceThe security's price per $100 face value
int$redemptionThe security's redemption value per $100 face value
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string

Definition at line 570 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates\discount().

571  {
572  return Financial\Securities\Rates::discount($settlement, $maturity, $price, $redemption, $basis);
573  }
static discount( $settlement, $maturity, $price, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
DISC.
Definition: Rates.php:36
+ Here is the call graph for this function:

◆ DOLLARDE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARDE (   $fractional_dollar = null,
  $fraction = 0 
)
static

DOLLARDE.

Converts a dollar price expressed as an integer part and a fraction part into a dollar price expressed as a decimal number. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARDE(fractional_dollar,fraction)

1.18.0

See also
Financial::decimal() Use the decimal() method in the Financial class instead
Parameters
float$fractional_dollarFractional Dollar
int$fractionFraction
Returns
float|string

Definition at line 595 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar\decimal().

596  {
597  return Dollar::decimal($fractional_dollar, $fraction);
598  }
static decimal($fractionalDollar=null, $fraction=0)
DOLLARDE.
Definition: Dollar.php:41
+ Here is the call graph for this function:

◆ DOLLARFR()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::DOLLARFR (   $decimal_dollar = null,
  $fraction = 0 
)
static

DOLLARFR.

Converts a dollar price expressed as a decimal number into a dollar price expressed as a fraction. Fractional dollar numbers are sometimes used for security prices.

Excel Function: DOLLARFR(decimal_dollar,fraction)

1.18.0

See also
Financial::fractional() Use the fractional() method in the Financial class instead
Parameters
float$decimal_dollarDecimal Dollar
int$fractionFraction
Returns
float|string

Definition at line 620 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Dollar\fractional().

621  {
622  return Dollar::fractional($decimal_dollar, $fraction);
623  }
static fractional($decimalDollar=null, $fraction=0)
DOLLARFR.
Definition: Dollar.php:77
+ Here is the call graph for this function:

◆ EFFECT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::EFFECT (   $nominalRate = 0,
  $periodsPerYear = 0 
)
static

EFFECT.

Returns the effective interest rate given the nominal rate and the number of compounding payments per year.

Excel Function: EFFECT(nominal_rate,npery)

1.18.0

See also
Financial::effective() Use the effective() method in the Financial class instead
Parameters
float$nominalRateNominal interest rate
int$periodsPerYearNumber of compounding payments per year
Returns
float|string

Definition at line 644 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate\effective().

645  {
646  return Financial\InterestRate::effective($nominalRate, $periodsPerYear);
647  }
static effective($nominalRate=0, $periodsPerYear=0)
EFFECT.
+ Here is the call graph for this function:

◆ FV()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::FV (   $rate = 0,
  $nper = 0,
  $pmt = 0,
  $pv = 0,
  $type = 0 
)
static

FV.

Returns the Future Value of a cash flow with constant payments and interest rate (annuities).

Excel Function: FV(rate,nper,pmt[,pv[,type]])

1.18.0

See also
Financial::futureValue() Use the futureValue() method in the Financial class instead
Parameters
float$rateThe interest rate per period
int$nperTotal number of payment periods in an annuity
float$pmtThe payment made each period: it cannot change over the life of the annuity. Typically, pmt contains principal and interest but no other fees or taxes.
float$pvpresent Value, or the lump-sum amount that a series of future payments is worth right now
int$typeA number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.
Returns
float|string

Definition at line 675 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\futureValue().

676  {
677  return Financial\CashFlow\Constant\Periodic::futureValue($rate, $nper, $pmt, $pv, $type);
678  }
static futureValue( $rate, $numberOfPeriods, $payment=0.0, $presentValue=0.0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
FV.
Definition: Periodic.php:33
$type
+ Here is the call graph for this function:

◆ FVSCHEDULE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::FVSCHEDULE (   $principal,
  $schedule 
)
static

FVSCHEDULE.

Returns the future value of an initial principal after applying a series of compound interest rates. Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate.

Excel Function: FVSCHEDULE(principal,schedule)

1.18.0

See also
Financial::futureValue() Use the futureValue() method in the Financial class instead
Parameters
float$principalthe present value
float[]$schedule an array of interest rates to apply
Returns
float|string

Definition at line 699 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single\futureValue().

700  {
701  return Financial\CashFlow\Single::futureValue($principal, $schedule);
702  }
static futureValue($principal, $schedule)
FVSCHEDULE.
Definition: Single.php:24
+ Here is the call graph for this function:

◆ INTRATE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::INTRATE (   $settlement,
  $maturity,
  $investment,
  $redemption,
  $basis = 0 
)
static

INTRATE.

Returns the interest rate for a fully invested security.

Excel Function: INTRATE(settlement,maturity,investment,redemption[,basis])

1.18.0

See also
Financial::interest() Use the interest() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
int$investmentthe amount invested in the security
int$redemptionthe amount to be received at maturity
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string

Definition at line 733 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates\interest().

734  {
735  return Financial\Securities\Rates::interest($settlement, $maturity, $investment, $redemption, $basis);
736  }
static interest( $settlement, $maturity, $investment, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
INTRATE.
Definition: Rates.php:99
+ Here is the call graph for this function:

◆ IPMT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::IPMT (   $rate,
  $per,
  $nper,
  $pv,
  $fv = 0,
  $type = 0 
)
static

IPMT.

Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.

Excel Function: IPMT(rate,per,nper,pv[,fv][,type])

1.18.0

See also
Financial::payment() Use the payment() method in the Financial class instead
Parameters
float$rateInterest rate per period
int$perPeriod for which we want to find the interest
int$nperNumber of periods
float$pvPresent Value
float$fvFuture Value
int$typePayment type: 0 = at the end of each period, 1 = at the beginning of each period
Returns
float|string

Definition at line 761 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest\payment().

762  {
763  return Financial\CashFlow\Constant\Periodic\Interest::payment($rate, $per, $nper, $pv, $fv, $type);
764  }
$type
static payment( $interestRate, $period, $numberOfPeriods, $presentValue, $futureValue=0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
IPMT.
Definition: Interest.php:34
+ Here is the call graph for this function:

◆ IRR()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::IRR (   $values,
  $guess = 0.1 
)
static

IRR.

Returns the internal rate of return for a series of cash flows represented by the numbers in values. These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received for an investment consisting of payments (negative values) and income (positive values) that occur at regular periods.

Excel Function: IRR(values[,guess])

1.18.0

See also
Financial::rate() Use the rate() method in the Financial class instead
Parameters
mixed$valuesAn array or a reference to cells that contain numbers for which you want to calculate the internal rate of return. Values must contain at least one positive value and one negative value to calculate the internal rate of return.
mixed$guessA number that you guess is close to the result of IRR
Returns
float|string

Definition at line 791 of file Financial.php.

References $values, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic\rate().

+ Here is the call graph for this function:

◆ ISPMT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::ISPMT (   $args)
static

ISPMT.

Returns the interest payment for an investment based on an interest rate and a constant payment schedule.

Excel Function: =ISPMT(interest_rate, period, number_payments, pv)

1.18.0

See also
Financial::schedulePayment() Use the schedulePayment() method in the Financial class instead

interest_rate is the interest rate for the investment

period is the period to calculate the interest rate. It must be betweeen 1 and number_payments.

number_payments is the number of payments for the annuity

pv is the loan amount or present value of the payments

Definition at line 817 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest\schedulePayment().

818  {
820  }
static schedulePayment($interestRate, $period, $numberOfPeriods, $principleRemaining)
ISPMT.
Definition: Interest.php:91
+ Here is the call graph for this function:

◆ MIRR()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::MIRR (   $values,
  $finance_rate,
  $reinvestment_rate 
)
static

MIRR.

Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both the cost of the investment and the interest received on reinvestment of cash.

Excel Function: MIRR(values,finance_rate, reinvestment_rate)

1.18.0

See also
Financial::modifiedRate() Use the modifiedRate() method in the Financial class instead
Parameters
mixed$valuesAn array or a reference to cells that contain a series of payments and income occurring at regular intervals. Payments are negative value, income is positive values.
mixed$finance_rateThe interest rate you pay on the money used in the cash flows
mixed$reinvestment_rateThe interest rate you receive on the cash flows as you reinvest them
Returns
float|string Result, or a string containing an error

Definition at line 844 of file Financial.php.

References $values, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic\modifiedRate().

845  {
846  return Financial\CashFlow\Variable\Periodic::modifiedRate($values, $finance_rate, $reinvestment_rate);
847  }
$values
static modifiedRate($values, $financeRate, $reinvestmentRate)
MIRR.
Definition: Periodic.php:101
+ Here is the call graph for this function:

◆ NOMINAL()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::NOMINAL (   $effectiveRate = 0,
  $periodsPerYear = 0 
)
static

NOMINAL.

Returns the nominal interest rate given the effective rate and the number of compounding payments per year.

Excel Function: NOMINAL(effect_rate, npery)

1.18.0

See also
Financial::nominal() Use the nominal() method in the Financial class instead
Parameters
float$effectiveRateEffective interest rate
int$periodsPerYearNumber of compounding payments per year
Returns
float|string Result, or a string containing an error

Definition at line 867 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\InterestRate\nominal().

868  {
869  return InterestRate::nominal($effectiveRate, $periodsPerYear);
870  }
static nominal($effectiveRate=0, $periodsPerYear=0)
NOMINAL.
+ Here is the call graph for this function:

◆ NPER()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::NPER (   $rate = 0,
  $pmt = 0,
  $pv = 0,
  $fv = 0,
  $type = 0 
)
static

NPER.

Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.

1.18.0

Parameters
float$rateInterest rate per period
int$pmtPeriodic payment (annuity)
float$pvPresent Value
float$fvFuture Value
int$typePayment type: 0 = at the end of each period, 1 = at the beginning of each period
Returns
float|string Result, or a string containing an error
See also
Financial::periods() Use the periods() method in the Financial class instead

Definition at line 890 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\periods().

891  {
892  return Financial\CashFlow\Constant\Periodic::periods($rate, $pmt, $pv, $fv, $type);
893  }
$type
static periods( $rate, $payment, $presentValue, $futureValue=0.0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
NPER.
Definition: Periodic.php:116
+ Here is the call graph for this function:

◆ NPV()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::NPV (   $args)
static

NPV.

Returns the Net Present Value of a cash flow series given a discount rate.

1.18.0

See also
Financial::presentValue() Use the presentValue() method in the Financial class instead
Returns
float

Definition at line 907 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\Periodic\presentValue().

+ Here is the call graph for this function:

◆ PDURATION()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PDURATION (   $rate = 0,
  $pv = 0,
  $fv = 0 
)
static

PDURATION.

Calculates the number of periods required for an investment to reach a specified value.

1.18.0

See also
Financial::periods() Use the periods() method in the Financial class instead
Parameters
float$rateInterest rate per period
float$pvPresent Value
float$fvFuture Value
Returns
float|string Result, or a string containing an error

Definition at line 928 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single\periods().

929  {
930  return Financial\CashFlow\Single::periods($rate, $pv, $fv);
931  }
static periods($rate, $presentValue, $futureValue)
PDURATION.
Definition: Single.php:54
+ Here is the call graph for this function:

◆ PMT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PMT (   $rate = 0,
  $nper = 0,
  $pv = 0,
  $fv = 0,
  $type = 0 
)
static

PMT.

Returns the constant payment (annuity) for a cash flow with a constant interest rate.

1.18.0

See also
Financial::annuity() Use the annuity() method in the Financial class instead
Parameters
float$rateInterest rate per period
int$nperNumber of periods
float$pvPresent Value
float$fvFuture Value
int$typePayment type: 0 = at the end of each period, 1 = at the beginning of each period
Returns
float|string Result, or a string containing an error

Definition at line 951 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments\annuity().

952  {
953  return Financial\CashFlow\Constant\Periodic\Payments::annuity($rate, $nper, $pv, $fv, $type);
954  }
$type
static annuity( $interestRate, $numberOfPeriods, $presentValue, $futureValue=0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
PMT.
Definition: Payments.php:25
+ Here is the call graph for this function:

◆ PPMT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PPMT (   $rate,
  $per,
  $nper,
  $pv,
  $fv = 0,
  $type = 0 
)
static

PPMT.

Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.

1.18.0

See also
Financial::interestPayment() Use the interestPayment() method in the Financial class instead
Parameters
float$rateInterest rate per period
int$perPeriod for which we want to find the interest
int$nperNumber of periods
float$pvPresent Value
float$fvFuture Value
int$typePayment type: 0 = at the end of each period, 1 = at the beginning of each period
Returns
float|string Result, or a string containing an error

Definition at line 976 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Payments\interestPayment().

977  {
978  return Financial\CashFlow\Constant\Periodic\Payments::interestPayment($rate, $per, $nper, $pv, $fv, $type);
979  }
$type
static interestPayment( $interestRate, $period, $numberOfPeriods, $presentValue, $futureValue=0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
PPMT.
Definition: Payments.php:72
+ Here is the call graph for this function:

◆ PRICE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICE (   $settlement,
  $maturity,
  $rate,
  $yield,
  $redemption,
  $frequency,
  $basis = 0 
)
static

PRICE.

Returns the price per $100 face value of a security that pays periodic interest.

1.18.0

See also
Financial::price() Use the price() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
float$ratethe security's annual coupon rate
float$yieldthe security's annual yield
float$redemptionThe number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
int$frequency
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1012 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price\price().

1013  {
1014  return Securities\Price::price($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
1015  }
static price( $settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
PRICE.
Definition: Price.php:40
+ Here is the call graph for this function:

◆ PRICEDISC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEDISC (   $settlement,
  $maturity,
  $discount,
  $redemption,
  $basis = 0 
)
static

PRICEDISC.

Returns the price per $100 face value of a discounted security.

1.18.0

See also
Financial::priceDiscounted() Use the priceDiscounted() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
int$discountThe security's discount rate
int$redemptionThe security's redemption value per $100 face value
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1043 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price\priceDiscounted().

1044  {
1045  return Securities\Price::priceDiscounted($settlement, $maturity, $discount, $redemption, $basis);
1046  }
static priceDiscounted( $settlement, $maturity, $discount, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
PRICEDISC.
Definition: Price.php:111
+ Here is the call graph for this function:

◆ PRICEMAT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PRICEMAT (   $settlement,
  $maturity,
  $issue,
  $rate,
  $yield,
  $basis = 0 
)
static

PRICEMAT.

Returns the price per $100 face value of a security that pays interest at maturity.

1.18.0

See also
Financial::priceAtMaturity() Use the priceAtMaturity() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$issueThe security's issue date
int$rateThe security's interest rate at date of issue
int$yieldThe security's annual yield
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1075 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price\priceAtMaturity().

1076  {
1077  return Securities\Price::priceAtMaturity($settlement, $maturity, $issue, $rate, $yield, $basis);
1078  }
static priceAtMaturity( $settlement, $maturity, $issue, $rate, $yield, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
PRICEMAT.
Definition: Price.php:168
+ Here is the call graph for this function:

◆ PV()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::PV (   $rate = 0,
  $nper = 0,
  $pmt = 0,
  $fv = 0,
  $type = 0 
)
static

PV.

Returns the Present Value of a cash flow with constant payments and interest rate (annuities).

1.18.0

See also
Financial::presentValue() Use the presentValue() method in the Financial class instead
Parameters
float$rateInterest rate per period
int$nperNumber of periods
float$pmtPeriodic payment (annuity)
float$fvFuture Value
int$typePayment type: 0 = at the end of each period, 1 = at the beginning of each period
Returns
float|string Result, or a string containing an error

Definition at line 1098 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\presentValue().

1099  {
1100  return Financial\CashFlow\Constant\Periodic::presentValue($rate, $nper, $pmt, $fv, $type);
1101  }
static presentValue( $rate, $numberOfPeriods, $payment=0.0, $futureValue=0.0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD)
PV.
Definition: Periodic.php:72
$type
+ Here is the call graph for this function:

◆ RATE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::RATE (   $nper,
  $pmt,
  $pv,
  $fv = 0.0,
  $type = 0,
  $guess = 0.1 
)
static

RATE.

Returns the interest rate per period of an annuity. RATE is calculated by iteration and can have zero or more solutions. If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, RATE returns the #NUM! error value.

Excel Function: RATE(nper,pmt,pv[,fv[,type[,guess]]])

1.18.0

See also
Financial::rate() Use the rate() method in the Financial class instead
Parameters
mixed$nperThe total number of payment periods in an annuity
mixed$pmtThe payment made each period and cannot change over the life of the annuity. Typically, pmt includes principal and interest but no other fees or taxes.
mixed$pvThe present value - the total amount that a series of future payments is worth now
mixed$fvThe future value, or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (the future value of a loan, for example, is 0).
mixed$typeA number 0 or 1 and indicates when payments are due: 0 or omitted At the end of the period. 1 At the beginning of the period.
mixed$guessYour guess for what the rate will be. If you omit guess, it is assumed to be 10 percent.
Returns
float|string

Definition at line 1137 of file Financial.php.

References $type, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Constant\Periodic\Interest\rate().

1138  {
1139  return Financial\CashFlow\Constant\Periodic\Interest::rate($nper, $pmt, $pv, $fv, $type, $guess);
1140  }
$type
static rate( $numberOfPeriods, $payment, $presentValue, $futureValue=0.0, $type=FinancialConstants::PAYMENT_END_OF_PERIOD, $guess=0.1)
RATE.
Definition: Interest.php:155
+ Here is the call graph for this function:

◆ RECEIVED()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::RECEIVED (   $settlement,
  $maturity,
  $investment,
  $discount,
  $basis = 0 
)
static

RECEIVED.

Returns the amount received at maturity for a fully invested Security.

1.18.0

See also
Financial::received() Use the received() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$investmentThe amount invested in the security
mixed$discountThe security's discount rate
mixed$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1168 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Price\received().

1169  {
1170  return Financial\Securities\Price::received($settlement, $maturity, $investment, $discount, $basis);
1171  }
static received( $settlement, $maturity, $investment, $discount, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
RECEIVED.
Definition: Price.php:246
+ Here is the call graph for this function:

◆ RRI()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::RRI (   $nper = 0,
  $pv = 0,
  $fv = 0 
)
static

RRI.

Calculates the interest rate required for an investment to grow to a specified future value .

1.18.0

See also
Financial::interestRate() Use the interestRate() method in the Financial class instead
Parameters
float$nperThe number of periods over which the investment is made
float$pvPresent Value
float$fvFuture Value
Returns
float|string Result, or a string containing an error

Definition at line 1189 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Single\interestRate().

1190  {
1191  return Financial\CashFlow\Single::interestRate($nper, $pv, $fv);
1192  }
static interestRate($periods=0.0, $presentValue=0.0, $futureValue=0.0)
RRI.
Definition: Single.php:87
+ Here is the call graph for this function:

◆ SLN()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::SLN (   $cost,
  $salvage,
  $life 
)
static

SLN.

Returns the straight-line depreciation of an asset for one period

1.18.0

See also
Financial::SLN() Use the SLN() method in the Financial class instead
Parameters
mixed$costInitial cost of the asset
mixed$salvageValue at the end of the depreciation
mixed$lifeNumber of periods over which the asset is depreciated
Returns
float|string Result, or a string containing an error

Definition at line 1210 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation\SLN().

1211  {
1212  return Depreciation::SLN($cost, $salvage, $life);
1213  }
+ Here is the call graph for this function:

◆ SYD()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::SYD (   $cost,
  $salvage,
  $life,
  $period 
)
static

SYD.

Returns the sum-of-years' digits depreciation of an asset for a specified period.

1.18.0

See also
Financial::SYD() Use the SYD() method in the Financial class instead
Parameters
mixed$costInitial cost of the asset
mixed$salvageValue at the end of the depreciation
mixed$lifeNumber of periods over which the asset is depreciated
mixed$periodPeriod
Returns
float|string Result, or a string containing an error

Definition at line 1232 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Depreciation\SYD().

1233  {
1234  return Depreciation::SYD($cost, $salvage, $life, $period);
1235  }
static SYD($cost, $salvage, $life, $period)
SYD.
+ Here is the call graph for this function:

◆ TBILLEQ()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLEQ (   $settlement,
  $maturity,
  $discount 
)
static

TBILLEQ.

Returns the bond-equivalent yield for a Treasury bill.

1.18.0

See also
Financial::bondEquivalentYield() Use the bondEquivalentYield() method in the Financial class instead
Parameters
mixed$settlementThe Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed$maturityThe Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int$discountThe Treasury bill's discount rate
Returns
float|string Result, or a string containing an error

Definition at line 1256 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill\bondEquivalentYield().

1257  {
1258  return TreasuryBill::bondEquivalentYield($settlement, $maturity, $discount);
1259  }
static bondEquivalentYield($settlement, $maturity, $discount)
TBILLEQ.
+ Here is the call graph for this function:

◆ TBILLPRICE()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLPRICE (   $settlement,
  $maturity,
  $discount 
)
static

TBILLPRICE.

Returns the price per $100 face value for a Treasury bill.

1.18.0

See also
Financial::price() Use the price() method in the Financial class instead
Parameters
mixed$settlementThe Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed$maturityThe Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int$discountThe Treasury bill's discount rate
Returns
float|string Result, or a string containing an error

Definition at line 1280 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill\price().

1281  {
1282  return TreasuryBill::price($settlement, $maturity, $discount);
1283  }
static price($settlement, $maturity, $discount)
TBILLPRICE.
+ Here is the call graph for this function:

◆ TBILLYIELD()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::TBILLYIELD (   $settlement,
  $maturity,
  $price 
)
static

TBILLYIELD.

Returns the yield for a Treasury bill.

1.18.0

See also
Financial::yield() Use the yield() method in the Financial class instead
Parameters
mixed$settlementThe Treasury bill's settlement date. The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
mixed$maturityThe Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires.
int$priceThe Treasury bill's price per $100 face value
Returns
float|mixed|string

Definition at line 1304 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\TreasuryBill\yield().

1305  {
1306  return TreasuryBill::yield($settlement, $maturity, $price);
1307  }
static yield($settlement, $maturity, $price)
TBILLYIELD.
+ Here is the call graph for this function:

◆ XIRR()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::XIRR (   $values,
  $dates,
  $guess = 0.1 
)
static

XIRR.

Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic.

Excel Function: =XIRR(values,dates,guess)

1.18.0

See also
Financial::rate() Use the rate() method in the Financial class instead
Parameters
float[]$values A series of cash flow payments The series of values must contain at least one positive value & one negative value
mixed[]$dates A series of payment dates The first payment date indicates the beginning of the schedule of payments All other dates must be later than this date, but they may occur in any order
float$guessAn optional guess at the expected answer
Returns
float|mixed|string

Definition at line 1331 of file Financial.php.

References $values, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic\rate().

1332  {
1334  }
$values
+ Here is the call graph for this function:

◆ XNPV()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::XNPV (   $rate,
  $values,
  $dates 
)
static

XNPV.

Returns the net present value for a schedule of cash flows that is not necessarily periodic. To calculate the net present value for a series of cash flows that is periodic, use the NPV function.

Excel Function: =XNPV(rate,values,dates)

1.18.0

See also
Financial::presentValue() Use the presentValue() method in the Financial class instead
Parameters
float$ratethe discount rate to apply to the cash flows
float[]$values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value.
mixed[]$dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order.
Returns
float|mixed|string

Definition at line 1363 of file Financial.php.

References $values, and PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\Variable\NonPeriodic\presentValue().

1364  {
1366  }
$values
+ Here is the call graph for this function:

◆ YIELDDISC()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDDISC (   $settlement,
  $maturity,
  $price,
  $redemption,
  $basis = 0 
)
static

YIELDDISC.

Returns the annual yield of a security that pays interest at maturity.

1.18.0

See also
Financial::yieldDiscounted() Use the yieldDiscounted() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
int$priceThe security's price per $100 face value
int$redemptionThe security's redemption value per $100 face value
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1394 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields\yieldDiscounted().

1395  {
1396  return Securities\Yields::yieldDiscounted($settlement, $maturity, $price, $redemption, $basis);
1397  }
static yieldDiscounted( $settlement, $maturity, $price, $redemption, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
YIELDDISC.
Definition: Yields.php:34
+ Here is the call graph for this function:

◆ YIELDMAT()

static PhpOffice\PhpSpreadsheet\Calculation\Financial::YIELDMAT (   $settlement,
  $maturity,
  $issue,
  $rate,
  $price,
  $basis = 0 
)
static

YIELDMAT.

Returns the annual yield of a security that pays interest at maturity.

1.18.0

See also
Financial::yieldAtMaturity() Use the yieldAtMaturity() method in the Financial class instead
Parameters
mixed$settlementThe security's settlement date. The security's settlement date is the date after the issue date when the security is traded to the buyer.
mixed$maturityThe security's maturity date. The maturity date is the date when the security expires.
mixed$issueThe security's issue date
int$rateThe security's interest rate at date of issue
int$priceThe security's price per $100 face value
int$basisThe type of day count to use. 0 or omitted US (NASD) 30/360 1 Actual/actual 2 Actual/360 3 Actual/365 4 European 30/360
Returns
float|string Result, or a string containing an error

Definition at line 1426 of file Financial.php.

References PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Yields\yieldAtMaturity().

1427  {
1428  return Securities\Yields::yieldAtMaturity($settlement, $maturity, $issue, $rate, $price, $basis);
1429  }
static yieldAtMaturity( $settlement, $maturity, $issue, $rate, $price, $basis=FinancialConstants::BASIS_DAYS_PER_YEAR_NASD)
YIELDMAT.
Definition: Yields.php:96
+ Here is the call graph for this function:

Field Documentation

◆ FINANCIAL_MAX_ITERATIONS

const PhpOffice\PhpSpreadsheet\Calculation\Financial::FINANCIAL_MAX_ITERATIONS = 128

Definition at line 18 of file Financial.php.

◆ FINANCIAL_PRECISION

const PhpOffice\PhpSpreadsheet\Calculation\Financial::FINANCIAL_PRECISION = 1.0e-08

Definition at line 20 of file Financial.php.


The documentation for this class was generated from the following file: