I would do that math on that before committing to paying off the student loans. If your company is matching your 401K and your student loan interest rate is low, then over the long haul you end up with more money investing in your 401K (assuming it beats the interest on the student loan). I'm in the same boat and found an online calculator to help figure it out. https://studentloanhero.com/calculators/student-loan-payoff-vs-invest-calculator/