==================================================================================================== TEST: EXACT EXAMPLE FROM PDF (Page 3) ==================================================================================================== Given Data: Monthly Payment (EMI): TSH 177,697.00 Annual Interest Rate: 12% Monthly Rate (r): 0.01 Initial Balance (IB): TSH 6,397,076.07 Remaining Balance (BA): TSH 4,264,712.07 --- Step 1: Calculate Original Principal (PV) --- Tenure (n) = IB / EMI = 6,397,076.07 / 177,697.00 ≈ 36 months PV = EMI × [1 - (1 + r)^-n] / r PV = 177697 × [1 - (1.01)^-36] / 0.01 PV = TSH 5,350,013.32 --- Step 2: Determine Number of Payments Made (m) --- Remaining Payments = BA / EMI = 4,264,712.07 / 177,697.00 = 24 Payments Made (m) = n - remaining = 36 - 24 = 12 --- Step 3: Calculate Outstanding Principal (Payoff) --- Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Payoff = 5,350,013.32 × [(1.01)^36 - (1.01)^12] / [(1.01)^36 - 1] (1.01)^36 = 1.43076878 (1.01)^12 = 1.12682503 Outstanding Principal = TSH 3,774,886.18 --- Step 4: Calculate Final Payoff Amount --- Days Since Last Payment: 7 Accrued Interest = Principal × (Annual Rate / 365) × Days Accrued Interest = 3,774,886.18 × (0.12/365) × 7 Accrued Interest = TSH 8,687.41 TOTAL PAYOFF AMOUNT = Principal + Accrued Interest TOTAL PAYOFF AMOUNT = 3,774,886.18 + 8,687.41 TOTAL PAYOFF AMOUNT = TSH 3,783,573.59 --- Comparison with PDF --- PDF Expected Outstanding Principal: TSH 3,775,000.00 Our Calculated Outstanding Principal: TSH 3,774,886.18 Difference: TSH 113.82 ==================================================================================================== ADDITIONAL TEST SCENARIOS ==================================================================================================== --- Small Loan - 25% Paid --- Tenure: 20 months, Payments Made: 5 Original Principal: TSH 917,600.90 Outstanding Principal: TSH 702,275.29 Accrued Interest: TSH 1,924.04 Total Payoff: TSH 704,199.33 --- Medium Loan - 75% Paid --- Tenure: 24 months, Payments Made: 18 Original Principal: TSH 3,316,581.54 Outstanding Principal: TSH 879,367.81 Accrued Interest: TSH 2,891.07 Total Payoff: TSH 882,258.88 --- Large Loan - Just Started --- Tenure: 24 months, Payments Made: 1 Original Principal: TSH 10,312,117.26 Outstanding Principal: TSH 9,941,018.73 Accrued Interest: TSH 20,426.75 Total Payoff: TSH 9,961,445.48 ==================================================================================================== SUMMARY ==================================================================================================== The Reducing Balance Method has been successfully implemented! The formula correctly calculates payoff amounts using: 1. PV = EMI × [1 - (1 + r)^-n] / r (for original principal) 2. Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] (for outstanding principal) 3. Total Payoff = Outstanding Principal + Accrued Interest ✅ Implementation matches the corrected formulas from the PDF!