Some signs that your car battery is weak and needs replaced soon are dim head lights, head lights that flicker, slow cranking of the engine, constantly needing to charge the battery or your alternator not showing a proper charge on the gauge.
Or if you have a battery light your battery light may come on alerting you to charging problems.
A car battery typically lasts between 5 to 7 years but after 5 years the battery should really be replaced with a new one as preventative Maintenance.
I replace my cars batteries every 5 years regardless if they are still charging or starting the car especially if I plan to take a long road trip.
The battery is cheap enough to replace compared to the pain of being stranded and the cost of a tow.
Sometimes a battery will have a dead cell in it which makes it not take a charge or doesn't allow it to take a charge fast enough.
Sometimes your alternator may seem like it's not charging when in fact it could be the battery.