This is directly from HTC tech support to recalibrate battery and HTC charger when battery rapidly or erratically discharges, This procedure clears all battery stats, coordinates and normalizes charging.
Turn off Fast Boot in settings. Power off phone. Plug phone into HTC charger and charge for two minutes or more while charging. Hold down volume up+volume down+power button and continue holding phone will turn on and off repeatedly every 15 seconds or so while continuing to hold all three buttons. Keep this going for 2 minutes, then release buttons when phone is on. Now, let phone charge fully normally (with phone either on or off--doesn't matter) and battery level reporting, charging and battery life should be normalized.
Do this every month or so to keep power system healthy--even if everything seems fine. Also, don't leave phone on charger overnight for best long term battery life (according to HTC tech support: "The first thing they tell us." This is true even though charging is supposed to turn off when battery is at 100%)
NOTE: Another potential fix for battery/charging abnormalities if this procedure fails (esp. after an*OTA*update when corrupted files can remain stuck in device cache partition)--clear cache partition using this method:*