The LCOE formula
LCOE = Σ costₜ ÷ (1 + r)ᵗ ÷ Σ energyₜ ÷ (1 + r)ᵗ, summed over the years t = 0 to n of the system's life.
- Costs: the investment in year 0 (net of any grants or tax credits you are sure to receive), operation and maintenance every year, insurance, and one-off items such as an inverter replacement. Add fuel for power plants that burn fuel.
- Energy: the kWh produced each year, after degradation. For a system you own, use the kWh you can actually use or sell.
- r: the discount rate, your cost of capital or the return you could earn elsewhere.
The result is in dollars per kWh. Compare it with what a kWh is worth to you: the retail price you avoid for self-consumed power, or the export tariff for power you sell.
Why the energy is discounted too
Discounting kWh looks odd at first, because a kWh is not money. The reason is the definition: the LCOE is the price per kWh at which the present value of revenue equals the present value of costs. Revenue is price × kWh, earned year by year. Moving the constant price out of the sum leaves the discounted kWh in the denominator: price × Σ energyₜ/(1+r)ᵗ = Σ costₜ/(1+r)ᵗ.
Solar has nearly all of its cost in year 0 and its energy spread over 25 years. Dividing undiscounted totals treats a kWh in year 25 like one today and makes solar look much cheaper than it is. In the example, $22,000 ÷ 226,137 kWh = $0.097 per kWh, against the true LCOE of $0.150.
Working through the example
The system costs $16,000 net in year 0, $160 a year to maintain and $2,000 for a new inverter in year 13. It produces 9,600 kWh in year 1, a specific yield of 1,200 kWh per kWp, and loses 0.5% a year to degradation, so year n produces 9,600 × (1 − 0.5%)^(n − 1). The discount rate is 5%.
Each row divides the cost and the energy of its year by (1 + 5%)^year. Summed over 25 years, the costs have a present value of $19,316 and the energy of 129,073 kWh, out of 226,137 kWh actually produced. $19,316 ÷ 129,073 kWh = $0.150 per kWh. If a kWh you use yourself saves more than 15 cents, the system pays for itself at a 5% return; if most of the output is exported for less, it may not.
Worked example: LCOE of an 8 kWp rooftop solar system over 25 years
The inputs are in column G. Costs, degraded energy and both present values are formulas, filled down from year 0 to year 25.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Year | Cost ($) | Energy (kWh) | PV of cost | PV of energy | Input | Value |
| 2 | 0 | 16,000 | 0 | 16,000 | 0 | Net system cost, $ | 16,000 |
| 3 | 1 | 160 | 9,600 | 152 | 9,143 | O&M per year, $ | 160 |
| 4 | 2 | 160 | 9,552 | 145 | 8,664 | Inverter replacement, $ | 2,000 |
| 5 | 3 | 160 | 9,504 | 138 | 8,210 | Inverter year | 13 |
| 6 | 4 | 160 | 9,457 | 132 | 7,780 | Year-1 energy, kWh | 9,600 |
| 7 | 5 | 160 | 9,409 | 125 | 7,373 | Degradation per year | 0.5% |
| 8 | 6 | 160 | 9,362 | 119 | 6,986 | Discount rate | 5.0% |
| 9 | 7 | 160 | 9,316 | 114 | 6,620 | ||
| 10 | 8 | 160 | 9,269 | 108 | 6,274 | ||
| 11 | 9 | 160 | 9,223 | 103 | 5,945 | ||
| 12 | 10 | 160 | 9,177 | 98 | 5,634 | ||
| 13 | 11 | 160 | 9,131 | 94 | 5,339 | ||
| 14 | 12 | 160 | 9,085 | 89 | 5,059 | ||
| 15 | 13 | 2,160 | 9,040 | 1,145 | 4,794 | ||
| 16 | 14 | 160 | 8,994 | 81 | 4,543 | ||
| 17 | 15 | 160 | 8,949 | 77 | 4,305 | ||
| 18 | 16 | 160 | 8,905 | 73 | 4,079 | ||
| 19 | 17 | 160 | 8,860 | 70 | 3,866 | ||
| 20 | 18 | 160 | 8,816 | 66 | 3,663 | ||
| 21 | 19 | 160 | 8,772 | 63 | 3,471 | ||
| 22 | 20 | 160 | 8,728 | 60 | 3,289 | ||
| 23 | 21 | 160 | 8,684 | 57 | 3,117 | ||
| 24 | 22 | 160 | 8,641 | 55 | 2,954 | ||
| 25 | 23 | 160 | 8,598 | 52 | 2,799 | ||
| 26 | 24 | 160 | 8,555 | 50 | 2,653 | ||
| 27 | 25 | 160 | 8,512 | 47 | 2,514 | ||
| 28 | Total | 22,000 | 226,137 | 19,316 | 129,073 | ||
| 29 | LCOE = PV of costs ÷ PV of energy, $/kWh | 0.150 | |||||
| 30 | Same LCOE in one cell with NPV, $/kWh | 0.150 | |||||
| 31 | Undiscounted cost ÷ kWh (too low), $/kWh | 0.097 | |||||
- B3
=$G$3+IF(A3=$G$5,$G$4,0)O&M every year plus the inverter in year 13 - C3
=$G$6*(1-$G$7)^(A3-1)Energy after degradation - D2
=B2/(1+$G$8)^A2Present value of the cost - E2
=C2/(1+$G$8)^A2Present value of the energy - E29
=D28/E28LCOE - E30
=(B2+NPV(G8,B3:B27))/NPV(G8,C3:C27)Same with NPV, year 0 outside
System size, costs, yield and rates are illustrative. Real figures depend on your location, installer, tariffs and incentives.
The one-cell shortcut with NPV
=(B2+NPV(G8,B3:B27))/NPV(G8,C3:C27) gives the same LCOE without the helper columns. Excel's NPV function discounts its first value by one full year, so the year-0 investment stays outside the function, and year-0 energy is zero anyway. Putting B2 inside NPV is the most common error and lowers the LCOE, because it discounts the investment by a year.
For a quick estimate without a table you can use the capital recovery factor: LCOE ≈ (investment × CRF + yearly O&M) ÷ yearly kWh, with CRF = PMT(r, n, -1). It ignores degradation and one-off costs, so the full table is better for a decision.
What moves the LCOE most
- Investment and yield: the year-0 cost sits in the numerator undiscounted, and the yield drives the whole denominator. A 10% higher yield lowers the LCOE by about 9%.
- Discount rate: a higher rate shrinks the discounted kWh far more than the discounted costs, so capital-heavy technologies such as solar and wind are very sensitive to financing costs.
- Life: extra years add energy at a low present value, so going from 25 to 30 years helps less than you might expect.
- Degradation and O&M: small at 0.5% a year and $160, but they add up over 25 years.
LCOE says nothing about when the energy is produced. Solar power at noon may be worth less than power in the evening, which is why a battery or a time-of-use tariff can change the decision even when the LCOE stays the same. For the go/no-go question, calculate the NPV and IRR of the system with your actual savings per kWh.
Common mistakes
- Dividing undiscounted totals. $22,000 ÷ 226,137 kWh gives $0.097 instead of $0.150 and flatters any technology with high up-front cost.
- Putting the year-0 investment inside NPV. NPV discounts its first value by one year. Keep year 0 outside.
- Ignoring degradation. Without it the energy stays at 9,600 kWh for 25 years and the LCOE comes out too low.
- Leaving out one-off costs. Inverter replacements, roof work and removal at the end belong in the cost column in the year they occur.
- Comparing the LCOE with the wrong price. Self-consumed kWh save the retail price, exported kWh earn the export tariff. Weight them by your own split.
- Using a discount rate of zero. Money tied up in panels has a cost. Use your loan rate or the return you give up.
Frequently asked questions
What is the formula for LCOE?
LCOE = present value of all lifetime costs ÷ present value of all lifetime energy, both discounted at the same rate: Σ costₜ/(1+r)ᵗ ÷ Σ energyₜ/(1+r)ᵗ.
How do you calculate LCOE in Excel?
List costs and kWh per year, then use =(investment+NPV(rate,costs year 1 to n))/NPV(rate,energy year 1 to n). Keep the year-0 investment outside NPV.
Why is energy discounted in the LCOE?
Because the LCOE is the constant price per kWh at which discounted revenue equals discounted costs. Revenue is price × kWh in each year, so the kWh are discounted with the same factor as the money.
What is a good LCOE for solar?
There is no single number. Compare your LCOE with the value of a kWh to you: if it is below the retail price you avoid, the energy you use yourself costs less than buying it.