My MacBook just started thinking it's on AC power even when unplugged.
None of the proposed solutions worked: Cleaning the MagSafe adapter and port, PRAM and SMC reset, etc. So most likely a logic board or hardware issue, and this laptop's so old and out of warranty there's no way I'm paying for a logic board replacement.
So I was stuck with the fact that the MacBook would not display how much power was left in the battery using the standard Apple menu. Not good when you're on the go.
However, I did notice that in System Preferences > Energy Saver it did show the "Current battery charge: XX%" accurately. So the issue was that XX% wouldn't show up in the menu bar.
As a workaround, I downloaded the freeware called "Slim Battery Monitor" and it now shows me the XX% accurately in the menu bar. Even though it still thinks it's charging on AC, at least it shows the XX% accurately again so I know how much battery life is left. Not a real fix but better than nothing...
Anyway, if you can still see the XX% in System Prefs > Energy Saver, this may help you. Good luck!