Top Description Constructors Methods
org.apache.poi.ss.formula.functions

public Class Finance

extends Object
Class Inheritance

Implementation of the financial functions pmt, fv, ppmt, ipmt.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static double

Returns:

double representing future principal value.
fv
(double
- periodic interest rate represented as a decimal.
r
,
int
- number of total payments / periods.
nper
,
double
- periodic payment amount.
pmt
,
double
- present value -- borrowed or invested principal.
pv
,
int
- when payment is made: beginning of period is 1; end, 0.
type
)

Emulates Excel/Calc's FV(interest_rate, number_payments, payment, PV, Type) function, which calculates future value or principal at period N.

public static double
fv(double r, int nper, double c, double pv)

Overloaded fv() call omitting type, which defaults to 0.

public static double

Returns:

double representing interest portion of payment.
ipmt
(double
- periodic interest rate represented as a decimal.
r
,
int
- period (payment number) to check value at.
per
,
int
- number of total payments / periods.
nper
,
double
- present value -- borrowed or invested principal.
pv
,
double
- future value of loan or annuity.
fv
,
int
- when payment is made: beginning of period is 1; end, 0.
type
)

Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV, FV, Type) function, which calculates the portion of the payment at a given period that is the interest on previous balance.

public static double
ipmt(double r, int per, int nper, double pv, double fv)

public static double
ipmt(double r, int per, int nper, double pv)

public static double

Returns:

double representing periodic payment amount.
pmt
(double
- periodic interest rate represented as a decimal.
r
,
int
- number of total payments / periods.
nper
,
double
- present value -- borrowed or invested principal.
pv
,
double
- future value of loan or annuity.
fv
,
int
- when payment is made: beginning of period is 1; end, 0.
type
)

Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type) function, which calculates the payments for a loan or the future value of an investment

public static double
pmt(double r, int nper, double pv, double fv)

Overloaded pmt() call omitting type, which defaults to 0.

public static double
pmt(double r, int nper, double pv)

Overloaded pmt() call omitting fv and type, which both default to 0.

public static double

Returns:

double representing principal portion of payment.
ppmt
(double
- periodic interest rate represented as a decimal.
r
,
int
- period (payment number) to check value at.
per
,
int
- number of total payments / periods.
nper
,
double
- present value -- borrowed or invested principal.
pv
,
double
- future value of loan or annuity.
fv
,
int
- when payment is made: beginning of period is 1; end, 0.
type
)

Emulates Excel/Calc's PPMT(interest_rate, period, number_payments, PV, FV, Type) function, which calculates the portion of the payment at a given period that will apply to principal.

public static double
ppmt(double r, int per, int nper, double pv, double fv)

public static double
ppmt(double r, int per, int nper, double pv)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Financeback to summary
public Finance()

Method Detail

fvback to summary
public static double fv(double r, int nper, double pmt, double pv, int type)

Emulates Excel/Calc's FV(interest_rate, number_payments, payment, PV, Type) function, which calculates future value or principal at period N.

Parameters
r:double

- periodic interest rate represented as a decimal.

nper:int

- number of total payments / periods.

pmt:double

- periodic payment amount.

pv:double

- present value -- borrowed or invested principal.

type:int

- when payment is made: beginning of period is 1; end, 0.

Returns:double

double representing future principal value.

fvback to summary
public static double fv(double r, int nper, double c, double pv)

Overloaded fv() call omitting type, which defaults to 0.

See Also
fv(double, int, double, double, int)
ipmtback to summary
public static double ipmt(double r, int per, int nper, double pv, double fv, int type)

Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV, FV, Type) function, which calculates the portion of the payment at a given period that is the interest on previous balance.

Parameters
r:double

- periodic interest rate represented as a decimal.

per:int

- period (payment number) to check value at.

nper:int

- number of total payments / periods.

pv:double

- present value -- borrowed or invested principal.

fv:double

- future value of loan or annuity.

type:int

- when payment is made: beginning of period is 1; end, 0.

Returns:double

double representing interest portion of payment.

See Also
pmt(double, int, double, double, int), fv(double, int, double, double, int)
ipmtback to summary
public static double ipmt(double r, int per, int nper, double pv, double fv)
ipmtback to summary
public static double ipmt(double r, int per, int nper, double pv)
pmtback to summary
public static double pmt(double r, int nper, double pv, double fv, int type)

Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type) function, which calculates the payments for a loan or the future value of an investment

Parameters
r:double

- periodic interest rate represented as a decimal.

nper:int

- number of total payments / periods.

pv:double

- present value -- borrowed or invested principal.

fv:double

- future value of loan or annuity.

type:int

- when payment is made: beginning of period is 1; end, 0.

Returns:double

double representing periodic payment amount.

pmtback to summary
public static double pmt(double r, int nper, double pv, double fv)

Overloaded pmt() call omitting type, which defaults to 0.

See Also
pmt(double, int, double, double, int)
pmtback to summary
public static double pmt(double r, int nper, double pv)

Overloaded pmt() call omitting fv and type, which both default to 0.

See Also
pmt(double, int, double, double, int)
ppmtback to summary
public static double ppmt(double r, int per, int nper, double pv, double fv, int type)

Emulates Excel/Calc's PPMT(interest_rate, period, number_payments, PV, FV, Type) function, which calculates the portion of the payment at a given period that will apply to principal.

Parameters
r:double

- periodic interest rate represented as a decimal.

per:int

- period (payment number) to check value at.

nper:int

- number of total payments / periods.

pv:double

- present value -- borrowed or invested principal.

fv:double

- future value of loan or annuity.

type:int

- when payment is made: beginning of period is 1; end, 0.

Returns:double

double representing principal portion of payment.

See Also
pmt(double, int, double, double, int), ipmt(double, int, int, double, double, int)
ppmtback to summary
public static double ppmt(double r, int per, int nper, double pv, double fv)
ppmtback to summary
public static double ppmt(double r, int per, int nper, double pv)