Impossible to answer. It depends on how fast you're going, what gear you're in, if you go up hills etc. Just try and keep the revs as slow as possible until you get to a petrol station.
Presumably you have a rough idea of your usual MPG? Next time the light comes on, fill up ASAP. Note the quantity bought, and subtract from the tank capacity. This will give the amount of fuel that was left when the light came on.
it is bad practice to allow this to happen as diesel cars normaly rely on a wet pump for lubrication & should not be run dry. also any contamination from the bottom of the tankl can block the injectors.