@travishorn/financejs
    Preparing search index...

    Function calculateRate

    • Calculates the interest rate per period of an annuity. The rate is calculated by iteration and can have zero or more solutions. If the successive results of this function do not converge to within 0.0000001 after 128 iterations, a RangeError is thrown.

      Remarks:

      • Make sure that you are consistent about the units you use for specifying periods. If you make monthly payments on a four-year loan at 12 percent annual interest, use 4 * 12 for periods. If you make annual payments on the same loan, use 4 for periods.
      • A result of -0 is normalized to 0.

      Parameters

      • options: RateOptions

        The rate calculation options.

      Returns number

      The calculated interest rate per period of an annuity.

      When inputs are invalid or the algorithm cannot converge.

      calculateRate({
      periods: 4 * 12,
      payment: -200,
      presentValue: 8000,
      }); // 0.007701472488210084
      calculateRate({
      periods: 276,
      payment: 1991,
      presentValue: -446386,
      futureValue: 3135,
      timing: "beginning",
      guess: 0.047,
      }); // 0.0016051131093570657