First, click the Apple Logo in the upper left-hand corner.
Then, click "About This Mac."
Select "System Report."
In the left-hand side, click "Power." It will be under "Hardware."
Lastly, you can check the cycle count for your Mac's battery. Cycle count's differ from Mac-to-Mac, so make sure that you check out the cycle count for the Mac model you have.
While most Macs have a maximum cycle count of 1000, not all do. So, check out support.apple.com and find your model for the correct maximum cycle count. Then, compare the cycle count reported in the System Report.
If your battery has reached the maximum cycle count, it needs to be replaced.