Climate Change: Simple, Serious, Solvable › Models and Data
Learning Beats Digging: Why Clean Energy Keeps Getting Cheaper
Solar panels and batteries are made in factories, and they get cheaper the more of them the world makes. Oil has to be dug up and burned, over and over, and it doesn't. See how much each doubling takes off the price, follow it a few doublings ahead, and see how long that takes.
- Each year, as measured
- The straight line through them
- Ahead, at its own past rate
- Ahead, at the rate you chose
| The first year and the last | |
|---|---|
| Doublings between them | |
| Its own past rate: each doubling | |
| The last five years: all of it ever made grew by | |
| The price after these doublings, at its own past rate | |
| The price after these doublings, at the rate you chose | |
| All of it ever made, by then | |
| At the last five years' growth, these doublings take |
- New solar farms
- New onshore wind farms
- New coal and gas plants (IRENA's range)
| 2010 | 2025 | Cheaper by | Below coal and gas from | |
|---|---|---|---|---|
| New solar farms | ||||
| New onshore wind farms | ||||
| New coal and gas plants | ||||
This is Figure 12.4 of the book. A megawatt-hour (MWh) is a thousand kilowatt-hours, about what an American home uses in a month. The fossil-fuel range is IRENA's for 2020, the latest it stated in words, and new gas plants have cost more since.
Learning, not time. The graph's bottom axis isn't years: it's all the panels, batteries or oil ever made. A price that learns falls in a straight line on this graph, however fast or slow the doublings come.
Doublings get bigger. Each doubling means making as much again as in all of history so far. At today's speed solar doubles every three years or so, but no curve goes on forever: the About tab says why.
About this model
This is a very simple model of learning by doing: the more of something the world makes, the cheaper each one gets. It goes with section 12.5 of Chapter 12 of the book, "Learning beats digging", and it draws the same data as the chapter's Figures 12.4 and 12.16.
The rule it uses is a learning curve. Each time the world doubles all it has ever made of something, the price falls by about the same share. That share is the learning rate. For solar panels it has been 23.5% for each doubling since 1975. For lithium-ion batteries it has been 19.5% since 1991. Oil has no learning rate: each doubling of all the oil ever produced has raised its price by about 10.0%, after inflation.
On the page as it opens, solar panels cost $0.265 a watt in 2024. Three more doublings at the chapter's "about 20%" would bring them to $0.136 a watt. At the speed of the last five years, those three doublings take about 8.9 years.
How to use this page
The page has two views. "Learning curves" plots price against all of it ever made, on logarithmic axes, as Figure 12.16 does. Choose solar panels, batteries or oil. Each year is a point, and a dashed straight line runs through them. From the last point, two lines run on: one at the technology's own past rate, and one at the rate you choose.
You can change two things: the price fall with each doubling, from −20% to 40%, and the doublings still to come, from 1 to 6. The page opens on solar panels, at 20% and 3 doublings. "Use its own past rate" sets the slider to the rate the points give. "Back to where the page opened" puts everything back.
"Against coal and gas" is Figure 12.4: the cost of electricity from new solar and wind farms around the world, 2010 to 2025, against IRENA's range for new coal and gas plants.
The address in your browser changes as you move the sliders, so you can bookmark a view or send it to someone. Nothing is sent anywhere as you work.
This page is part of the website for Climate Change: Simple, Serious, Solvable, an open textbook by Scott Denning. It goes with Chapter 12, "Reinventing Fire", section 12.5.
The equations
You don't need any of this to use the page. But the whole model is six short steps, and you can follow every one of them with a calculator. The ln key on a calculator is the natural logarithm.
The model answers one question: how much does the price fall each time the world doubles all it has ever made, and what happens if that goes on?
For each year the data give two numbers: X, all of it ever made up to that year, and P, its price that year, after inflation. X0 is the first year's X.
1. How many times has it doubled?
One doubling multiplies X by 2, two multiply it by 4, and n multiply it by 2n. Turned around, the number of doublings from X0 to X is
That's why the graph's axes are logarithmic: each doubling is the same distance along the bottom.
2. The straight line through the points
On a graph with logarithmic axes, a learning curve is a straight line:
The model finds the a and b that bring the line closest to every year's point (a least-squares fit, the method Figure 12.16 uses). b is the line's slope. For solar panels it's −0.387; for oil it's +0.138, a line that rises.
3. The learning rate
Double X, and step 2 adds b ln 2 to ln P, which multiplies the price by 2b. So each doubling takes off a share
of the price. That's the learning rate. When b is above zero, L is below zero, and the price rises with each doubling.
4. The price after more doublings
Each doubling multiplies the price by 1 − L. After N more of them, starting from the last year's price P, it's
The page works this out twice: once with the technology's own L from step 3, and once with the L you choose.
5. How fast is it growing?
The model takes today's speed as the average over the last five years. If all of it ever made was Xearlier five years before the last year, it grew each year by
as a share: 0.263 is 26.3% a year.
6. How long do the doublings take?
Growing by g a year, X doubles in ln 2 ÷ ln(1 + g) years. So N doublings take
years. This is the rule of 70 that bankers use for money: at 7% a year, money doubles in about 10 years.
Where the equations stop
- A curve isn't a law. A learning curve describes the past. Nothing guarantees the next doublings will cut the price as the last ones did. Prices have gone up for a year or more before: solar panels from 2005 to 2007 and in 2022, and batteries in 2022. The points on the graph show it.
- Doublings get harder. Each one means building as much again as in all of history. At some point growth has to slow, and the doublings come further apart.
- Panels aren't power plants. The solar curve is the price of panels. A solar farm also needs land, steel, wiring and labor, which learn more slowly, so the cost of its electricity falls more slowly than its panels' price.
- Different dollars. Solar and oil are in 2025 dollars, and batteries in 2024 dollars, as in Figure 12.16. The learning rate doesn't depend on the dollar year.
- Oil isn't the whole story. The book shows oil because its data are open. Coal and gas don't learn either, and the "Against coal and gas" view compares their power plants with solar and wind.
A worked example
Open the page and leave everything where it is: solar panels, 20% and 3 doublings. Here's where the table's numbers come from.
- Doublings so far (step 1). The world had installed 0.00054 GW of solar by 1975 and 1,867 GW by 2024. n = ln(1,867 ÷ 0.00054) ÷ ln 2 = 15.06 ÷ 0.693 = 21.7 doublings.
- The line (step 2). The fit gives b = −0.387.
- Solar's own learning rate (step 3). L = 1 − 2−0.387 = 1 − 0.765 = 0.235, or 23.5% for each doubling.
- Three more doublings at 20% (step 4). PN = 0.265 × (1 − 0.20)3 = 0.265 × 0.512 = $0.136 a watt.
- Today's speed (step 5). The world had installed 580 GW by 2019. g = (1,867 ÷ 580)1/5 − 1 = 0.263, or 26.3% a year.
- How long (step 6). T = 3 × 0.693 ÷ ln 1.263 = 2.079 ÷ 0.233 = 8.9 years.
The table says 21.7 doublings, 23.5% for each, 26.3% a year, $0.136 a watt at 20% and 8.9 years.
See the equations at work
- Solar at its own rate. Press "Use its own past rate". Three more doublings at 23.5% bring panels to $0.119 a watt, and the world would have installed about 14,900 GW of solar by then (step 4).
- Batteries. Choose batteries. Their own rate is 19.5%, the chapter's "about 20%". All the batteries ever made grew 34.8% a year over the last five years, so each doubling takes about 2.3 years (steps 5 and 6).
- Oil. Choose oil and press "Use its own past rate". The rate is −10.0%: each doubling has raised the price. And all the oil ever produced grows only 2.1% a year now, so one doubling takes about 34 years (step 6).
Where the numbers come from
The page draws the same numbers as Figures 12.4 and 12.16 of the book, taken from the files that draw those figures.
Solar panels: their price in 2025 dollars a watt and all the solar ever installed, 1975 to 2024, compiled by Our World in Data from IRENA, Nemet (2009), and Farmer and Lafond (2016), CC BY 4.0. The chapter's "about 270 times cheaper" is from 1977, when panels cost $72.66 a watt, to 2024.
Our World in Data (2026). Solar photovoltaic panel prices vs. cumulative capacity. ourworldindata.org/grapher/solar-pv-prices-vs-cumulative-capacity
Batteries: the price of lithium-ion cells in 2024 dollars a kilowatt-hour and all the lithium-ion batteries ever made, 1991 to 2023, compiled by Rupert Way (2026) from Ziegler and Trancik (2021), BloombergNEF and Avicenne Energy, via Our World in Data, CC BY 4.0.
Ziegler, M. S., and J. E. Trancik (2021). Re-examining rates of lithium-ion battery technology improvement and cost decline. Energy & Environmental Science, 14, 1635–1651. doi:10.1039/d0ee02681f
Oil: the price of crude oil in 2025 dollars a barrel, from the Energy Institute's Statistical Review of World Energy via Our World in Data; all the oil ever produced, from the same source since 1965 and from M. King Hubbert's 1974 report to the US Senate before that. The chapter says a barrel costs about three times what it did in 1890: that compares 1890 with the first ten months of 2026, $96 a barrel. The page stops at the 2025 average, $69.10, which is 2.2 times the 1890 price.
The cost of electricity from new solar and wind farms, and the range for new coal and gas plants:
International Renewable Energy Agency (2026). Renewable Power Generation Costs in 2025. IRENA, Abu Dhabi. Via Our World in Data. Used with acknowledgement of IRENA as the source and copyright holder. The fossil-fuel range is from IRENA's Renewable Power Generation Costs in 2020 (2021), converted to 2025 dollars.
The phrase "learning beats digging" is the title of a chart in Ember's report The Electrotech Revolution (Bond, Walter and Butler-Sloss, 2025). The learning curve itself goes back to an engineer who found in 1936 that each doubling of the airplanes a factory had built cut the work of building the next one by about the same share:
Wright, T. P. (1936). Factors affecting the cost of airplanes. Journal of the Aeronautical Sciences, 3, 122–128. doi:10.2514/8.155
How it was checked
A set of tests comes with the model, and they run every time the page changes. Here's what they hold it to.
- The data, against the book's figures. The page's data file is made from the files that draw Figures 12.4 and 12.16, and each is checked against the fingerprint (a SHA-256) the figure package records. The fit must give the figure's learning rates: 23.5% for solar panels, 19.5% for batteries and about +10% for oil.
- The code, against a second copy. The tests have the six steps written out a second time, in another programming language. At every setting they try, the two copies agree to within a billionth.
- This tab, against the model. Every equation above is tried with the model's own numbers. The worked example is done again from the rounded numbers a calculator would use. And each number in the text is worked out again from the model, and the chapter's words are looked up in Chapter 12.
The code
The code is small enough to read. Two files do all the work, and they use no outside software. The comments in model.js use the same step numbers and letters as the equations above.
model.js is the science: the six steps.
app.js is the page: the controls, the two graphs and the tables.
To keep a copy, save model.js, app.js or the data, data.json.
All of the model's code is on GitHub, at github.com/airscottdenning/climate-models. You're free to use it, change it and teach with it.
Credits
By Scott Denning, for Climate Change: Simple, Serious, Solvable.
The data are Figures 12.4 and 12.16 of the book. Claude, from Anthropic, wrote the page to run in your browser and checked it against the book.