@gibme/finance
    Preparing search index...

    Function calculate_amortization_payment

    • Calculates the payment, interest portion of that payment, principal portion of that payment, and remaining balance after that payment of an amortization loan

      Parameters

      • principal: number

        the starting principal of the loan

      • apr: number

        the interest rate of the loan

      • months: number

        the number of months for the loan

      • Optionalfixed_payment: number

        if provided, uses a fixed monthly payment amount. This is useful for mortgage-style calculations wherein the monthly payment remains the same for the length of the loan. This differs from something like a revolving credit balance where the payment can change every month.

      • digits: number = 2

        the number of digits to round the result to

      Returns Readonly<AmortizationPayment>