@travishorn/financejs
    Preparing search index...

    Function calculatePresentValue

    • Calculates the present value of a loan or an investment, based on a constant interest rate. You can use this function with either periodic, constant payments (such as a mortgage or other loan), or a future value that's your investment goal.

      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 12 percent annual interest, 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.
      • An annuity is a series of constant cash payments made over a continuous period. For example, a car loan or a mortgage is an annuity.
      • In annuity functions, cash you pay out, such as a deposit to savings, is represented by a negative number. Cash you receive, such as a dividend check, is represented by a positive number. For example, a $1,000 deposit to the bank would be represented by the argument -1000 if you are the depositor and by the argument 1000 if you are the bank.
      • A result of -0 is normalized to 0.

      Parameters

      • options: PresentValueOptions

        The present value calculation options.

      Returns number

      The present value of the investment.

      calculatePresentValue({
      rate: 0.08 / 12,
      periods: 20 * 12,
      payment: 500,
      }); // -59777.14585118777
      calculatePresentValue({
      rate: 0.06 / 12,
      periods: 10,
      payment: -200,
      timing: "beginning",
      }); // 1955.8127840179968