Try powering the phone off, plugging in the charger, and powering the phone on. That'll help clear the cache and anything that may be interrupting the charging process. My guess is it's either a funky app or you're using a 3rd party charger and there's a voltage issue.
Also, try rebooting right after you're finished charging, I bet it'll jump up to 100%.
And, take a look at this document for further assistance:
If it's still not working, perform a factory reset by going into menu > settings > privacy > factory data reset - that'll delete everything on your phone (not SD Card) so make sure you have everything backed up. Contacts will resync with Google and T-Mobile after you restart everything.
If, after all that, it's still not working, I'd call T-Mobile about getting a replacement device sent out.