In Spain you do not normally sell surplus solar energy for cash. Most homeowners use simplified surplus compensation (compensación simplificada de excedentes): the kWh you export are valued at the price in your electricity contract and credited against the energy part of your bill. The credit can never push that part below zero, and whatever is left over is usually lost unless your retailer offers a virtual battery.
That small detail changes how a solar system should be designed. A kWh you use yourself avoids buying electricity at the full price, while a kWh you export is credited at a lower price and only up to a cap. On the Costa del Sol, where summer production is high and many villas are empty for weeks, this decides whether a system feels like a bargain or a disappointment.
This guide explains how surplus compensation works in 2026, what it does and does not cover, how to read a surplus tariff, how a virtual battery differs from a real one, and what to design for if your villa produces more than it uses.
Quick Answer
How do you sell excess solar energy in Spain? Choose an installation con excedentes acogida a compensación, sign a compensation contract with your electricity retailer, and let a bidirectional meter record what you export. At the end of each billing period the retailer multiplies the exported kWh by the surplus price in your contract and deducts the result from the energy part of your bill. The deduction cannot exceed the cost of the energy you drew from the grid, and it does not pay down fixed charges or taxes. To get cash for surplus you would have to sell on the market as a producer, which suits larger plants rather than homes.
- ≤ 100 kWInstallation size for simplified compensation
- Per billCredit settled each billing period, usually monthly
- €0 floorThe energy term cannot go below zero
- €0.05–0.12Typical surplus price per kWh quoted in 2026 comparisons
In this guide
Three Ways to Handle Surplus Solar Energy in Spain
Royal Decree 244/2019, which regulates self-consumption in Spain, distinguishes installations without surplus from installations with surplus, and splits the latter in two. Choosing the route is the first design decision.
The three self-consumption routes
| Route | What happens to surplus | Typically suits | Paperwork |
|---|---|---|---|
| No surplus (sin excedentes) | An export limiter keeps power from flowing to the grid. No credit, no payment. | Constrained grid connections, or sites with little surplus. | Simplest registration. |
| Surplus, compensated (acogida a compensación) | Surplus is credited on the bill at your contract price, up to the energy you imported. | Most homes and small businesses, up to 100 kW. | Compensation contract with your retailer, plus registration. |
| Surplus, sold on market (no acogida) | Surplus is sold on the electricity market, often through a representative. | Larger or commercial plants. | Registration as a producer and the related tax and market obligations. |
Summary of the framework in Royal Decree 244/2019. Conditions and exceptions apply; the compensation route is for renewable installations up to 100 kW with a single supply contract.
The middle route is the one almost every Costa del Sol homeowner ends up with, so the rest of this guide focuses on it. For the wider legal picture, including permits and legalisation, see our guide to the legal framework for solar panels in Spain.
How Simplified Compensation Works, Step by Step
- Your home uses the sun first. Solar power goes to whatever is running: air conditioning, pool pump, appliances, an EV charger.
- The excess flows to the grid and is recorded by a meter that measures energy in both directions.
- At the end of the billing period the retailer totals the kWh you exported and the kWh you imported.
- Exported kWh are multiplied by your surplus price, the €/kWh stated in your contract, to give a credit in euros.
- The credit is deducted from the energy term of the same bill, but never by more than the value of the energy you imported.
- Anything above that cap is normally lost, unless your contract includes a virtual battery that carries it forward.
There is no bank transfer: compensation appears as a lower bill. A bill that is already at zero energy cost cannot go lower, which is why the cap matters so much to anyone who produces far more than they use.
A Worked Example With Real Arithmetic
The table shows one villa in a holiday month and in winter. The prices are assumptions chosen to make the mechanics visible, not quotes from any tariff.
Illustrative example: one villa, two months (assumed prices)
| Item | July (holiday month) | January |
|---|---|---|
| Energy imported from the grid | 250 kWh | 600 kWh |
| Value of imported energy at an assumed €0.15/kWh | €37.50 | €90.00 |
| Energy exported to the grid | 900 kWh | 100 kWh |
| Surplus credit at an assumed €0.07/kWh | €63.00 | €7.00 |
| Credit actually applied (capped at the imported value) | €37.50 | €7.00 |
| Energy term after compensation | €0.00 | €83.00 |
| Unused credit | €25.50 (lost, or carried forward with a virtual battery) | €0.00 |
Prices are assumptions for illustration, not a tariff. The power term, meter rental and taxes are billed on top, and your retailer’s contract sets the real figures.
What the example shows
In July the villa exports 900 kWh but only €37.50 of the €63.00 credit can be applied, so €25.50 of value disappears. In January a little surplus is credited in full. In both months, every kWh the house uses directly saves the full import price, roughly twice what an exported kWh earns in this example. That is why good design maximises self-consumption first and treats export as a secondary benefit.
What Surplus Compensation Does Not Cover
Compensation reduces the energy term of the bill. It is not a credit against everything on the invoice.
- the power term (término de potencia), which you pay for contracted capacity
- meter rental and other fixed items
- taxes and regulated charges applied to the bill
- any credit above the value of the energy you imported that period
- months in which you import almost nothing
- cash payments of any kind
The last two points explain why a holiday villa can generate plenty of energy and still see a modest effect on its bills: the credit has nothing to offset in months when nobody is home.
What Price per kWh Will You Get for Surplus Solar Energy?
- Regulated PVPC tariff: surplus is indexed to the average hourly wholesale price, which you can check on the Spanish grid operator’s ESIOS platform.
- Free-market tariff: the price is agreed with the retailer, either as a fixed €/kWh or indexed to a market reference.
- What is typical in 2026: published comparisons quote roughly €0.05–0.12 per kWh for simplified compensation, with a few premium tariffs advertising up to about €0.15. These are marketing ranges and move constantly, so treat them as orientation only.
What to check before you sign a surplus contract
- The surplus price per kWh, in writing, and whether it is fixed or indexed.
- The import price you pay on the same tariff. A generous surplus price attached to an expensive import price can cost more overall.
- Whether a virtual battery is included, how long carried-forward credit lasts, and what fee applies.
- Contract conditions such as minimum stay, cancellation and fixed monthly charges.
- That the retailer accepts a compensation contract for your installation size and supply type.
Retailers change offers often, so we do not publish a league table here. Compare two or three current offers against your real import and export profile once the system is running.
Virtual Battery vs a Real Battery
- Virtual batteryA retailer service that carries unused surplus credit forward to later bills. No equipment, but terms, fees and expiry differ from one retailer to the next.
- Real batteryStores energy for your own evening and night use. Each kWh you use avoids buying at the import price, usually worth more than the surplus price. It needs an investment and a design around your load.
- NeitherSurplus is credited as in the example above and any excess is lost. Fine if your surplus is small or you are rarely away.
A virtual battery moves value between months. A real battery moves energy between hours. They solve different problems, and they can work together. For the economics of a physical battery, read is a battery a cost-effective option for my PV system, or see how we design battery storage and backup power.
Why Surplus Matters More on the Costa del Sol
Strong sun and uneven occupancy create large, lumpy surpluses. A 10 kWp system produces roughly 1,760 kWh in a Marbella July and about 1,050 kWh in December, according to the EU’s PVGIS model (see our month-by-month production guide), while a villa’s consumption can swing from nearly nothing to several hundred kWh depending on who is staying.
If production regularly exceeds what you can use or credit, there are five practical levers, roughly in order of value:
- Right-size the array to your real consumption, not to the biggest roof area
- Shift loads into daylight: pool pump, hot water, laundry, air conditioning
- Add controllable loads such as a solar EV charger or a heat pump
- Add a battery to carry daytime energy into the evening
- Choose the right surplus tariff, including a virtual battery if your retailer offers one
For a rarely used second home, the answer is sometimes a smaller system or a zero-export design. We would rather tell you that during the survey than sell you panels whose output you cannot use.
Paperwork and Who Does What
- Design and installation with bidirectional metering and, where relevant, an export limiter.
- Electrical installation certificate and technical documentation for the new system.
- Registration of the self-consumption installation with the regional authority (in Andalucía, the Junta de Andalucía) and the distributor, which on most of the Costa del Sol is e-distribución.
- Compensation contract with your retailer, choosing a tariff with a surplus price you are happy with.
- Credit on your bills from the first billing period after the contract and registration are active.
As part of a turnkey installation, KiDi Solar prepares the technical documentation and handles the registration steps, so that the system is legally recognised before you start exporting. Retailers can take a few weeks to activate compensation, so it is worth choosing a tariff early.
Rule Changes to Watch
Status in October 2026
The Spanish government has been preparing two royal decrees on self-consumption and energy communities and was moving them through the urgent procedure in mid-October 2026. Reported contents include collective self-consumption in multi-family buildings, a specific framework for batteries that avoids double charges on stored energy, and a manager role for shared installations. They had not been approved when this guide was published. The rules described above are those in force today, and we update this page when the decrees are published.
Key Takeaways
- Simplified compensation credits exported kWh against the energy term of your bill. It is a discount, not a payment.
- The credit cannot exceed the value of the energy you imported in the billing period, and the excess is normally lost.
- It applies to renewable installations up to 100 kW, with a compensation contract with your retailer.
- Power term, fixed items and taxes are not offset.
- A self-consumed kWh is usually worth about double an exported kWh, so design for self-consumption first.
- A virtual battery moves credit between months. A real battery moves energy between hours.
- Check the surplus price, the import price and the virtual-battery terms before choosing a tariff.
- Rules may change: two self-consumption decrees were pending in October 2026.
Frequently Asked Questions
Can I sell solar electricity to the grid in Spain?
Yes, in two ways. Most homes and small businesses use simplified compensation, where exported kWh are credited on the bill. Selling surplus on the electricity market for cash is also possible, but it is aimed at larger plants and brings producer-style registration and tax obligations.
Does my electricity company pay me for surplus solar energy?
Under simplified compensation it credits the surplus against the energy part of your bill, not as a bank transfer. You need a compensation contract with the retailer, and the price per kWh is whatever that contract states. The distribution company, usually e-distribución on most of the Costa del Sol, is separate from the retailer.
Is there a size limit for simplified compensation?
Yes. The scheme is for renewable installations up to 100 kW, which covers almost every home and many small businesses.
What happens if my surplus credit is bigger than my bill?
The credit cannot reduce the energy part of the bill below zero, and the excess is normally lost. If your retailer offers a virtual battery, the excess value can be carried forward to later bills under that retailer’s conditions.
How much do retailers pay per exported kWh?
Published comparisons in 2026 quote roughly €0.05–0.12 per kWh for simplified compensation, with a few premium tariffs advertising up to about €0.15. Regulated PVPC customers are credited at an hourly wholesale-based price. Always check the price in your own contract, in writing.
Do I need a battery to benefit from solar in Spain?
No. A battery raises your self-consumption by storing daytime energy for the evening, which is usually worth more than exporting it. Whether it pays back depends on your evening load, so we size it from your bills.
What is a zero-export system?
A system fitted with an export limiter that stops any power flowing to the grid. It earns no compensation but can be simpler where the grid connection is constrained, or where surplus would be small anyway.
My villa is empty for months. Is simplified compensation still worth it?
Compensation only offsets energy you import, so months with almost no consumption earn little or nothing. For holiday homes we look at a smaller array, a battery, a retailer with a virtual battery, or zero export, depending on the usage pattern.
Will the rules change soon?
Possibly. In mid-October 2026 the Spanish government was processing two royal decrees on self-consumption and energy communities, mainly covering collective self-consumption, battery rules and shared installations. They had not been approved when this guide was published, and we update it when they are.
Why villa owners choose KiDi Solar
- Local technical team based in Marbella
- 330+ completed projects across the Costa del Sol
- Solar panels, home batteries and EV chargers designed and installed by one company
- Documentation, registration and legalisation prepared as part of the installation
- Legalisation and certification handled where applicable
Design a System You Can Actually Use
Send us four details and we will model how much of your solar output you would use, store or export:
- Your latest electricity bills (12 months if possible)
- How often the property is occupied
- Your pool, air-conditioning and EV loads
- Property location and roof photos
With this, KiDi Solar can determine:
- the system size that fits your real use
- how much surplus to expect and when
- whether a battery or zero export suits you better
- the registration and compensation steps for your property
Prefer to start with a conversation? Request a free on-site survey.
KiDi Solar installs and services systems across the Costa del Sol. For local prices, completed projects and a free survey, see our page on solar panels in Marbella.
Sources and notes: the framework summarised here follows Royal Decree 244/2019 on self-consumption in Spain. Mechanics of simplified compensation are described in retailer guidance such as Repsol’s guide to surplus compensation. Price ranges are orientation figures from 2026 comparison articles (for example Aholuz) and are not offers. Status of the pending decrees is based on reporting by Energías Renovables, October 2026. Production figures come from PVGIS (European Commission JRC). The worked example uses assumed prices for illustration. This guide is general information, not legal or tax advice; confirm the conditions of your own contract with your retailer.