The real cost of your energy: what it costs to produce one kWh at home with a LiFePO4 battery
When you open the fridge, you don't think about how many cents each minute of the compressor costs. You pay a monthly bill and that's it. But two prices of electricity coexist in your home, and if you want to make a good decision about self-consumption you need both.
The first is the price you pay the utility: what appears on your bill, made up of generation cost + grid fees + taxes + VAT. In Spain, with the 2.0TD tariff, it ranges between €0.22 and €0.46 per kWh depending on the time of day. That's the visible price.
The second is the price it costs you to produce it yourself: the price of the kWh that comes out of your panels or your battery. Nobody invoices it, so almost nobody calculates it. It has a name — LCOE, levelised cost of energy — and it is the only number that lets you compare producing against buying.
This article works it out end to end for a real installation, and shows the six places where the figure usually gets quietly improved.
What LCOE means: cost per kWh like the cost per kilometre of your car
The clearest analogy is the cost per kilometre of your car. When you work out what each kilometre really costs, you don't just add up petrol. You include the purchase price spread over the years you'll own it, insurance, tyres, servicing. LCOE is the same idea applied to energy:
LCOE = (all lifetime costs) ÷ (all useful kWh over that lifetime)
Two rules make the difference between a real number and a brochure number. Everything that has to be paid goes in the numerator, including replacements. And only energy you actually consume goes in the denominator — not everything the panels generate.
The Spanish 2.0TD tariff: why the grid has three prices a day
Since 2021 every home with up to 15 kW of contracted power is on the 2.0TD tariff, which splits the day into three periods with three different prices.
The reference prices in this article are a real, checkable contract: Som Energia's 2.0TD, in force from 1 October 2026. We use Som Energia because it is a co-operative with a fixed quarterly price and a public contract, sitting in the mid-to-upper band of the Spanish market. Comparing our numbers against it makes them conservative, not flattering.
For a typical home consuming 5,000-7,000 kWh/year, the weighted average grid price works out at about €0.30/kWh all included. That's the figure to hold in your head for the rest of this article.
One 2026 development worth knowing: with massive solar generation at midday, the middle of the day often comes out cheaper than the flat period, sometimes cheaper than the small hours — even though it is administratively "peak". Where the price really bites is the evening peak, 18:00-22:00, when the sun has gone. That is exactly the window a battery covers, and it is why the value of storage keeps concentrating in the evening.
Solar production: catalogue figures vs reality on the roof
A 650 Wp panel gives 650 W under laboratory conditions (1,000 W/m², cell at 25 °C, AM1.5 spectrum) that essentially never occur on a roof. The European standard tool for estimating real output is PVGIS, which applies a Performance Ratio typically between 75% and 85% for a well-designed southern-European installation.
For our case — 8 × Longi LR7-72HVH-650M (5.2 kWp), south-facing, 30° tilt, Catalan coast:
| Stage | Value |
|---|---|
| Theoretical STC output, no losses | 9,205 kWh/year |
| Estimated at the meter, after PR 81% | 7,449 kWh/year |
That 19% gap is not pessimism. It is heat (the biggest single loss: −0.30%/°C, and modules run at 65-70 °C in summer), inverter conversion, wiring, soiling, mismatch and degradation. Every number below uses the post-PR figure.
The journey of a kWh from the sun to the lightbulb
Not everything the panels generate reaches your consumption, and what matters is how many conversions each kWh goes through:
- Flow A — Direct consumption: panels (DC) → inverter (AC) → home. One inverter pass.
- Flow B — Via battery: panels → inverter → battery (charge) → battery (discharge) → home. Two inverter passes plus the cell round-trip.
- Flow C — Surplus to the grid: compensated at roughly 5 c€/kWh, an order of magnitude below what it costs to buy back.
The efficiency of the battery route is the product of the whole chain:
95.25% (inverter, DC→AC) × 97% (LFP round-trip) × 95.25% (inverter, AC→DC and back) = 88.0%
Of every 100 kWh that enter the battery route, 88 reach the load. That 12% is the energy price of having the power when you need it rather than when the sun offers it.
The LCOE formula and its five traps
The formula is simple. Getting it honest is not. These are the six places the figure gets improved, in ascending order of subtlety:
Trap 1 — Component replacements. A 35-year system needs more than one inverter. Costing a single unit over the full horizon is the most common omission. The same applies to the rest of the electronics: we also budget the MPPT and Cerbo GX replacement around year 20 (€700) and the battery electronics — BMS, contactors, protections — around year 18 (€600). LFP cells can see out a long horizon; the electronics governing them need not.
Trap 2 — Performance Ratio. Using catalogue Wp instead of PVGIS output inflates the denominator by around 19%, and the LCOE falls by the same proportion for free.
Trap 3 — Injected surplus. Counting exported kWh as "produced" in the denominator lowers the LCOE artificially. You never consume them; they're sold at 4-8 c€ and belong in the payback analysis, not here.
Trap 4 — Discount rate. A euro saved in 25 years is worth less than a euro today. This article uses the simple engineering calculation, with no discounting. If you want the NPV version, multiply the resulting LCOE by roughly 1.2-1.5 at a 3-5% discount rate.
Trap 5 — Subtracting savings inside the LCOE. The subtlest one, and the source of the most spectacular brochure numbers. It means removing things from the numerator that aren't production costs: the tax deduction, the saving on contracted power, the surplus income. The result is an artificially low "LCOE" that then gets compared against the grid price — counting the same benefit twice.
Trap 6 — Charging the battery twice. The inverse of Trap 5. It means working out the payback by taking as the saving only the gap between the grid price and the battery's LCOE. But the LCOE already contains the battery's capital recovery, so dividing the battery price by that reduced saving counts the capital twice and makes the payback look artificially long. Until the September 2026 revision this article presented it as "Method A". We have dropped it from the payback table because it is not an alternative method, it is an arithmetic error.
Our rule: the LCOE contains costs only. Savings are real and material, but they belong in the payback analysis, each attributed to whatever makes it possible. Every figure below follows that rule.
If a salesperson shows you a four-year battery payback, or a "cost per kWh" of one or two cents, ask which of these six they used.
Case study: 5.2 kWp + SB Home30 + Victron MultiPlus
Real numbers from a real installation, over a 35-year system horizon.
| Component | Total cost (35 years) | €/year |
|---|---|---|
| Panels (8 × LR7-72HVH-650M, 5.2 kWp) | €1,355.00 | €38.71 |
| Victron MultiPlus inverter — 2 units in 35 years (1 initial + 1 replacement ≈ year 20) | €3,356.50 | €95.90 |
| SB Home30 battery (30 kWh LFP, SolarBox BMS) | €5,190.00 | €148.29 |
| Materials + installation + MPPT charge controller + Cerbo GX | €2,253.00 | €64.37 |
| MPPT + Cerbo GX replacement (≈ year 20) | €700.00 | €20.00 |
| Battery electronics replacement: BMS, contactors, protections (≈ year 18) | €600.00 | €17.14 |
| Total system investment | €13,454.50 | €384.41 |
The battery works out at €173/kWh, and that includes grade-A LFP cells, a SolarBox 100 A continuous BMS, enclosure, electronics and assembly — a battery ready to install, not loose cells.
Separately, and deliberately outside the LCOE (Trap 5), the benefits that belong in the payback analysis: a 40% income-tax deduction capped at €3,000, less €400 for the two mandatory energy performance certificates, so €2,600 net; and about €96/year saved by cutting contracted power from 5.75 to 3.45 kW, which only the battery makes possible. We take that power term from the same contract the energy comes from — Som Energia's 2.0TD, €41.83/kW·year including taxes — rather than from the regulated PVPC tariff.
Where the energy actually goes
The reference household consumes about 6,900 kWh/year — the profile of an electrified home with a heat pump and evening load. The battery flow is calibrated against one real figure from our monitored fleet: an average daily depth of discharge of 27%. On 30 kWh that is 8.1 kWh a day, about 2,957 kWh a year out of the battery and 2,818 kWh useful in AC:
| Route | Share | kWh in | Efficiency | kWh useful |
|---|---|---|---|---|
| Direct self-consumption (no extra conversion) | 35% | 2,607 | 100% | 2,607 |
| Via battery (charge + 97% round-trip + discharge) | 43% | 3,202 | 88.0% | 2,818 |
| Surplus exported (≈5 c€/kWh) | 22% | 1,640 | — | not used |
Of the ~6,900 kWh consumed, 5,425 come from the sun and about 1,475 kWh are bought from the grid, mostly in winter, when production does not fill the battery. Self-sufficiency: around 79%.
Note the 43% going through the battery: in a house with a heat pump or an EV, evening and night consumption is far larger than daytime. Without a battery those kWh would be sold as surplus at ~5 c€ and bought back in the evening at 22-46 c€. The 22% surplus is the seasonal overflow — in summer the battery fills every day and the load is already covered; in winter production does not fill it. That mismatch is why the pack averages 27% of its capacity and no more.
LCOE by route: the number that matters
Splitting the costs by route is the whole point. A kWh used directly and a kWh that has been through the battery do not cost the same, and averaging them hides the useful information.
| Route | kWh useful/year | Costs attributed/year | Gross LCOE | vs Peak (46.4 c€) | vs Off-peak (21.8 c€) |
|---|---|---|---|---|---|
| Direct self-consumption | 2,607 | €105.24 | 4.04 c€/kWh | 11.5× cheaper | 5.4× cheaper |
| Via battery | 2,818 | €279.17 | 9.91 c€/kWh | 4.7× cheaper | 2.2× cheaper |
| Weighted overall | 5,425 | €384.41 | 7.09 c€/kWh | 6.5× cheaper | 3.1× cheaper |
How the battery route gets to €279.17: the shared costs (panels + inverter + installation + MPPT/Cerbo replacement, €218.99/year) are split by energy share, 51.94% to the battery route — €113.74 — plus the battery itself and its electronics replacement at €165.43, which is 100% attributable. The direct route takes the remaining 48.06%, €105.24, and nothing else.
So the battery adds about 5.9 c€/kWh to the energy that passes through it. That is a real extra cost and we are not hiding it. But it buys a kWh at 9.91 c€ that would otherwise be bought at 46.4 c€ in the evening peak.
One clarification on that 9.91, without breaking Trap 5: it is the gross cost of producing the kWh. The battery also brings a saving no other route can — the €96/year off the contracted power term. Subtract only that, and the effective net cost of battery energy is around 6.5 c€/kWh.
When does the battery pay back?
This is where the answer changes most with the method. Two legitimate methods, two different numbers, for the SB Home30 at €5,190. A third calculation in common use is really an arithmetic error — see Trap 6.
| Scenario (battery energy consumed at…) | Method B (simplified) | Method C (real net) |
|---|---|---|
| 100% off-peak (P3) | 8.5 years | 9.4 years |
| Realistic (34% P1 + 17% P2 + 49% P3) | 5.9 years | 6.4 years |
| 100% peak (P1) | 4.0 years | 4.2 years |
The realistic profile reflects when a domestic battery actually discharges. On weekdays it does so mostly into the evening peak (18:00-22:00), the late flat hours (22:00-24:00) and the small hours. At weekends and on holidays the whole day is off-peak.
Method B — the most optimistic. Battery cost divided by the grid price of the kWh it replaces, no adjustments. This is the one low-cost sellers use: it flatters the result because it ignores the surplus income you no longer earn, now that you store those kWh instead of exporting them.
Method C — the honest one, and the one we recommend. What you stop paying the grid, minus the surplus income you no longer receive, plus the contracted-power saving that only the battery makes possible. Worked out for the realistic case, at an average avoided price of 31.11 c€/kWh:
Gross saving: 31.11 c€ × 2,818 kWh = 876.68 €/year
− Surplus income forgone (3,202 kWh × 5 c€) = −160.09 €/year
+ Contracted power saving = +96.20 €/year
─────────────
= NET saving = 812.79 €/year
Payback: €5,190 / €813 per year = 6.4 years
If you also attribute the battery's proportional share of the net tax deduction — 49.5% of €2,600, about €1,288 — the amount to recover drops to €3,902 and the payback to 4.8 years.
We value exported surplus at ~5 c€/kWh, which is a market average rather than our reference supplier's price: Som Energia pays €0.030/kWh, among the lowest there is. We use the average because you need not be their customer. In Method C that works against us — the more the surplus is worth, the larger the income you forgo by storing it — so the payback above is the conservative one.
The important message in that table is not any single figure. It is the sensitivity to when you use the energy: between 4.2 and 9.4 years depending on nothing but timing.
And on sizing: at an average 27% depth of discharge an SB Home30 has plenty of headroom. A single 15 kWh module would shift the same energy — the battery is limited by the sun and the load, not by its capacity — working at 54%, and at half the price it would pay back in 3.2 years instead of 6.4. The price of that is cycles: 6,899 over 35 years instead of 3,449, which is inside the cells' rated life rather than below it, and a projected 57% state of health at year 35, leaving 8.5 kWh usable against the 8.1 kWh the house consumes daily. With 30 kWh, 20.4 kWh remain. That is why our reference is the Home30: the single module pays for itself sooner, the 30 kWh one reaches the end of the horizon with margin. The module is always 15 kWh and the cabinet takes one or two.
A conclusion that changed in October 2026. Earlier versions of this article said plainly that if all your consumption falls in the off-peak period, a battery makes no sense: at 12 c€ off-peak the payback ran past 16 years. The October increase raised the full off-peak cost by 17.9%, to 21.8 c€. Against a production cost of 9.91 c€, the margin is now there, and the payback is 9.4 years. It remains the worst of the three scenarios — but it is no longer a bad deal, and we would rather say so than leave the old advice standing.
Why your LCOE will be different
Three honest reasons the number in this article won't exactly match yours:
1. Your location. PVGIS production in Catalonia is ~1,432 kWh/kWp; in Germany it's ~950; in Andalusia ~1,600. The same hardware produces different amounts.
2. Your consumption pattern. A family at home during the day (retirees, remote workers) uses much more direct solar; a working family that's out 9-18h depends more on the battery. The split between Flow A and Flow B changes the LCOE.
3. Your installer's pricing. Quality varies. Quotes for the same kit can differ ±30%. Always demand: PVGIS report, real efficiency figures (not catalogue), and clarity on what's included (often electrical work, scaffolding, paperwork are extras).
Conclusion
The real cost of one kWh of self-produced energy is not a single number, and that is the main thing to take away. Used directly it costs 4.04 c€/kWh; once it has been through the battery, 9.91 c€/kWh. The battery adds about 6 c€ to the kWh that passes through it — and even so that kWh is 4.7× cheaper than buying it at the evening peak, and still 2.2× cheaper than buying it at the cheapest hour of the day.
Weighted across both routes, the energy this household produces costs 7.09 c€/kWh against a grid average of about 30.3 c€ — roughly 4.3× cheaper. Those are gross figures, with no tax deduction and no contracted-power saving subtracted: both are real, and both are counted in the payback section where they belong.
What separates a profitable installation from a so-so one isn't the headline price — it's how well the system is dimensioned for your actual consumption pattern, and how transparent your installer is about real (not catalogue) production figures.
Want the same LCOE calculation for your home, with your actual consumption and your roof? Request a free analysis. We compute it transparently — formulas, PVGIS data, real efficiency, no commercial promises. The Catalan version, with day-by-day energy flow charts, is here. We also cover sodium-ion cells, the chemistry most likely to change these numbers next.