@travishorn/financejs
    Preparing search index...

    Function nper

    • Calculates the number of periods for an investment based on periodic, constant payments and a constant interest rate.

      Parameters

      • rate: number

        The interest rate per period.

      • pmt: number

        The 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.

      • pv: number

        The present value, or the lump-sum amount that a series of future payments is worth right now.

      • Optionalfv: number = 0

        The 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).

      • Optionaltype: 0 | 1 = 0

        The number 0 or 1 and indicates when payments are due. Set type equal to 0 or omitted if payments are due at the end of the period. Set type equal to 1 if payments are due at the beginning of the period.

      Returns number

      Number of periods.

      When calculation is impossible with the provided inputs.

      nper(0.12 / 12, -100, -1000, 10000, 1); // 59.67386567