Gasoline prices: what moves the pump
A chart-first read of retail gasoline prices: the pump-to-crude margin, diesel versus regular, and real prices, from live FRED data.
The price at the pump gets blamed on whatever is in the news that week: a war, a hurricane, a refinery fire, an election. Some of that is real. Most of what moves the number week to week is one input, crude oil, filtered through refining, distribution, marketing, and tax, none of which move at the same speed or for the same reason. This page separates those pieces using the same public data the EIA publishes every week.
Real data, not a synthetic sample. Every figure is pulled from FRED by a script in this repo, committed as static JSON, and rendered client side as dependency free SVG. Nothing here is a screenshot, so re running the script and rebuilding updates every chart on the page at once.
Weekly retail prices run through August 31, 2026. Source: FRED, from the U.S. Energy Information Administration and the Bureau of Labor Statistics.
- Latest regular
- $4.07
- Latest diesel
- $5.60
- Year over year
- +28.1%
- 52-week high
- $4.50 (May 11, 2026)
- 52-week low
- $2.78 (Jan 12, 2026)
- Retail minus crude
- +$2.00
The long view since 1990
Retail regular gasoline has spent most of the last thirty five years under three dollars a gallon and most of the last five above it. The shaded bands are NBER recession dates, and the pattern is not subtle: gasoline usually falls into a recession, since a slowing economy burns less fuel, then climbs out ahead of the recovery.
The current price is $4.07, up +28.1% from a year earlier. Over the last year it ranged from a low of $2.78 (Jan 12, 2026) to a high of $4.50 (May 11, 2026).
Regular versus diesel
Diesel and regular gasoline are refined from the same barrel of crude but sold into different markets. Diesel usually trades above regular, since it carries different federal and state taxes and its demand comes from trucking and freight rather than commuting. Latest diesel is $5.60 against $4.07 for regular.
Watch the gap, not just the level. A diesel premium that shrinks or flips is a freight signal before it is a consumer one: it usually means diesel demand from trucking has softened relative to gasoline demand from driving, which shows up in freight volumes before it shows up in a jobs report.
What crude oil actually costs at the pump
Crude oil is priced by the barrel and gasoline is sold by the gallon, so the two are not directly comparable until you convert. A barrel is 42 gallons, so dividing the WTI price by 42 puts crude on the same per gallon basis as the pump price. The chart pairs the two so the retail price and its raw material cost sit on one axis.
The distance between the lines is not waste. It is refining capacity and cost, distribution and marketing, state and federal fuel taxes, and whatever margin the chain along the way is able to hold. That distance is not fixed, which is the subject of the next chart.
The margin behind the price
Subtracting the crude equivalent from the retail price isolates that margin, as a proxy rather than any one company's books. The reference line marks the point where retail exactly equals the crude cost with nothing added, which the actual line never reaches for long, since taxes alone keep it positive.
The margin widens sharply whenever crude falls quickly, because retail prices are stickier on the way down than crude is: stations and refiners do not instantly pass a crude drop through to the pump. It narrows, sometimes toward zero, when crude spikes faster than retailers can raise prices. The latest reading is +$2.00 per gallon.
Real versus nominal prices
A nominal dollar chart makes the present look expensive by construction, since a dollar from 1990 bought more than a dollar today. Deflating by the consumer price index restates every historical price in July 2026 dollars, so a reader can compare 2008 to today honestly.
The highest the real, inflation adjusted price has ever been is $6.27 (Jun 30, 2008), during the summer 2008 run up in crude, well above anything the nominal line alone would suggest for that period. Separately, the CPI's own gasoline sub index is running +24.6% year over year, a useful cross check against the raw pump-price change reported above: the two series measure the same thing by different methods and rarely match exactly, and a large gap between them is itself worth noticing.
How this page is built
The pipeline is four steps, the same shape I would use for any recurring external data report.
- Pull.
pnpm gen:gasolinefetches five series from FRED's open CSV endpoint at three different frequencies: weekly retail gasoline and diesel, daily WTI crude, and monthly CPI. No API key, so the script runs anywhere. - Derive. Every computed view, the per gallon crude equivalent, the margin, the real price, is a small pure function in the generator rather than a number pulled pre transformed. That keeps the arithmetic in one reviewable place. The three frequencies get joined onto the gasoline survey's own weekly dates: WTI to the nearest prior trading day, since crude trades daily and the survey does not; CPI to the nearest published month, backward filled when the current month has not released yet, since CPI always lags the calendar by a few weeks.
- Check. The generator refuses to write output if either join misses on more than a couple of percent of weeks. A wrong series ID or too narrow a join window fails the run instead of quietly shipping a chart with a gap in one of its two lines.
- Commit and render. The JSON is committed, imported at build time, and rendered as inline SVG. No chart library and no runtime data fetch, which keeps the page fast and the content security policy tight.
One caveat worth stating plainly, because it is the kind of thing that quietly goes wrong: the date on this page is the newest observation, not the date the script last ran. A run date always looks current, which is exactly what makes it the wrong number to publish.