I don't count 401k, because it's pre-tax. I put like 3% of my meager paycheck towards retirement (I have a whopping $200 whoo!), and don't consider that in my budget calculations.
If you're just sticking that income in a savings account, the most you will make is like 2% interest. No loan is going to have interest that low, so you will be losing money. Investments get a little more complicated.
Take the initial $240K
loan, starting today. If interest is 6.9% (I'm not sure what federal interest rates are right now, but that's about what the interest on my loan is right now), the interest alone will be over $1k per month. If you pay $2k a month, you'll be done in 2026 (15 years). You'll also pay out $168k in interest alone. If you pay $4k a month, you'll be done in 2013 (5 years) and will pay out $55k in interest. That's a savings of $113k.
If you pay the $2k a month and
invested the other $2k at a rate of 7.5% (generous, I think, and just for demonstration purposes), you will get $355k over the 10 additional years it'll take to pay off the loan, but you'll only bank $242k of that, because you'll be paying all that interest. If you invest $4k (the total amount you have available after you finish paying off you loan in 5 years) for those ten years, you'll bank $711k, because you won't have additional interest to pay.
So, I was mistaken. You may not end up paying out more than you save, but you certainly will be saving a lot more if you pay off the loan first.