You're already planning on changing the battery in the old iPhone you've got so it stops shutting down randomly, so why not do the same with your MacBook? Depending on how much you use your laptop, that battery could be ready for a change.
You can figure out the health of your battery yourself before deciding whether or not it needs to be replaced (or making an appointment at an Apple store) by digging into the system yourself, or consulting a third-party app for even more in-depth information.
Check Your Cycle Count
Your battery cycle count increases each time you recharge your battery completely, whether all at once or over a few days. Fully charging a dead MacBook? That's one cycle. Charging it 10% at a time over 10 days? That's one cycle. Your battery supports a finite amount of cycles before it starts to degrade.
You can see how many cycles your battery has been through by looking through your System Information. Hit the apple icon in the menu, select About This Mac, and select System Information. Expand the Hardware menu in the System Information window and select Power. There you'll see your cycle count. You can see where that number falls on the maximum cycle count for your notebook by consulting Apple's battery cycle count limit list.
Get an App
Want a more detailed analysis of that battery? You should get a system monitor app. There are a bunch of apps that will tell you the health of your battery, its state of degradation, or an estimated running time for your Mac, but a system monitor app can do the same function along with a lot more in-depth information about your Mac. Use can use an app like MenuBar Stats 2, which provides system information along with support for plugins monitoring other computer vitals like fan speed.
Get a Replacement Battery
Want Apple to replace your degrading battery? Laptops covered by AppleCare that retain less than 80 per cent of their original capacity are eligible for replacement free of charge, while devices out of warranty are subject to a fee, depending on the MacBook you have.