> 25 years at a minimum
So long as the roof itself lasts that long. People who are mid-cycle on their existing roof should not install solar until they get to the next replacement. This is where I am, and why I do not have rooftop solar. I expect to get 15 additional years from my roof, and there's no guarantee I will have hit the break even point by then. Plus, solar installers will not warranty a mid-cycle roof against leaks, so if something goes wrong that quickly eats into your cost savings.
It is also cheaper to get it installed if you're already doing a roof replacement. Especially if you're getting built-in modules instead of retrofit, since they replace some of the roof surface instead of going over it.