Why is the laptop battery percentage estimate never accurate?

Most laptop users have encountered a situation where Windows shows 2 hours of battery life left, then five minutes later it jumps to 5 hours or even 1 hour. Why does this time jump around like that?