1. Test it before you buy a new one
A battery that has been flat for weeks can often hold a charge again once it is charged, and a car with a drain on it will wear out a new battery in weeks. Test the battery, then look for the drain.
2. The resting voltage
With the engine off and the car left for a few hours, a fully charged 12-volt battery reads about 12.6 to 12.8 volts. Above about 12.4 is fine. Below 12.2 usually means it needs charging, and below 12.0 means it is likely finished.
3. Test it under load
A battery can read well and still be weak. A load tester tells you the truth: a healthy battery turns the engine over quickly, and a tired one turns it slowly and sounds strained.
4. Look at the terminals
White or green crust on the battery posts is corrosion. It adds resistance, so the starter sees less voltage. Clean it with a wire brush and a mix of baking soda and water, dry it, and refit the clamps.
5. Watch for the warning signs
Headlights that dim when you turn the key, a battery that needs jump starting every week, or a car that will not start after a long drive all point at the battery. A battery that runs flat while driving is usually a charging fault, not a failed cell.