Although I personally believe you'll do better than 5% investing in stocks over the long run, many people may disagree. In this case, whether you invest or repay the loan early, you come out even.
So what expected rate of return should you use to make your own calculation? I think 7% is a totally reasonable target and may even be on the conservative side. I've heard Dave Ramsey use 11 or even 12% as his expected investment returns. It's possible, but I wouldn't bet on it. If you're a more aggressive investor, use 10%.