I got a $12k year-end bonus last December. My mortgage balance is $180k at 3.1% fixed. I put the entire bonus into VTI.
Here's my reasoning: my mortgage rate is 3.1%. The historical average annual real return of the US stock market is approximately 7% after inflation. The gap between 7% and 3.1% is roughly 4 percentage points — per year, compounded. Over the remaining 18 years on my mortgage, the present value of that difference is substantial.
Some people factor in the psychological value of being debt-free. I understand that argument. But I can't justify paying down 3.1% debt when equity markets historically return 7% real. The math clearly favors investing.
The calculus changes meaningfully above roughly 5-6% mortgage rates, and even more clearly above 7%. If you have a mortgage from the last two years, the math might favor extra principal payments.