A couple of months ago my Macbook started shutting down with the battery showing 18% life left.
Even though the Macbook and battery were around 10 months old Apple sent me a new battery, which has been problem free.
I guess it was defective.
Maybe your's is defective as well.
I'd give them a call if you had your computer less than a year.