Yeah, the big variables are utility electricity price ($0.10/kWh utility pricing makes solar less effective than $0.50/kWh), price for the panels + installation, and ~capacity factor. If the panels last long enough, and they usually will, as long as the installation is appropriately sized it likely eventually pays for itself. It's just usually longer than two years.