Yeah, that's a sure sign of the laptop's battery is starting to fail. Batteries usually only last about 3 - 4 years. It's time to buy a new one.
One way to prolong the life of the battery is not to charge it to 100% capacity when you are simply using it while plugged into the the A/C out (sometimes referred to as "the mains"). Some modern laptops do not allow the battery to be charged beyond 50% or 80% or something in between them (depends on the manufacturer) unless you override the laptop to do so.
Basically the theory is that when the battery is close to it's maximum capacity, the efficiency of the chemicals inside the battery to retain a charge breaks down faster than when the battery is not fully charged (or close to fully charged). In simple terms, the more you use the battery the sooner it will die.
When I use my laptop at home I just remove the battery.
As laptop batteries get used the the remaining power calculation performed by the micro controller looses its accuracy after a while. Your computer shutting off at 28% means the battery needs to be re-calibrated so it knows how much capacity it can store as of today and take into account the "ware and tear" on the battery.
In order to re-calibrate it so your remaining capacity/ "Wear and Tear" is known and is accurate do the following.
1.) Charge the battery to 100% and let it rest for about 2 hours.
2.) Unplug the power cord and set the computer to hibernate automatically at the minimum percentage possible. (Make sure to set it to the minimum so you get the most accurate re-calibration)
3.) Perform a full charge non-stop until its maximum capacity (100%).
In the end, this process should prevent you from suddenly running out of power, it will not restore lost capacity in the battery. Only a new battery will do that. The good news is that there are some very high end/ high capacity replacement batteries that retain around %70 of its capacity even after 500 charges. These types of products are newer and weren't available a year ago.