Suppose you get a bonus, or some money you weren't expecting. You could put it straight toward your home loan (a prepayment), which means you finish the loan sooner and pay less interest overall. Or you could invest it instead, and let it grow. Both are reasonable. Here's a simple way to actually compare them, instead of just guessing.
The one idea that makes this comparable
A rupee of interest you avoid by prepaying is a guaranteed return equal to your loan's interest rate — every rupee less that you owe is a rupee that can never be charged interest again. An investment, on the other hand, is never guaranteed — its return depends on markets, and can go up or down. So the real comparison isn't "which number is bigger" — it's "is the extra, uncertain return from investing worth giving up a certain one from prepaying?"
A worked example
Take the same ₹50L loan at 8.5% from the EMI guide. Three years in, you come into ₹5L. Here's what each path gets you, assuming an investment return of 11% a year — a reasonable long-term assumption for equity investments, though never a guaranteed one:
Prepaying this ₹5L finishes the loan 3 yr 5 mo earlier and avoids ₹12.79L in interest you'd otherwise have paid. Investing the same amount for that same stretch of time, at the assumed return, would grow to roughly ₹7.27L. In this example, prepaying comes out ahead on paper — but only because of the return rate we assumed.
Why the "on paper" answer isn't the whole story
If your loan's interest rate is genuinely low, investing often wins on pure numbers — but only if you actually get that assumed return, which isn't promised. Prepaying, by contrast, is certain and also brings a real, non-financial benefit: less debt hanging over you, and a lower required EMI if something in your income changes. Some people prepay specifically for that peace of mind even when the math slightly favors investing — that's a reasonable choice, not an irrational one.