After about nine months of having my iPhone 5, I noticed that it seemed to be draining faster and would be empty by the end of the day, if I didn't charge it. I hadn't changed my usage patterns, but it was clear that the battery just wasn't performing as it had before. I had to resort to carrying an external battery with me and plugging it in whenever I could.
Then a couple months later, things got significantly worse. The battery would go from, say, 40% to 10% in a second. Or from 20% to 2%. The phone would often shut down, even though the battery indicator showed 20-30% charge remaining. I could not turn the phone back on until I plugged it back in. Sometimes, it would turn on and work a while longer. Sometimes, I would turn off again once I unplugged the charger.
Something was wrong. This summer, Apple acknowledged problems with the batteries in an early run of iPhone 5s. However, when I checked the serial number of mine in its online tool, it was not eligible for a free battery replacement. So, I took my phone to the Apple Store and complained about the battery life. They ran some tests that showed that the battery's full capacity was at just under 90%, which is normal for a battery with around 300 charge cycles, as mine had at the time. The full capacity of a new iPhone 5 battery should be 1440 mah, but with time and use, that decreases. So, a 100% full charge doesn't mean the same thing on a phone that's two years old as it does on one that's brand new.
I had previously checked the capacity of my battery using a tool called iBackupBot, which you can download for free. Sometimes it was in the 85-90% range, and sometimes it was in the 60% range. I explained this to the Apple Genius, but he insisted that the battery itself was in good shape and that I likely had a software problem. How can I solve this, I asked. He told me to wipe the phone and set it up as new. I.e. do not restore it from a backup. Because I do not want to upgrade to Apple's current iOS, which would slow the performance of my phone, and because I wasn't in a position to be able to backup information from my phone at the time, I rejected this solution.
Instead, I decided to try my luck with a new battery. When I asked that Apple install one for me, they declined because, according to their tests, the battery was in acceptable condition. So, I went on eBay and purchased a battery and the tools required to install it from a seller called ambassador-west. With shipping, it cost $7. It arrived two days later, and I installed it using the instructions in the video below. (If you're willing to pay a little more, you can get one from Amazon with Prime shipping here.) Other videos and instructions you might find online suggest that you remove the cable that connects the screen to the logic board. I recommend that you not do this. It makes the installation process a little more difficult because you have to hold the screen while you're removing and inserting the battery. However, I've read many accounts from people who were unable to successfully reattach the small, fragile cable, rendering their screens blank.