My iPhone 4S turns off for no reason?

Sometimes I will be able to use it for over a half hour when it's at 1% battery, but other times it will shut off when there's battery life remaining, e.g., 8% or 12%. And just now it turned off at 27%! This doesn't seem normal to me. Does this happen to anyone else? What could the problem be?

Try reinstalling the latest update or else it is a hardware issue.