By Richard Black
Environment correspondent, BBC News website
So you flick on your light switch, plug in your kettle, fire up your computer - and hey presto, the electricity arrives.
Cold snaps dramatically increase power consumption
But it does not come out of thin air.
It has to be generated somewhere - in a nuclear power station, a hydro-electric dam, a wind turbine - and as these devices are run by companies rather than charities, they are not going to run unless their output can be sold.
In any case, too much electricity coming into the national grid can produce overloads, tripping circuit-breakers and producing blackouts; too little, and the frequency of the supply (that famous 50 hertz) falls.
The planning designed to ensure that just the right amount of electricity is generated to meet demand is highly complex.
"We have a team of people who do nothing but demand-forecasting, and that means everything from long-term trends to looking at the day ahead," says Stewart Larque, a spokesman for the UK National Grid.
"The things they look at include everything from weather forecasts, which means factors like temperature, cloud cover, and light, to the TV schedule, which can produce big surges in demand.
"Our control room works, in fact, on minute-by-minute forecasts, and they are accurate to within 1%."
The forecasts are updated regularly, with important weather information fed in three times each day.
One of the most important factors affecting demand, clearly, is temperature.
"The difference between a day when it's freezing compared to a day of about 20C could be around 5,000 MW - that's the output of several large power stations," notes Mr Larque.
The pattern of demand across the day is well known. Industrial use concentrates during the working day, unsurprisingly, whereas domestic use is more of a factor in the late afternoon and evening, with a clear peak often appearing about 6pm when commercial and domestic users are both sucking current from the grid.
Demand rises in the run-up to Christmas, and then declines sharply over the holiday period itself as factories and offices shut down.
But the grid is only part of the story. Companies generate the electricity and put it into the grid, and other companies buy it from the generators and sell it to customers.
These companies too must forecast demand, look at market conditions, and decide how much they want to generate or buy or sell at what times.
They must decide which generation technologies to use when (often a market decision), when to take equipment out of service for maintenance, and (on the longest timescales) when to build or shut power stations.
Suppliers generally work with a mixture of long-term contracts and short-term buying and selling, bilaterally or on specialist exchanges.
"Everyone makes their own forecasts and then has to cover themselves, either by generating from their own power plants or by buying and selling on the market," says Bert den Ouden, CEO of the APX Group, which runs energy exchanges in several European countries including the UK.
"Some deals are done many years in advance. We're more focused on the spot market; and as you get closer to the time of delivery, we trade in half-hour blocks, and we close our trading 90 minutes before delivery.
"Sometimes you find people who normally sell have to buy, to meet some unexpected shortfall; and sometimes people who normally buy have to sell, because they have bought in advance what turns out to be too much."
Spot prices can be much higher or much lower than long-term contracts, depending on the usual laws of supply and demand; but electricity is more difficult to store than other commodities, which makes prices even more volatile.
Trading takes care of most unanticipated variations, such as sudden shifts in the weather. But other factors can change the scene in a matter of seconds, such as a sudden fault at a power station.
Dealing with these falls to the National Grid. At a moment's notice, it can ask power stations running at half-power to ramp up, it can remotely turn on smaller diesel generators kept on standby, it can cut power to large industrial consumers that can cope with an interruption (such as a cold store).
"Most of the flexibility is provided by fossil fuel power stations where it's easier to vary the output than, for example, a nuclear plant," observes Mr Larque.
"Hydro also plays a part, and there is a pumped storage unit in Wales, which has two reservoirs at different heights."
Nuclear reactors run continuously, providing a regular output
Yet more flexibility is provided by the interconnector cable linking the UK with France, enabling power to be traded within western Europe. Other interconnectors with mainland Europe are, so to speak, in the pipeline.
This complex network of planners, buyers, sellers, generators and traders should mean that the right amount of electricity flows into the grid, every moment of the day, to meet the nation's demand.
It is not foolproof, because technology is not foolproof and because planners have to make assumptions about how consumers will behave - and we are certainly not logical in everything we do.
It may have been predictable that West Germany would beat England on penalties in the 1990 World Cup semi-final; but could anyone have foreseen that the power surge afterwards, as a nation drowned its sorrows in tea, would kick demand upwards by the equivalent of two-and-a-half nuclear power stations?