List of functions:
Function fin_FV computes the future value of a loan or investment based on a constant annual interest rate.
Parameters:
- IY: Nominal interest rate per year as a percent; for example, 2.35 should be entered for a nominal rate of 2.35%.
- Nper: Total number of payments (for annuities) or compounding periods (for compound interest) in the loan/investment term.
- PMT: The size of periodic payment; should be entered as a negative value for cash outflow and positive value for cash inflow.
- PY: The number of payments per year. Should be the same value as CY for compound interest problems where PMT=0; should be entered 1 for annual payments, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- CY: The number of interest compounding periods per year; should be entered 1 for compounded annually, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- PV: Optional - The present value (principal) of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow; default = 0.
- type: Optional - The type of annuity. Should be entered 1 for an annuity due and 0 (default) for a general annuity.
Returns
The future value of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.
Function fin_PV computes the present value (principal) of a loan or investment based on a constant annual interest rate.
Parameters:
- IY: Nominal interest rate per year as a percent; for example, 2.35 should be entered for a nominal rate of 2.35%.
- Nper: Total number of payments (for annuities) or compounding periods (for compound interest) in the loan/investment term.
- PMT: The size of periodic payment; should be entered as a negative value for cash outflow and positive value for cash inflow.
- PY: The number of payments per year. Should be the same value as CY for compound interest problems where PMT=0; should be entered 1 for annual payments, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- CY: The number of interest compounding periods per year; should be entered 1 for compounded annually, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- FV: Optional - The future value of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow; default = 0.
- type: Optional - The type of annuity. Should be entered 1 for an annuity due and 0 (default) for a general annuity.
Returns
The present value of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.
Function fin_PMT computes the periodic payment of a loan or investment based on a constant annual interest rate.
Parameters:
- IY: Nominal interest rate per year as a percent; for example, 2.35 should be entered for a nominal rate of 2.35%.
- Nper: Total number of payments (for annuities) or compounding periods (for compound interest) in the loan/investment term.
- PV: The present value (principal) of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow.
- PY: The number of payments per year. Should be the same value as CY for compound interest problems where PMT=0; should be entered 1 for annual payments, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- CY: The number of interest compounding periods per year; should be entered 1 for compounded annually, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- FV: Optional - The future value of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow; default = 0.
- type: Optional - The type of annuity. Should be entered 1 for an annuity due and 0 (default) for a general annuity.
Returns
The periodic payment of a loan or investment: a positive value for cash inflow and a negative value for cash outflow.
Function fin_Nper computes the total number of payments/compounding periods in the term of an investment or loan based on a constant annual interest rate.
The nominal interest rate per year in percent (%).
Function fin_iPMT computes the interest portion of a payment or a period (a range of payments). Functions iPMT and pPMT can be used to generate an amortization schedule.
Parameters:
-
per: Array of size two for the range of payments for which the interest amount paid is calculated. To find the interest portion of a single payment, both values in the array should be the same. For example, $per=array(1,1) is used to compute the interest portion of the first payment, while $per=array(1,12) is used to calculate the interest portion paid in the period ranging from the 1st payment to 12th payment inclusive.
- IY: Nominal interest rate per year as a percent; for example, 2.35 should be entered for a nominal rate of 2.35%.
- Nper: Total number of payments (for annuities) or compounding periods (for compound interest) in a loan or investment term.
- PV: The present value (principal) of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow.
- PY: The number of payments per year. Should be the same value as CY for compound interest problems where PMT=0; should be entered 1 for annual payments, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- CY: The number of interest compounding periods per year; should be entered 1 for compounded annually, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- FV: Optional - The future value of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow; default = 0.
- type: Optional - The type of annuity. Should be entered 1 for an annuity due and 0 (default) for a general annuity.
Returns
The interest portion of a payment or a period (a range of payments).
fin_pPMT(per ,IY ,Nper ,PV ,PY ,CY , [FV, type])
Function fin_pPMT computes the principal portion of a payment or a period (a range of payments). Functions pPMT and iPMT can be used to generate an amortization schedule.
Parameters:
- per: Array of size two for the range of payments for which the principal portion is calculated. To find the principal portion of a single payment, both values in the array should be the same. For example, $per=array(1,1) is used to compute the principal portion of the first payment, while $per=array(1,12) is used to calculate the principal portion paid in the period ranging from the 1st payment to 12th payment inclusive.
- IY: Nominal interest rate per year as a percent; for example, 2.35 should be entered for a nominal rate of 2.35%.
- Nper: Total number of payments (for annuities) or compounding periods (for compound interest) in a loan or investment term.
- PV: The present value (principal) of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow.
- PY: The number of payments per year. Should be the same value as CY for compound interest problems where PMT=0; should be entered 1 for annual payments, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- CY: The number of interest compounding periods per year; should be entered 1 for compounded annually, 2 for semi-annually, 4 for quarterly, 12 for monthly, 365 for daily.
- FV: Optional - The future value of a loan or investment; should be entered as a negative value for cash outflow and positive value for cash inflow; default = 0.
- type: Optional - The type of annuity. Should be entered 1 for an annuity due and 0 (default) for a general annuity.
Returns
The principal portion of a payment or a period (a range of payments).
fin_IRR(CF, FR)
Function fin_IRR computes the Internal Rate of Return (IRR), in percent, of a series of cash flows. IRR is the average periodically compounded rate of return that gives a net present value (NPV) of 0. In other words, IRR is the lowest rate of return from an investment that is acceptable to justify the investment.
Parameters:
- CF: Array of cash flows; cash outflows (investments) should be entered as negative values; cash inflows (expected returns on investment) should be entered as positive values.
- FR: Array of the frequency of each cash flow; initial cash flow is negative (cash outflow) and has a frequency of 1.
Both CF and FR arrays must be the same size. For example, if the initial investment is $50,000 (cash ouflow), and the annual returns on investment (cash inflow) are expected to be $10,000 in the first year and $20,000 in the next three subsequent years, CF = array(-50,000, 10000, 20000) and FR = array(1, 1, 3).
Returns
The Internal Rate of Return (IRR) in percent (%).
fin_NPV(CF, FR, IY)
Function fin_NPV computes the Net Present Value (NPV) of a series of cash flows. NPV is a method of evaluating the feasibility of investments by finding the difference of present values of all cash flows. Investment is accepted when NPV>=0 and rejected when NPV<0.
Parameters:
- CF: Array of cash flows; cash outflows (investments) should be entered as negative values; cash inflows (expected returns on investment) should be entered as positive values. The period of cash flows must be the same. For example all annual cash flows or all monthly cash flows.
- FR: Array of the frequency of each cash flow; initial cash flow is negative (cash outflow) and has a frequency of 1.
- IY: The required rate of return in percent. The interest period must match the cash-flow period. For example, if the cash flows are annual, IY should be the annual interest rate, while for monthly cash flows, the interest rate per month should be entered.
Both CF and FR arrays must be the same size. For example, if the initial investment is $50,000 (cash ouflow), and the annual returns on investment (cash inflow) are expected to be $10,000 in the first year and $20,000 in the next three subsequent years, CF = array(-50,000, 10000, 20000) and FR = array(1, 1, 3).
Returns:
The Net Present Value (NPV) of a series of cash flows ($).
fin_DBD(Date1,Date2)
Function fin_DBD computes the number of days between the given dates (DBD). DBD function can be used for time-value-of-money problems (generally short-terms) where the term of the investment or loan is not given explicitly but rather in a form of two dates.
Parameters:
- Date1: Starting date in the form of 'YYYY-MM-DD', 'YYYY/MM/DD', or 'MM/DD/YYYY'.
- Date2: End date in the form of 'YYYY-MM-DD', 'YYYY/MM/DD', or 'MM/DD/YYYY'.
Returns:
The number of days between the given dates (DBD).
fin_TVM()
Function fin_TVM returns an iframe for displaying a Time-Value-of-Money (TVM) solver. It provides students with a solver that can be used to compute different values of loans or investments (works similar to the functions in this library).
Parameters: None
Returns:
An embedded iframe code for inserting the solver into a question.
Back to top of page