Your best bet for that kind of thing would be a linear interpolation from a set of data. Like Rick said,"log" the batteryvalue. Push all the values in an array, so you have, like, 5 values prior to the instant you're looking at. Then, calculate a regression line using the formula
http://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line. Then calculate the intercept, where the line gets to 0. Some phones go to sleep when the battery is at 0,5 or even 15 %. It depends on the calibration, etc, so take what is the lowest bound for your phone. You'd have to take into account the possibility of upwad trend (charging), and probably reset the array as soon as the phone is unplugged from charging.
I've done a similar profile, so if you want mine or if you want more help to do that, tell me
Another option is having a dedicated app do that (I've used battery diviner), which might be more powerful (can adapt depending on your usual schedule), and get the value from the app, by shamelessly getting it from it's sqlite database maybe. Depends if you're rooted or not.