In that case, you should probably account for the time value of money and the depreciation of your solar roof. 15,000$ today is worth almost 50,000$ in 20 years at 6% interest rate (long term stock market returns are about 7%). Let's say the solar roof depreciates by half in 20 years and produces 14,000$ worth of electricity. You end up with 14,000$+7,500$=21,500$. Energy cost would have to increase a lot to make the solar roof a wise investment. Also, a quick Google seems to indicate that the inflation adjusted cost of residential energy tends to go down over time (e.g. nominal price goes up, but not as fast as inflation).