Understanding how the electricity market works in Spain is key to understanding why electricity prices can rise even on days with plenty of sun or wind. For many consumers, this situation seems illogical: if cheap renewable energy is being generated, why do we end up paying more?
The answer is not an “artificial” or unexplained price increase, but the rules of the Spanish electricity market itself, which operates as a daily auction with a very specific price-setting mechanism. In this article, we explain it step by step, without unnecessary technical jargon, so you can clearly understand what is happening and how it affects you as a consumer.
The Foundation of the Spanish Electricity Market: A Daily Energy Auction
The Spanish electricity market is based on a daily auction system in which the amount of electricity to be produced and consumed during each of the 24 hours of the following day is determined. This mechanism is key to understanding how electricity prices are formed in Spain, as they are not set arbitrarily but according to expected supply and demand.
All the key players in the electricity system take part in this auction, allowing the market to operate in a coordinated and transparent way, at least from a theoretical standpoint.
Two main groups are involved in the auction:
- Electricity producers, such as nuclear power plants, hydroelectric facilities, combined-cycle power plants, and renewable energy plants.
- Consumers, represented by electricity retailers, large industrial users, and other market participants.
The mechanism is simple in concept, although complex in its execution:
- Producers submit offers saying:
“I can generate X amount of energy and sell it at a price of Y.” - Consumers submit their demand saying:
“I want to buy X amount of energy and I am willing to pay up to a price of Y.”
To facilitate this process, two key roles come into play:
- Supply aggregators, which represent multiple electricity generators.
- Demand aggregators, which represent multiple electricity consumers.
OMIE and REE: Two Different Players with Very Clear Roles
One of the most common mistakes when talking about how the electricity market works in Spain is to assume that the entire system is managed by a single entity. In reality, the market relies on two main players with very different but complementary roles.
OMIE: The Market Operator
OMIE is the entity responsible for managing the wholesale electricity market from an economic perspective. It is in charge of organising the daily auction and setting the hourly electricity price, which directly affects the regulated market and indirectly influences the free market.
Its main responsibilities are:
- Collecting all generation offers.
- Collecting all demand bids from consumers.
- Running the daily auction.
- Determining the hourly electricity market price.
REE: The Electricity System Operator
REE ensures that all decisions made in the electricity market are technically implemented in the real power system. Its role is entirely technical and focuses on maintaining the security and stability of electricity supply.
Its key responsibilities include:
- Operating the high-voltage transmission network.
- Ensuring real-time balance between electricity generation and consumption.
- Ensuring that the decisions made by the market can be physically implemented.
In summary:
- OMIE sets the price.
- REE ensures that this price is technically feasible.
Market Clearing in the Electricity Market: Where the Price Is Set
Market clearing is one of the most important stages of the electricity market process, as it is the point where the electricity price is actually determined for each hour of the following day.
- The aggregated supply curve (all offers submitted by electricity generators).
- The aggregated demand curve (all demand bids submitted by consumers).
The point where these two curves intersect determines the so-called marginal electricity price, a fundamental concept for understanding why electricity prices can vary so significantly from one hour to the next.
What Is the Marginal Electricity Price and Why It Has Such a Strong Impact on Your Bill
The marginal electricity price is the price set by the last offer accepted to cover total demand in a specific hour. This system is one of the most controversial aspects of the electricity market, but also one of the most important.
Put simply:
- The system starts by accepting the cheapest offers.
- It then gradually incorporates increasingly more expensive offers.
- Once total demand is fully covered, the last power plant needed sets the final price.
And this is the key point of the system:
All electricity generated during that hour is paid at the same price, even if part of it was produced at a much lower cost.
This is why it can happen that:
There is a large amount of cheap renewable energy generation.
But if an expensive technology (such as gas) enters the market,
the price of all electricity increases, even for energy produced at a low cost.
The Electricity Market Algorithm: How Energy and Prices Are Assigned Hour by Hour
The electricity market uses a settlement algorithm that determines, hour by hour, how energy is allocated and what the final market price will be. This algorithm does not make “political” or subjective decisions; it simply applies very specific mathematical rules.
The algorithm determines:
- The market price
- The amount of energy allocated to each generator and consumer.
To do so, it must comply with several basic rules:
- The total amount of energy sold must be equal to the total amount of energy purchased.
- No market participant can sell or buy more energy than they have offered or bid.
- The technical constraints of the electricity system must be respected.
This algorithm does not “make judgments”; it simply applies the predefined rules.
The Theoretical Objective of the System: Maximising Net Social Benefit
From a theoretical perspective, the electricity market aims to maximise Net Social Benefit (NSB), meaning the overall benefit for the system as a whole.
This concept is expressed as: NSB = C – V
Where:
- C represents the value that consumers assign to the energy they purchase.
- V represents the value that producers assign to the energy they sell.
The goal is to allocate energy in the most efficient way possible. However, this approach can lead to situations where very low-cost technologies generate significant profits when the marginal price is high.
Types of Power Plants Based on the Service They Provide to the System
To understand why some power plants enter the electricity market earlier than others, it is useful to classify them according to the service they provide to the system and their role within the energy mix. Each type of power plant fulfils a different function and has a distinct impact on how electricity prices are formed.
| Type of Power Plant | Main Function | Key Characteristics | Examples |
| Baseload Power Plants | Provide energy on a continuous basis | They operate continuously and provide stability to the electricity system. They typically have low generation costs but limited flexibility. | Nuclear power plants, solar thermal power plants |
| Peaking Power Plants | Cover peaks in electricity demand | High responsiveness and flexibility. They enter the market when demand is high. | Hydroelectric power plants, combined-cycle power plants |
| Reserve Power Plants | System backup | They replace baseload power plants when these are not available. | Different technologies depending on the system |
| Emergency Power Plants | Emergencies | They are used only in exceptional situations and have high generation costs. | Diesel generator units |
Key takeaway: Baseload power plants typically generate electricity at a low cost, but they do not always set the price, which is ultimately determined by the last power plant needed to meet demand.
Technologies That Had the Greatest Impact on Electricity Prices in 2025
During 2025, certain technologies played a particularly significant role in shaping electricity market prices. Their participation was decisive in meeting demand at specific times, driving up the marginal price.
The main ones were:
- Pumped-storage generation: 13%
- Combined-cycle power plants: 15%
- Cogeneration: 16%
This helps explain why electricity prices can rise even when there is a high share of renewable energy in the energy mix.
Free Market vs Regulated Market: How the Electricity Market Affects Consumers
The way the wholesale electricity market operates is directly reflected in the electricity bill paid by the end consumer, particularly depending on the type of contract they have.
| Type of Market | How the Price Is Set | Level of Stability | Who It May Be Suitable For |
| Free Market | Price agreed with the electricity retailer | More stable | Consumers who seek predictability and fewer price fluctuations |
| Regulated Market (PVPC) | Price linked to the wholesale electricity market | Variable | Consumers who can adapt their electricity consumption to cheaper time periods |
This difference explains why two consumers can pay very different electricity bills even if they have similar consumption levels.
Electricity Time-of-Use Periods in Spain and Their Impact on Prices
Electricity prices in Spain vary throughout the day depending on time-of-use periods, which directly affects the final cost for consumers.
- Off-peak: 00:00 – 08:00
- Mid-peak: 08:00 – 10:00 | 14:00 – 18:00 | 22:00 – 00:00
- Peak: 10:00 – 14:00 | 18:00 – 22:00
The peak period usually coincides with the highest electricity prices and with the entry of more expensive generation technologies into the market.
What Consumers Actually Pay in the Regulated Market (PVPC)
In a regulated market contract, the electricity bill is divided into two main components, which explains why not all of the total amount depends solely on energy consumption.
Contracted Capacity
- Access tariffs
- Regulated charges
- Retailer margin
Energy Consumption
- Network access tariffs
- Charges
- Actual cost of electricity based on market prices
Understanding the Electricity Market Helps You Make Better Decisions
The Spanish electricity market is not arbitrary. It operates as a daily auction in which the last power plant needed sets the price, and that price is applied to all the electricity traded during that period.
Understanding these rules allows you to:
- Understand why electricity prices rise or fall.
- Make better choices between the free market and the regulated market.
- Make smarter decisions about energy efficiency and self-consumption.
At Ubora, we believe that clear information is the first step toward a real energy transition. And understanding how the electricity market works is a fundamental part of that journey.
For more content, visit our social media channels: