This has been happening for around 6 months and it has gotten worse. I thought it was the battery because it had close to 1500 cycles. But I recently replaced it and now the problem seems worse. The MacBook randomly shuts off plugged in and on battery. I did the SMC reset by pressing control-shift-option and holding power for 5 seconds but that did nothing. Any ideas would be greatly appreciated.