Weekly US retail gasoline and diesel prices from the U.S. Energy Information Administration (EIA), collected every Monday from approximately 1,000 gasoline outlets across the continental United States. The dataset spans from August 1990 to June 2025 and breaks prices down by fuel type (gasoline, diesel), grade (regular, midgrade, premium), and formulation (all, conventional, reformulated).
Suggested questions: How did gas prices respond during the 2008 recession and COVID-19 pandemic? Which fuel type exhibits greater price volatility—gasoline or diesel? Do different gasoline grades and formulations demonstrate parallel pricing trends?
Loading necessary packages
My handy booster pack that allows me to install (if needed) and load my usual and favorite packages, as well as some helpful functions.
# A tibble: 12 × 3
grade formulation n
<chr> <chr> <int>
1 all all 1682
2 all conventional 1596
3 all reformulated 1596
4 midgrade all 1596
5 midgrade conventional 1596
6 midgrade reformulated 1596
7 premium all 1596
8 premium conventional 1596
9 premium reformulated 1596
10 regular all 1813
11 regular conventional 1813
12 regular reformulated 1596
The dataset contains 22,360 weekly observations spanning August 1990 through June 2025 — a 35-year window that captures the full arc of modern US energy economics. Gasoline prices dominate the record (19,672 rows), with diesel data beginning in March 1994. The formulation column is NA for all diesel rows, which is expected — diesel doesn’t have the conventional/reformulated split that gasoline does.
Price ranges from $0.88 (regular conventional, February 1999) to $6.06 (premium reformulated, June 2022), a nearly 7-fold spread across three and a half decades.
Thirty-Five Years at the Pump
The central story in this data is how external shocks — oil embargoes, recessions, pandemics, and wars — leave fingerprints on what Americans pay every time they fill up.
Grade premium spread over time
Before building the main timeline, it’s worth examining how the gap between premium and regular gasoline has evolved. If grades track perfectly in parallel, they’d maintain a constant dollar spread. If the spread compresses or expands, it tells us something about refinery economics and consumer behavior.
# Annual premium-regular spread over timep_spread <- annual_spread %>%pivot_longer(cols =c(avg_spread_prem, avg_spread_mid),names_to ="comparison",values_to ="spread" ) %>%mutate(comparison = dplyr::recode(comparison,avg_spread_prem ="Premium over Regular",avg_spread_mid ="Midgrade over Regular" ) ) %>% ggplot2::ggplot(ggplot2::aes(x = year, y = spread, color = comparison)) + ggplot2::geom_line(linewidth =0.9) + ggplot2::geom_point(size =1.5) + paletteer::scale_color_paletteer_d("ghibli::PonyoMedium") + ggplot2::scale_y_continuous(labels = scales::dollar_format(accuracy =0.01)) + ggplot2::scale_x_continuous(breaks =seq(1990, 2025, 5)) + ggplot2::labs(title ="The grade premium has stayed remarkably stable",subtitle ="Annual average price difference vs. regular gasoline (all formulations), 1990–2025",x =NULL,y ="Price spread ($/gal)",color =NULL,caption ="Source: U.S. Energy Information Administration via TidyTuesday 2025-07-01" ) + ggplot2::theme_minimal(base_size =12) + ggplot2::theme(plot.title = ggtext::element_markdown(face ="bold", size =14),plot.subtitle = ggplot2::element_text(color ="grey40", size =10),plot.caption = ggplot2::element_text(color ="grey60", size =8),legend.position ="bottom",panel.grid.minor = ggplot2::element_blank() )p_spread
Note
The premium-over-regular spread has hovered near $0.50–$0.65/gallon for most of the past 35 years — a surprisingly stable relationship given how dramatically absolute prices have moved. This suggests the grades are priced as a fixed markup rather than independently determined by supply and demand.
Major shock events
The absolute price history reveals five distinct eras and three dramatic inflection points. Let me define annotations for the hero plot.
# Diesel premium over regular gasoline over timep_diesel <- fuel_compare %>% ggplot2::ggplot(ggplot2::aes(x = date, y = diesel_premium)) + ggplot2::geom_hline(yintercept =0, color ="grey60", linetype ="dashed") + ggplot2::geom_line(color =as.character(paletteer::paletteer_d("ghibli::PonyoMedium", n =4)[4]),linewidth =0.7,alpha =0.85 ) + ggplot2::annotate("label",x =as.Date("2022-06-01"), y =1.7,label ="Ukraine war drives\ndiesel to $1.79/gal\nover regular",size =2.8, color ="grey25", fill ="white", label.size =0.2 ) + ggplot2::annotate("label",x =as.Date("2000-01-01"), y =-0.35,label ="Late 1990s:\ndiesel cheaper\nthan regular",size =2.8, color ="grey25", fill ="white", label.size =0.2 ) + ggplot2::scale_y_continuous(labels = scales::dollar_format(accuracy =0.01),breaks =seq(-0.5, 2, 0.5) ) + ggplot2::scale_x_date(date_breaks ="5 years", date_labels ="%Y") + ggplot2::labs(title ="Diesel used to be *cheaper* than regular — not anymore",subtitle ="Weekly diesel price minus regular gasoline price ($/gal), 1994–2025",x =NULL,y ="Diesel premium ($/gal)",caption ="Source: U.S. EIA via TidyTuesday 2025-07-01 · Dashed line = price parity" ) + ggplot2::theme_minimal(base_size =12) + ggplot2::theme(plot.title = ggtext::element_markdown(face ="bold", size =14),plot.subtitle = ggplot2::element_text(color ="grey40", size =10),plot.caption = ggplot2::element_text(color ="grey60", size =8),panel.grid.minor = ggplot2::element_blank(),panel.grid.major.x = ggplot2::element_blank() )p_diesel
Important
A structural shift in diesel pricing. Throughout the late 1990s, diesel was actually cheaper than regular gasoline — a fact that surprises most American drivers today. The structural flip happened around 2004–2005 as Asian demand for middle distillates surged and US refinery capacity didn’t keep pace. By 2022, diesel briefly commanded a $1.79/gallon premium over regular — the largest spread ever recorded in this dataset.
Year-over-year volatility
Which grade or fuel type is most volatile? Standard deviation of weekly price changes reveals the answer.
All grades move in near-perfect lockstep — the standard deviation of weekly changes is virtually identical across regular, midgrade, and premium gasoline. Diesel shows slightly higher volatility. This confirms that external shocks (crude oil prices, refinery disruptions, seasonal demand) propagate uniformly across the grade stack, and the grade premium is set by refinery margin decisions, not by separate supply-demand dynamics for each grade.
Log the palette
Final thoughts and takeaways
Thirty-five years of weekly pump prices tell a story of structural change punctuated by external shocks:
The five eras of American gas prices:
The cheap era (1990–2003). Regular gasoline mostly sat below $1.50/gallon. Relative to today, driving was extraordinarily cheap, which both reflected and enabled American car culture’s expansion in this period.
The steady climb (2004–2007). As Chinese and Indian industrialization drove global crude demand, prices crept upward year by year — the slow boil before the crisis.
The crisis years (2008–2009). Gasoline peaked at $4.11/gallon for regular in July 2008, then cratered below $1.70 within six months as the financial crisis destroyed demand. No other period in the dataset shows a faster round-trip.
The plateau (2010–2019). Prices settled into a new, higher normal — typically $2.00–$3.50/gallon — with some volatility tied to crude price swings. The shale revolution kept a ceiling on how high prices could go.
The COVID spike (2020–2022). Demand destruction in April 2020 briefly pushed prices to $1.77/gallon, only to rebound sharply as supply chains disrupted and Russia’s invasion of Ukraine tightened global energy markets. The June 2022 peak — $6.06/gallon for premium reformulated — was the highest ever recorded in the dataset.
The grade hierarchy is stable; the diesel relationship is not. Premium consistently costs about $0.50–$0.65 more than regular — a remarkably durable spread across wildly different price environments. Diesel, by contrast, has undergone a permanent structural shift: from a cheaper alternative in the 1990s to a consistently more expensive fuel today, driven by global refinery economics and export demand for middle distillates.
What the data doesn’t tell us: These are national averages. State-level and regional variation can be substantial — California’s reformulated gas requirements routinely add $0.30–$0.60 above the national average. The EIA does publish regional breakdowns, which would be a rich extension of this analysis.
At the pump in 2025, Americans are paying prices that would have been unimaginable in 1999 but that feel strangely routine after the volatility of the past five years. The data suggests the new normal is somewhere between the pre-COVID plateau and the 2022 peak — roughly $3.00–$3.50 for regular — barring another major supply disruption.