Google:
Typically, the average car battery life is between three and five years. Pushing a battery longer than five years, even under perfect driving conditions, could cause your battery to fail without notice.
Also,
Does a car battery last longer if you drive less?
Inactivity can really bring down your battery's lifespan.
If you don't drive often or you only use the car for short trips, then it's going to weaken your battery. If you only use the car for a brief 15-minute commute, try taking the scenic route or going on a road trip sometime to help prolong the battery's charge.