Sure you could divide the remaining file size by the current download speed, but if your download speed fluctuates (and it will), this doesn\'t produce a very nice result.
I use this equation I derived myself.
In VB.NET code:
Dim ed As TimeSpan = TimeSpan.FromSeconds((sd - l) / r)