Most guppies you buy from a pet store are of such poor genetics from literally hundreds of generations of inbreeding. You'd be luckily to have one of these last 3 months.
On the otherhand, a quality strain from a known breeder can have a decent lifespan. I've had males from some strain live almost 3 years.