@gibme/finance
    Preparing search index...

    Function calculate_amortization_loan

    • Calculates loan information using the amortization formula

      Note: This is akin to a mortgage calculator

      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

      • extra_monthly_payments: ExtraPaymentInformation[] = []

        an array of extra payments made towards the loan

      • fixed_payment: boolean = true

        if set to false, will allow the monthly payment to reduce over time, otherwise it remains fixed like a mortgage-style loan

      • digits: number = 2

        the number of digits to round the result to

      Returns Readonly<AmortizationLoan>