My 2013 13" MacBook Retina (OS X 10.10.3, Yosemite) shuts down when I have about 20 minutes of battery left. Not sleep, full shut down. It does this with no warning at all.
I seem to remember earlier Mac laptops giving me a low battery warning at around 20% and then putting the machine to sleep (hibernation?) when it gets real low... but never a full shut down.
Does my battery need to be recalibrated? Does the system inaccurately think it has some juice left? Worth mentioning, when I plug it back in and boot it back up, it claims to be at about 15%.
Update: I've done the recalibration thing a couple of times now, but still no difference in performance. What's frustrating is that I never get the low battery warning and the machine doesn't sleep; it shuts down. I've done tons of Googling around and everything I find says exactly what Buscar웃SD suggests below. The one weird thing that I found on Apple's site is this:
"If your portable Mac has a built-in battery, you don’t need to calibrate the battery."
Can't say I've ever heard that before.