qfinbox.tvm.loans.total_interest_paid
- qfinbox.tvm.loans.total_interest_paid(principal: float, annual_rate: float, years: float, payments_per_year: int = 12) float[source]
Calculate total interest paid over the life of the loan.
- Parameters:
- Returns:
Total interest paid.
- Return type:
Examples
>>> total_interest_paid(300000, 0.05, 30) 279767.35