@travishorn/financejs
    Preparing search index...

    Function calculateCumulativeInterest

    • Calculates the cumulative interest paid on a loan between a start period and an end period.

      Remarks:

      • Make sure that you are consistent about the units you use for specifying rate and periods. If you make monthly payments on a four-year loan at an annual interest rate of 12 percent, use 0.12 / 12 for rate and 4 * 12 for periods. If you make annual payments on the same loan, use 0.12 for rate and 4 for periods.
      • If rate <= 0, periods <= 0, or presentValue <= 0, this function throws a RangeError.
      • If startPeriod < 1, endPeriod < 1, or startPeriod > endPeriod, this function throws a RangeError.

      Parameters

      • options: CumulativeInterestOptions

        The cumulative interest calculation options.

      Returns number

      The cumulative interest paid.

      When inputs are invalid.

      calculateCumulativeInterest({
      rate: 0.09 / 12,
      periods: 30 * 12,
      presentValue: 125000,
      startPeriod: 13,
      endPeriod: 24,
      }); // -11135.232130750845
      calculateCumulativeInterest({
      rate: 0.09 / 12,
      periods: 30 * 12,
      presentValue: 125000,
      startPeriod: 1,
      endPeriod: 12,
      timing: "beginning",
      }); // -10201.332884494608