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.
In extension to Ben Dolman's answer, you could also calculate the fluctuating within the algorithm. It will be more smooth, but it will also predict the avarage speed.
Something like this:
prediction = 50;
depencySpeed = 200;
stableFactor = .5;
smoothFactor = median(0, abs(lastSpeed - averageSpeed), depencySpeed);
smoothFactor /= (depencySpeed - prediction * (smoothFactor / depencySpeed));
smoothFactor = smoothFactor * (1 - stableFactor) + stableFactor;
averageSpeed = smoothFactor * lastSpeed + (1 - smoothFactor) * averageSpeed;
Fluctuation or not, it will be both as stable as the other, with the right values for prediction and depencySpeed; you have to play with it a little depending on your internet speed. This settings are perfect for a avarage speed of 600 kB/s while it fluctuates from 0 to 1MB.