CASE STUDY 01 · MATHEMATICS

Quantitative Aptitude Percentages + Series

Loan Calculator & Amortization

Derive an equal monthly instalment, separate principal from interest and measure how extra payments change the lifetime cost of a reducing-balance loan.

01 · PROBLEM DEFINITION

The EMI is only one part of the decision

A borrower wants ₹5,00,000 for five years at 9% annual interest. The immediate question is the monthly payment, but responsible analysis also asks how much interest is paid, how the balance changes each month, and whether an extra monthly payment creates meaningful savings.

This case uses monthly reducing-balance amortization. Interest is calculated on the outstanding balance, not repeatedly on the original principal. Each equal payment first covers that month’s interest; the remainder reduces principal.

Affordability

Calculate the scheduled monthly instalment.

Cost

Measure total interest across the schedule.

What-if

Compare normal and extra-payment scenarios.

Educational scope: Actual lenders may use different compounding, day counts, fees, insurance, taxes, rounding and prepayment rules. This model is for mathematical learning.
02 · VARIABLES & UNITS

Convert every input to one time scale

SymbolMeaningConversion
PInitial principalCurrency amount
RAnnual percentage rateExample: 9%
rMonthly decimal rateR ÷ (12 × 100)
YTerm in yearsExample: 5
nNumber of payments12Y
EEqual monthly instalmentCurrency per month

Mixing 9 with 0.09 or using an annual rate directly in a monthly recurrence produces a result that may look precise but is mathematically wrong. Units are part of the formula.

Sanity bounds: For a positive rate, EMI must exceed P/n, the first month’s interest must equal P×r, and the final balance must approach zero.
03 · EMI FORMULA

Equal payments form a geometric relationship

E = P × r × (1+r)^n / ((1+r)^n − 1)

After one month, the balance grows to P(1+r), then payment E is removed. Repeating this recurrence produces powers of (1+r). Requiring the balance after n payments to be zero and solving for E produces the formula above.

Zero-interest special case

When r = 0: E = P / n

The normal formula becomes 0/0 at zero interest, so a correct calculator uses the simpler limit case. Special cases are not optional implementation details; they are part of the mathematical model.

Do not confuse flat and reducing rates

A flat-interest estimate computes interest on the original principal for the full term. Reducing-balance interest shrinks with the outstanding amount. Identical percentage labels therefore need not imply identical payment costs unless the calculation method is also identical.

04 · AMORTIZATION RECURRENCE

One payment updates four quantities

interestₘ = balanceₘ₋₁ × r
principalₘ = paymentₘ − interestₘ
balanceₘ = balanceₘ₋₁ − principalₘ

Early in the loan, the balance is high, so interest consumes a larger fraction of the fixed EMI. Later, lower interest allows more of the same payment to reduce principal. The last payment is usually adjusted slightly because currency rounding and the exact remaining balance may not equal one full EMI.

Opening balance
Add monthly interest
Apply payment
Reduce principal
Closing balance

An extra payment goes directly into the planned payment amount. Because it reduces balance sooner, it also reduces future interest—a compounding benefit rather than a simple one-month saving.

05 · WORKED EXAMPLE

₹5,00,000 at 9% for five years

  1. Monthly rate: r = 9/(12×100) = 0.0075.
  2. Payments: n = 5×12 = 60.
  3. Growth factor: (1.0075)^60 ≈ 1.5657.
  4. Substitution gives EMI ≈ ₹10,379.18.
  5. Month 1 interest: 5,00,000×0.0075 = ₹3,750.
  6. Month 1 principal: 10,379.18−3,750 = ₹6,629.18.
  7. New balance: approximately ₹4,93,370.82.
ScenarioMonthly planExpected effect
RegularScheduled EMI60 payments
Extra ₹2,000EMI + ₹2,000Earlier payoff and lower interest

The program calculates the exact iterative comparison rather than estimating savings by multiplying ₹2,000 by a guessed number of months.

06 · PROGRAMMATIC VERIFICATION

Complete Python implementation

The program separates the closed-form EMI calculation from the iterative amortization schedule. It compares a regular schedule with an optional extra-payment schedule and prints the first twelve rows plus the final payment.

programs/loan-calculator.py
Open Compiler
Loading source…
Verification mindset: Code does not prove a formula correct. Compare its output with hand-calculated first-month interest, zero-rate cases and final-balance invariants.
07 · INTERACTIVE CALCULATION TRACE

Trace the first payment

  1. Record inputs with units.
  2. Convert the annual percentage.
  3. Calculate compound growth.
  4. Compute the scheduled payment.
  5. Charge interest on opening balance.
  6. Separate the payment components.
  7. Update outstanding principal.
  8. Continue the recurrence.
  9. Compare the what-if schedule.
Current state

Press Next to begin.

08 · BOUNDARY & INVARIANT TESTS

Test the model, not only the interface

Zero interest
₹1,20,000 for one year must produce exactly ₹10,000 scheduled payment and zero total interest.
First-row identity
Verify payment = interest + principal component and closing = opening − principal component within currency tolerance.
Final balance
The schedule must end near zero, never continue indefinitely and never make a payment larger than balance plus current interest.
Extra-payment monotonicity
A positive extra payment must not increase payoff months or total interest under this model.
Invalid inputs
Reject non-positive principal/term, negative rate and negative extra payment.
09 · INTERPRETATION & LIMITATIONS

Separate mathematical output from financial advice

The schedule answers “what follows from these assumptions?” It does not answer whether a person should borrow, prepay or invest elsewhere. A decision also depends on income stability, emergency funds, fees, taxes, inflation, alternative returns and contractual conditions.

ChangeEMITotal interest
Higher principalIncreases proportionallyIncreases
Higher rateIncreasesIncreases
Longer termUsually decreasesUsually increases
Extra monthly paymentChosen outflow increasesDecreases under model

Algorithmic runtime is O(m), where m is the number of payments generated; the closed-form EMI alone is O(1).

10 · PRACTICE & EXTENSIONS

Check the mathematics

Month 2 interest is calculated on which amount?

What is EMI when annual rate is zero?

Extensions

  1. Support a one-time prepayment in a selected month.
  2. Compare reducing-balance and explicitly defined flat-interest plans.
  3. Generate yearly principal-versus-interest summaries.
  4. Add a rate change after a fixed number of months.
  5. Use decimal currency arithmetic and a documented rounding policy.
11 · INTERVIEW PREPARATION

Explain assumptions before formulas

Why is EMI not simply principal divided by months?

Because each month the outstanding balance earns interest. Equal payments must cover both that interest and enough principal to reduce the balance to zero.

Why does a longer term often cost more?

The monthly amount may fall, but interest is charged across more periods, so cumulative interest generally rises.

Why handle zero interest separately?

The standard formula has r in the numerator and a denominator that also becomes zero. The limiting relationship is simple equal division.

How do extra payments save more than their face value?

They reduce principal immediately, which lowers interest in every later month and can remove entire end-of-loan payments.

What numerical issue matters?

Binary floating point and repeated rounding can leave a tiny balance. Production systems use contractual rounding and suitable decimal/integer currency representation.

12 · KEY TAKEAWAY

A formula becomes useful through a schedule and checks

The EMI formula gives one number; amortization explains that number month by month. Strong mathematical software combines consistent units, a derived formula, recurrence, special cases, invariants and transparent limitations.