There is no sure-fire way to tell how long a spring will last. It depends how often the door is getting used. You could also have a defective spring from the manufacturer as well which will affect the lifespan of the spring. If you notice your garage opening slower or any jerky motions when opening or closing then your springs are probably starting to wear.
It’s much better to replace your springs with new ones a couple of weeks early rather than have them snap and finally give out. Snapped springs can damage the door and will cause a dangerous situation. In all cases, leave garage door spring repair to the professionals.