Well, the interest rate is a consideration, but it is pretty low on my list.
1. Does your employer match 401k Contributions?
2. Are you eligible for the Savers Credit on your federal taxes?
3. What's your effective tax rate overall?
4. Are the Student Loans private or federal?
5. What is your income (i.e. do you qualify for the Pay As You Earn repayment plan)?
6. What is the interest rate?
7. What is my current asset allocation compared to what I want it to be (for example, I own a house but the home equity is more than 50% of my net worth. I'd rather that be a smaller percentage so I'd want more money in the stock market).
So for me personally, I have ~$70k in student loans but a fairly high income (and thus a high effective income tax). My employer matches the first 3% of 401k contributions so that definitely comes before student loans.
After that, money I put in Traditional Accounts and 401k's is tax free so I get like 32% off anything I put in those accounts. So personally, I max all my retirement accounts before I put money towards the student loans. I'd probably think differently if my loans were 8.5% APR loans but they aren't.