# PHPExcel_Calculation_Financial

class
**PHPExcel_Calculation_Financial**

PHPExcel*Calculation*Financial

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

## Methods

ACCRINT

ACCRINTM

AMORDEGRC

AMORLINC

COUPDAYBS

COUPDAYS

COUPDAYSNC

COUPNCD

COUPNUM

COUPPCD

CUMIPMT

CUMPRINC

DB

DDB

DISC

DOLLARDE

DOLLARFR

EFFECT

FV

FVSCHEDULE

INTRATE

IPMT

IRR

ISPMT

MIRR

NOMINAL

NPER

NPV

PMT

PPMT

No description

PRICEDISC

PRICEMAT

PV

RATE

RECEIVED

SLN

SYD

TBILLEQ

TBILLPRICE

TBILLYIELD

No description

XNPV

YIELDDISC

YIELDMAT

## Details

###
at line 211
```
static float
```**ACCRINT**(mixed $issue, mixed $firstinterest, mixed $settlement, float $rate, float $par = 1000, integer $frequency = 1, integer $basis)

**ACCRINT**(mixed $issue, mixed $firstinterest, mixed $settlement, float $rate, float $par = 1000, integer $frequency = 1, integer $basis)

ACCRINT

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

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

###
at line 263
```
static float
```**ACCRINTM**(mixed $issue, mixed $settlement, float $rate, float $par = 1000, integer $basis)

**ACCRINTM**(mixed $issue, mixed $settlement, float $rate, float $par = 1000, integer $basis)

ACCRINTM

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

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

###
at line 320
```
static float
```**AMORDEGRC**(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, integer $basis)

**AMORDEGRC**(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, integer $basis)

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])

###
at line 397
```
static float
```**AMORLINC**(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, integer $basis)

**AMORLINC**(float $cost, mixed $purchased, mixed $firstPeriod, mixed $salvage, float $period, float $rate, integer $basis)

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])

###
at line 464
```
static float
```**COUPDAYBS**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPDAYBS**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

COUPDAYBS

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

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

###
at line 523
```
static float
```**COUPDAYS**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPDAYS**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

COUPDAYS

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

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

###
at line 596
```
static float
```**COUPDAYSNC**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPDAYSNC**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

COUPDAYSNC

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

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

###
at line 656
```
static mixed
```**COUPNCD**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPNCD**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

COUPNCD

Returns the next coupon date after the settlement date.

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

###
at line 713
```
static integer
```**COUPNUM**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPNUM**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

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])

###
at line 785
```
static mixed
```**COUPPCD**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

**COUPPCD**(mixed $settlement, mixed $maturity, mixed $frequency, integer $basis)

COUPPCD

Returns the previous coupon date before the settlement date.

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

###
at line 830
```
static float
```**CUMIPMT**(float $rate, integer $nper, float $pv, integer $start, integer $end, integer $type)

**CUMIPMT**(float $rate, integer $nper, float $pv, integer $start, integer $end, integer $type)

CUMIPMT

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

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

###
at line 878
```
static float
```**CUMPRINC**(float $rate, integer $nper, float $pv, integer $start, integer $end, integer $type)

**CUMPRINC**(float $rate, integer $nper, float $pv, integer $start, integer $end, integer $type)

CUMPRINC

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

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

###
at line 931
```
static float
```**DB**(float $cost, float $salvage, integer $life, integer $period, integer $month = 12)

**DB**(float $cost, float $salvage, integer $life, integer $period, integer $month = 12)

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])

###
at line 999
```
static float
```**DDB**(float $cost, float $salvage, integer $life, integer $period, float $factor = 2.0)

**DDB**(float $cost, float $salvage, integer $life, integer $period, float $factor = 2.0)

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])

###
at line 1061
```
static float
```**DISC**(mixed $settlement, mixed $maturity, integer $price, integer $redemption, integer $basis)

**DISC**(mixed $settlement, mixed $maturity, integer $price, integer $redemption, integer $basis)

DISC

Returns the discount rate for a security.

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

###
at line 1105
```
static float
```**DOLLARDE**(float $fractional_dollar = null, integer $fraction)

**DOLLARDE**(float $fractional_dollar = null, integer $fraction)

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)

###
at line 1142
```
static float
```**DOLLARFR**(float $decimal_dollar = null, integer $fraction)

**DOLLARFR**(float $decimal_dollar = null, integer $fraction)

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)

###
at line 1178
```
static float
```**EFFECT**(float $nominal_rate, integer $npery)

**EFFECT**(float $nominal_rate, integer $npery)

EFFECT

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

Excel Function: EFFECT(nominal_rate,npery)

###
at line 1214
```
static float
```**FV**(float $rate, int $nper, float $pmt, float $pv, integer $type)

**FV**(float $rate, int $nper, float $pmt, float $pv, integer $type)

FV

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

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

###
at line 1248
```
static float
```**FVSCHEDULE**(float $principal, float[] $schedule)

**FVSCHEDULE**(float $principal, float[] $schedule)

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)

###
at line 1283
```
static float
```**INTRATE**(mixed $settlement, mixed $maturity, integer $investment, integer $redemption, integer $basis)

**INTRATE**(mixed $settlement, mixed $maturity, integer $investment, integer $redemption, integer $basis)

INTRATE

Returns the interest rate for a fully invested security.

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

###
at line 1327
```
static float
```**IPMT**(float $rate, int $per, int $nper, float $pv, float $fv, int $type)

**IPMT**(float $rate, int $per, int $nper, float $pv, float $fv, int $type)

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])

###
at line 1368
```
static float
```**IRR**(float[] $values, float $guess = 0.1)

**IRR**(float[] $values, float $guess = 0.1)

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])

###
at line 1435
```
static
```**ISPMT**()

**ISPMT**()

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)

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

###
at line 1477
```
static float
```**MIRR**(float[] $values, float $finance_rate, float $reinvestment_rate)

**MIRR**(float[] $values, float $finance_rate, float $reinvestment_rate)

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)

###
at line 1519
```
static float
```**NOMINAL**(float $effect_rate, int $npery)

**NOMINAL**(float $effect_rate, int $npery)

NOMINAL

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

###
at line 1546
```
static float
```**NPER**(float $rate, int $pmt, float $pv, float $fv, int $type)

**NPER**(float $rate, int $pmt, float $pv, float $fv, int $type)

NPER

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

###
at line 1579
```
static float
```**NPV**()

**NPV**()

NPV

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

###
at line 1612
```
static float
```**PMT**(float $rate, int $nper, float $pv, float $fv, int $type)

**PMT**(float $rate, int $nper, float $pv, float $fv, int $type)

PMT

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

###
at line 1646
```
static float
```**PPMT**(float $rate, int $per, int $nper, float $pv, float $fv, int $type)

**PPMT**(float $rate, int $per, int $nper, float $pv, float $fv, int $type)

PPMT

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

###
at line 1669
```
static
```**PRICE**($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis)

**PRICE**($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis)

###
at line 1730
```
static float
```**PRICEDISC**(mixed $settlement, mixed $maturity, int $discount, int $redemption, int $basis)

**PRICEDISC**(mixed $settlement, mixed $maturity, int $discount, int $redemption, int $basis)

PRICEDISC

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

###
at line 1775
```
static float
```**PRICEMAT**(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $yield, int $basis)

**PRICEMAT**(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $yield, int $basis)

PRICEMAT

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

###
at line 1832
```
static float
```**PV**(float $rate, int $nper, float $pmt, float $fv, int $type)

**PV**(float $rate, int $nper, float $pmt, float $fv, int $type)

PV

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

###
at line 1883
```
static float
```**RATE**(float $nper, float $pmt, float $pv, float $fv = 0.0, integer $type, float $guess = 0.1)

**RATE**(float $nper, float $pmt, float $pv, float $fv = 0.0, integer $type, float $guess = 0.1)

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]]])

###
at line 1946
```
static float
```**RECEIVED**(mixed $settlement, mixed $maturity, int $investment, int $discount, int $basis)

**RECEIVED**(mixed $settlement, mixed $maturity, int $investment, int $discount, int $basis)

RECEIVED

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

###
at line 1981
```
static float
```**SLN**(cost $cost, salvage $salvage, life $life)

**SLN**(cost $cost, salvage $salvage, life $life)

SLN

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

###
at line 2009
```
static float
```**SYD**(cost $cost, salvage $salvage, life $life, period $period)

**SYD**(cost $cost, salvage $salvage, life $life, period $period)

SYD

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

###
at line 2039
```
static float
```**TBILLEQ**(mixed $settlement, mixed $maturity, int $discount)

**TBILLEQ**(mixed $settlement, mixed $maturity, int $discount)

TBILLEQ

Returns the bond-equivalent yield for a Treasury bill.

###
at line 2078
```
static float
```**TBILLPRICE**(mixed $settlement, mixed $maturity, int $discount)

**TBILLPRICE**(mixed $settlement, mixed $maturity, int $discount)

TBILLPRICE

Returns the yield for a Treasury bill.

###
at line 2131
```
static float
```**TBILLYIELD**(mixed $settlement, mixed $maturity, int $price)

**TBILLYIELD**(mixed $settlement, mixed $maturity, int $price)

TBILLYIELD

Returns the yield for a Treasury bill.

###
at line 2164
```
static
```**XIRR**($values, $dates, $guess = 0.1)

**XIRR**($values, $dates, $guess = 0.1)

###
at line 2237
```
static float
```**XNPV**(float $rate, array $values, array $dates)

**XNPV**(float $rate, array $values, array $dates)

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)

###
at line 2286
```
static float
```**YIELDDISC**(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis)

**YIELDDISC**(mixed $settlement, mixed $maturity, int $price, int $redemption, int $basis)

YIELDDISC

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

###
at line 2336
```
static float
```**YIELDMAT**(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $price, int $basis)

**YIELDMAT**(mixed $settlement, mixed $maturity, mixed $issue, int $rate, int $price, int $basis)

YIELDMAT

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