It's almost never best to pay it off early.
If you're lucky enough to go into a well paying job, it's the question that should be on your mind. Is it better to just pay the bare minimum interest each month, or should you pay in as much as you can?
I've built a basic model to calculate the answer to that exact question, with space for you to edit (yellow highlighted boxes) to incorporate your own situation.
I've compared what would happen to the total amount paid over the 30 years (until it is written off) if you pay extra money in ('Raw amount saved with early payment' box). I've also included what the financial difference is between doing that and instead putting any additional payments into a savings account at 5% interest rate ('total amount saved inc. opportunity cost' box).
Essentially, it looks like you are nearly always best to just save up and put money into a savings account rather than into paying your student loan off early because of the way in which your money can grow extremely rapidly with compound interest.
Download the spreadsheet to edit it properly!