Skip to content
Investment Math
Investment Math

Currency and number style

Only changes how amounts look. There is no currency conversion.

Prepay Loan or Invest explained: formula, worked example and common mistakes

Extra loan payments, or invest the money instead? The classic personal finance question, answered with math. Free, no sign-up, your numbers stay in your browser.

Updated

What is the prepay-vs-invest decision?

The prepay-vs-invest decision is one of the most common personal finance questions: when you have extra cash each month, is it better to use it to pay down your loan faster (saving on interest), or invest it (potentially earning higher returns)? The answer depends on the comparison between your loan’s interest rate and your expected investment return, adjusted for taxes and risk.

The basic principle is simple: if the return you expect after tax beats the loan’s rate after any relief, investing wins; if the loan rate is higher, paying it down wins. The difficulty is everywhere else — the return is uncertain and the loan rate is not, the horizons differ, and being free of the debt is worth something that does not appear in either column.

Consider the standard case: a homeowner with a 300,000 mortgage at 6.5% interest, 25 years remaining, and 500/month of extra cash flow. Is it better to prepay, or to invest?

Option 1: Prepay the mortgage. Adding 500/month to the mortgage payment pays off the loan roughly 12 years earlier and saves approximately 115,000 in interest over the life of the loan. The “return” on the prepayment is the loan’s interest rate: 6.5% guaranteed, untaxed (since you’re saving interest, not earning income).

Option 2: invest it. Investing 500 a month at an assumed 8% return over 25 years comes to about 475,000 before any tax on the gains. Whatever rate applies to you comes off that figure, not off the loan side, which is one of the reasons the comparison is less obvious than it looks.

Comparing: Prepaying saves 115,000 in interest (effectively earning a guaranteed 6.5% return). Investing earns 427,000 in after-tax wealth but with stock market risk.

On pure expected-value math, investing wins by roughly 312,000 over 25 years (the difference between 427,000 invested wealth and the 115,000 saved interest). But this comparison misses three critical factors:

Risk adjustment: The 8% investment return is not guaranteed — it could be 4% or 12%. The 6.5% interest savings from prepaying is guaranteed. Risk-adjusted, prepaying becomes more attractive, especially for risk-averse investors.

Tax treatment: where interest on the loan attracts any relief, the real cost of the loan is below its headline rate, and the comparison tilts towards investing. Where the gains on the investments are taxed and the loan gets no relief, it tilts the other way. Both sides have to be measured after tax or neither comparison means anything.

Liquidity: Money invested in stocks can be sold to access cash in an emergency. Money prepaid into a mortgage is locked up in home equity — accessible only by selling the home or taking a home equity loan. Liquidity favors investing.

Psychological value: Being debt-free has significant psychological value for many people — peace of mind, lower stress, flexibility to change jobs or retire earlier. This is hard to quantify but real.

The calculator handles the math (tax-adjusted rates, investment growth, loan amortization with extra payments), but the risk-adjustment and psychological factors require judgment.

The prepay-vs-invest formulas

Prepayment scenario:

When you make extra monthly payments on a loan, the loan pays off faster, saving interest. The new payoff time and total interest saved are calculated using an adjusted amortization.

New monthly payment = Original EMI + Extra payment
New payoff time = solve for n in: Principal = (New monthly payment / r) × (1 - (1 + r)^-n)
Total interest saved = (Original EMI × Original months) - (New monthly payment × New months)

The “return” on prepayment = the loan’s interest rate, tax-adjusted if interest is deductible.

Worked example: 300,000 loan at 6.5%, 25 years remaining (300 months). Original EMI = 2,013. Extra payment of 500/month makes total payment 2,513.

New payoff time: solving for n in 300,000 = (2,513 / 0.00541667) × (1 - (1.00541667)^-n) gives n ≈ 169 months (about 14 years instead of 25). The loan pays off 11 years earlier.

Total interest with no extra payments: 2,013 × 300 - 300,000 = 303,900
Total interest with extra payments: 2,513 × 169 - 300,000 = 124,697
Interest saved: 303,900 - 124,697 = 179,203

So prepaying 500/month saves 179,203 in interest over the life of the loan.

Investment scenario:

If you invest the 500/month instead, the future value is:

FV = 500 × [(1 + r)^n - 1] / r × (1 + r)

Where r is the monthly investment return and n is the number of months (300 for 25 years).

For 8% annual return (0.667% monthly): FV = 500 × [(1.00667)^300 - 1] / 0.00667 × 1.00667 FV = 500 × [7.471 - 1] / 0.00667 × 1.00667 FV = 500 × 6.471 / 0.00667 × 1.00667 FV ≈ 487,000

If tax is due on the gains (487,000 − 150,000 paid in = 337,000 of gain), it comes off here, at whatever rate applies to you: After-tax FV ≈ 436,450

Comparison:

Prepayment scenario: 179,203 saved in interest (guaranteed, risk-free) Investment scenario: 436,450 accumulated (with stock market risk)

Pure expected-value difference: 436,450 - 179,203 = 257,247 in favor of investing.

But this comparison requires several adjustments:

  • Risk premium: stocks have variance that prepayment doesn’t
  • Tax adjustment: if mortgage interest is deductible, effective loan rate is lower (investing more attractive)
  • Liquidity premium: stocks are liquid; prepaid home equity is not
  • Psychological value: debt-free status has non-monetary value

The calculator runs the full comparison and shows both scenarios side by side, with tax adjustments. Open the calculator and enter your loan and investment details.

When to use a prepay-vs-invest calculator (and when not to)

Use this calculator when:

  • You have a mortgage, student loan, or other long-term loan and extra monthly cash flow.
  • You’re deciding whether to make extra loan payments or invest the surplus.
  • You want to see the impact in money of prepaying vs. investing, accounting for tax deductions.
  • You’re considering a windfall (bonus, inheritance) and want to decide where to deploy it.

When NOT to use this calculator:

  • If your loan has a prepayment penalty, the math changes — prepaying may not be worth it. Check your loan agreement first.
  • If your loan is interest-only or has a balloon payment, the standard EMI calculation doesn’t apply.
  • If you have credit card debt at 18-25% interest, always prepay that first — no investment reliably returns 18% after tax. This calculator is for mortgages, student loans, and other sub-10% loans.
  • Where an employer matches money you put into a workplace scheme, that match is money on the table before any comparison with a loan rate starts. What it is worth depends entirely on the scheme.

Common mistakes people make

1. Comparing one side before tax with the other after it. If the loan attracts relief and the investments are taxed, both figures have to be put on the same footing before they can be compared at all. Measuring a headline return against a relieved loan rate flatters investing every time.

2. Comparing a certain return with an uncertain one. Paying down a loan returns its interest rate, exactly, with no variance at all. An expected investment return is an average over a distribution that includes years deeply in the red. The two numbers are not the same kind of number, even when they are the same size.

3. Ignoring liquidity. Money prepaid into a mortgage is locked in home equity. Money invested in stocks can be sold for emergencies. Always maintain an emergency fund (3-6 months of expenses) before prepaying.

4. Forgetting the employer an employer match. Always contribute enough to get the full employer match before prepaying any loan. The match is a 50-100% immediate return that beats any loan interest savings.

5. Treating debt as universally bad. Some debt (mortgages at low rates, student loans at low rates) is “good debt” — the rate is below your expected investment return, so paying it off slowly and investing the difference is mathematically optimal. Other debt (credit cards at 20%+) is “bad debt” — always pay it off first.

6. Underestimating the psychological value of being debt-free. Many investors find that being debt-free provides peace of mind that’s worth more than the marginal dollars gained by investing instead. The math doesn’t capture this.

Frequently asked questions

Prepay the loan or invest the money?

It depends on your mortgage rate, expected investment return, tax situation, and risk tolerance. As a rule of thumb: if your mortgage rate exceeds your expected after-tax investment return, prepay. If the investment return exceeds the mortgage rate, invest. The calculator handles the specific math.

What return do I earn by prepaying my mortgage?

The "return" on prepayment equals your loan's interest rate (tax-adjusted if interest is deductible). A 6.5% mortgage prepayment is equivalent to a guaranteed 6.5% (or 4.94% after-tax if you itemize deductions) risk-free investment.

Does mortgage interest deduction change the calculation?

Yes. If you itemize deductions, mortgage interest is deductible (up to 750,000 of debt for mortgages originated after 2017). This lowers the effective loan rate by your marginal tax rate. In the 24% bracket, a 6.5% mortgage has an after-tax cost of 4.94%.

Does the highest interest rate always win?

Yes. Always pay off credit cards (18-25%), payday loans (300%+), and other high-interest debt before investing. No investment reliably returns 18% after tax.

What about my an employer match?

Always contribute enough to get the full employer match BEFORE prepaying any loan. The match is a 50-100% immediate return that beats any loan interest savings.

Is being debt-free worth the financial cost?

Often yes, even if the math favors investing. Peace of mind, lower stress, and flexibility to change jobs or retire earlier are real values that the math doesn't capture. If the difference is small, many people prefer being debt-free.

What if I have a low mortgage rate (under 4%)?

Low-rate mortgages (3-4% from the 2020-2021 period) are "good debt" — the after-tax cost is likely below your expected investment return. Mathematically, investing the surplus is optimal. But you may still prefer prepaying for psychological reasons.

How does this calculator handle taxes?

The calculator adjusts the loan rate for tax deductibility (if you itemize) and adjusts the investment return for capital gains taxes. The after-tax comparison is the relevant one for decision-making.

This tool shows math, not advice.

Cite this page

Copy this line into a reference list, a report or a spreadsheet note.

Investment Math Calculator. “Prepay Loan or Invest Calculator”. Updated 2026-10-27. https://investmentmathcalculator.com/guides/prepay-or-invest-calculator/

Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.