iPhone turning off with plenty of battery remaining Lately my iPhone 4 has been getting to 19% battery and then dropping straight to 1% and shutting off. Once I plug it back in and start it up it immediately shows up at 19%. Is this a battery or software issue?
Might be a battery calibration aka battery hardware to software communication issue where the iPhone's thinks there is more power than the battery can provide. When was the last time (before the iPhone started to just shut down at 19% battery) that you did a battery calibration as recommended by Apple.


  Use iPhone Regularly
  
  For proper maintenance of a lithium-based battery, it’s important to keep the electrons in it moving occasionally. Be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).


If you don't then what you are describing above may happen where the phone just shuts down with a random non 0% battery percentage left. If the problem still persists after doing a couple of battery calibrations then it may be that the battery or other hardware is failing, and that the iPhone should be taken to a Authorized Services provider / Apple for more attention.