# Evaluating Solar

In 2018, [we installed](https://www.jefftk.com/p/solar-one-year-in) 14 solar panels on the Northwest roof of our house. This is a little silly: wouldn't you want to install them facing the sun? The problem was the enormous tree to our Southeast, twice the height of our house, completely shading that area. It was a great tree, but it was causing problems for our neighbor, so they took it down a couple years ago. I looked at getting solar at the time and got as far as signing a contract, but then it fell apart a week before install when the company said they couldn't actually install the [sunlight backup system](https://www.jefftk.com/p/solar-blackout-resistance) we had planned.

Since then, electricity has gotten more expensive while panels have gotten more efficient and cheaper, and I started thinking more after seeing how [heat pumps don't work out with our electricity rates](https://www.jefftk.com/p/running-the-numbers-on-a-heat-pump). Here's what we're considering:

[![](https://www.jefftk.com/solar-design-2024.png)](https://www.jefftk.com/solar-design-2024-big.png)

This is 22 [QCell 425W](https://us.qcells.com/q-tron-blk-m-g2/) panels initially producing 9,292 kWh/year. That would give about ~$3.2k/y in electricity savings + credits. I got quotes from three companies, and the best (after tax credits) was around $20k.

This is pretty good ROI, with payback in 5-6 years. But what I really care about is how this compares to what else I would do with the money. This isn't money we need short term, so I think the opportunity cost is whatever the stock market would do with $20k. But these are very different sorts of things: with stocks you put money in and at some point in the future you take an, ideally larger, quantity out. With solar you put money in and then each year for the life of the system you pay less in electricity. I don't know the right way to compare them in an open-ended way, but we can analyze the decision over a specific number of years.

I'm going to model two scenarios. In the first we take $20k from stocks to put in solar, and then invest returns back into stocks. In the second, we leave the $20k in stocks. Results here also depend on what happens to stocks and electricity rates. I'm going to keep everything in 2024 dollars, and guess a real (inflation-adjusted) price increases of 7% for stocks and 3% for electricity \[1\]. It got a bit too complex for a spreadsheet, so I wrote a script \[2\]. It looks like it takes a bit over seven years before solar comes out ahead:

[![](https://www.jefftk.com/portfolio-value-solar-vs-no-solar.png)](https://www.jefftk.com/portfolio-value-solar-vs-no-solar-big.png)

I'm pretty sure this is the right way to do the analysis, but it's not obvious: the version solar installers give you ignores opportunity cost, and my first attempt missed that you invest your electricity savings in stocks.

EDIT: It's actually slightly better for solar than this analysis suggests because stock gains are taxed at a long-term capital gains rate when you sell, while electricity you refrain from buying is untaxed. Unfortunately, this is hard to work into the model because I've done everything in real space but capital gains are assessed in nominal space.

Overall, this seems pretty worth it, but I'm open to being convinced it isn't!

  
\[1\] In 2018 we were paying $0.217/kWh ($0.265/kWh in 2024 dollars) for electric, and now pay $0.316/kWh. This is 3%/y on top of inflation.

\[2\] In python:

STOCK\_GROWTH\_REAL=0.07
ELECTRIC\_GROWTH\_REAL=0.03
PRODUCTION_DECAY=0.9966
INCENTIVE_DECAY=0.945
INIT\_PRODUCTION\_kWh=9_292
INIT\_ELECTRIC\_RATE=0.32
INIT\_INCENTIVE\_RATE=0.033
SOLAR\_COST=20\_000
YEARS=20

solar_stocks = 0
non\_solar\_stocks = SOLAR_COST
production = INIT\_PRODUCTION\_kWh
electric\_rate = INIT\_ELECTRIC_RATE
incentive\_rate = INIT\_INCENTIVE_RATE

print("year", "solar value", "no-solar value", sep="\\t")
for year in range(YEARS):
    production *= PRODUCTION_DECAY
        electric\_rate *= 1 + ELECTRIC\_GROWTH_REAL
            incentive\_rate *= INCENTIVE\_DECAY

    solar\_stocks *= (1 + STOCK\_GROWTH_REAL)
    non\_solar\_stocks *= (1 + STOCK\_GROWTH\_REAL)

    solar\_stocks += production * (electric\_rate + incentive_rate)

    print(year+1, solar\_stocks, non\_solar_stocks, sep="\\t")

*Comment via: [facebook](https://www.facebook.com/jefftk/posts/pfbid02gqkoyaZc49375VAGKdTtkT5qMRTjuyWF9Z8oHpziJc7pj9YXRVeQh6bFqZ22DFMal), [mastodon](https://mastodon.mit.edu/@jefftk/111948996626600803)*