Shutting Down iPhone 
(Why your iPhone suddenly turn off when there's still a battery) 

Ever wonder why your iPhone, iPad, or iPod suddenly turns off when you still have 30%, 50%, or any other percentage of battery remaining? I some iPhone users have this problem. Sometimes issues related to iPhones randomly shutting off are caused by water damage or other unfortunate accidents. But aside of those misfortunes, there are still other cases that causes this problem: 

Situation 1: It's may or may not be your Battery. Your iPhone’s software is in charge of monitoring the amount of battery life remaining on your iPhone. If the software or firmware isn’t communicating properly with the battery, it’s not going to display the right percentage. 

Situation 2:  If it’s not “soft”-ware, and it’s not “hard”-ware, then its “Firm”-ware. To fix the issue with your iPhone shutting off even though it says there is still battery life remaining, we’re going to do a “DFU (Device Firmware Update)Restore”. 

Some people try to use an external battery pack like the ones you’ll find on some online shops as a temporary stopgap, but if your iPhone is damaged, it may not help at all. 

If the issue comes back after you’ve done a DFU restore, you’ve eliminated the possibility that a software or firmware problem is causing your iPhone to turn off with battery life remaining or, in some cases, to randomly jump from one percentage to another. If that’s the case, you may need to repair your iPhone.