← Back to blog

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.25 and €0.40 per kWh depending on the time of day (prices from January 2027). 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.

Spanish 2.0TD tariff — 3 periods, 3 prices Som Energia 2.0TD, from 1 January 2027 — everything that hangs off a consumed kWh (energy + grid fees + system charges + adjustment services + electricity tax + VAT) P1 — Peak 39.8 c€/kWh Weekdays 10h-14h and 18h-22h → Consume from battery or direct solar P2 — Mid 28.1 c€/kWh 8h-10h, 14h-18h, 22h-24h → Evaluate based on available solar P3 — Off-peak 25.4 c€/kWh Nights, weekends, holidays → Charge from the grid only to cover peak Difference Peak vs Off-peak: 14.4 c€/kWh After the battery's 88% efficiency, 10.9 c€ is left per kWh shifted to peak.
The Spanish 2.0TD tariff defines three price periods. A battery charged from the grid off-peak keeps about 10.9 c€ of the 14.4 c€ spread for each kWh it delivers at peak, once its 88% efficiency is paid for.

The reference prices in this article are a real, checkable contract: Som Energia's 2.0TD in force from 1 January 2027, with everything that hangs off a consumed kWh — Som Energia's price, which already includes grid fees and system charges, plus adjustment services (€0.025/kWh), the 5.11% electricity tax and 21% VAT. Until 31 December 2026 the October prices still apply (34.8, 24.7 and 22.3 c€); we use the 2027 ones because a battery pays back over years, so the price that counts is the one coming in, not the one going out. Between 7 October and 27 November 2026 this article quoted 46.4, 27.5 and 21.8 c€, because our reference counted grid fees and charges twice when Som Energia's price already includes them. 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 consequence of these prices: charging the battery from the grid off-peak only pays to cover the peak. At the 88% efficiency of the battery route (see below), a kWh bought at 25.4 c€ reaches the load at 28.9 c€ — dearer than the mid period (28.1 c€), and 10.9 c€ cheaper than peak, which still covers the 6.5 c€ the battery adds to each kWh. Where the battery really earns is on solar you would otherwise export at 5 c€.

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, and its loss is already inside the PVGIS figure, so this route loses nothing more.
  • 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, five to eight times less than it costs to buy back.

The efficiency of the battery route is the product of the whole chain:

95.25% (charging conversion) × 97% (LFP round-trip) × 95.25% (discharging conversion) = 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 six 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 about 24% (9,205 kWh instead of 7,449), and the LCOE comes out about 19% lower 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. With discounting, the overall LCOE in our case goes from 7.42 to 11.0 c€/kWh at a 3% rate and to 13.8 c€/kWh at 5% (factors of 1.5 and 1.86). The factor is high because almost all of the investment is made in year zero, while the energy arrives spread over 35 years.

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,823.32 €166.38
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 €14,087.82 €402.51

The battery works out at €194/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. The price, €5,823.32 including VAT, comes from our November 2026 costs; until then this article said €5,190, the May price.

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 €99.5/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 from 1 January 2027, €30.496 + €3.517/kW·year before taxes and €43.26 with them (€41.83, and €96/year, with the October 2026 terms) — 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 25-40 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 (39.8 c€) vs Off-peak (25.4 c€)
Direct self-consumption 2,607 €105.24 4.04 c€/kWh 9.9× cheaper 6.3× cheaper
Via battery 2,818 €297.27 10.55 c€/kWh 3.8× cheaper 2.4× cheaper
Weighted overall 5,425 €402.51 7.42 c€/kWh 5.4× cheaper 3.4× cheaper

How the battery route gets to €297.27: 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 €183.52, which is 100% attributable. The direct route takes the remaining 48.06%, €105.24, and nothing else.

So the battery adds about 6.5 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 10.55 c€ that would otherwise be bought at 39.8 c€ in the evening peak.

One clarification on that 10.55, without breaking Trap 5: it is the gross cost of producing the kWh. The battery also brings a saving no other route can — the €99.5/year off the contracted power term. Subtract only that, and the effective net cost of battery energy is around 7.0 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,823. They are called B and C because A, which stood here until September 2026, was not a method but an arithmetic error: it is now Trap 6.

Scenario (battery energy consumed at…) Method B (simplified) Method C (real net)
100% off-peak (P3) 8.1 years 8.9 years
Realistic (34% P1 + 17% P2 + 49% P3) 6.7 years 7.2 years
100% peak (P1) 5.2 years 5.5 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 30.78 c€/kWh:

Gross saving:      30.78 c€ × 2,818 kWh   =  867.16 €/year
− Surplus income forgone (3,202 kWh × 5 c€) = −160.09 €/year
+ Contracted power saving                   =  +99.50 €/year
                                              ─────────────
= NET saving                                =  806.56 €/year

Payback: €5,823 / €807 per year = 7.2 years

If you also attribute the battery's proportional share of the net tax deduction — 52.4% of €2,600, about €1,363 — the amount to recover drops to €4,460 and the payback to 5.5 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 5.5 and 8.9 years depending on nothing but timing. Peak and off-peak are 14.4 c€ apart, and that gap is what sets the range.

And on sizing: at an average 27% depth of discharge an SB Home30 has plenty of headroom. A single 15 kWh module would shift almost the same energy: going by what the 30 kWh batteries in our fleet did each day from May to November, 95% of it, working at 52%. What doesn't fit is the end of the night on the longest days, in off-peak hours. But it doesn't cost half: the cabinet and the 15 hours of workshop time are the same with one module or two, and the single module is 61% of the Home30's price: €3,555 against €5,823. With the same contracted-power saving (the inverter and the BMS are the same), it saves €781 a year and pays back in 4.6 years (3.2 with the tax deduction). Until November 2026 we said 3.2 years without the deduction, because we counted half the price. The price of that is cycles: about 6,600 over 35 years instead of 3,449, which is inside the cells' rated life rather than below it, and a projected 58% state of health at year 35 — 8.6 kWh against the 8.1 kWh the battery shifts on an average day — by which point it would shift only 78% of the Home30's energy, which still keeps 20.4 kWh. Even so, in money and in this case the single module comes out ahead: over 35 years, counting the ageing of both, its NPV is about €900 higher, a small difference next to the uncertainties of the calculation. What the Home30 buys is margin — for the long days, for an EV or a heat pump that comes later, and for ageing. We decide it case by case; the module is always 15 kWh and the cabinet takes one or two, so the second can be added later.

A conclusion that changed in October 2026, and still holds in 2027. 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. With Som Energia's 2027 prices the full off-peak cost is 25.4 c€. Against a production cost of 10.55 c€, the margin is there, and the payback is 8.9 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. (Between October and this revision the article put off-peak at 21.8 c€ and the payback at 9.4 years: as explained under the tariff, that reference counted grid fees and charges twice.)

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, 10.55 c€/kWh. The battery adds about 6.5 c€ to the kWh that passes through it — and even so that kWh is 3.8× cheaper than buying it at the evening peak, and still 2.4× cheaper than buying it at the cheapest hour of the day.

Weighted across both routes, the energy this household produces costs 7.42 c€/kWh against a grid average of about 30.2 c€ — roughly 4.1× 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.