
Drivers are watching gasoline prices shoot up these days as the war in the Middle East causes severe disruptions to the region's energy exports. In late February, right before the joint U.S.-Israeli airstrikes on Iran commenced, AAA reported that the national average price of regular unleaded stood at $2.98 per gallon.
Less than a month later, the national average was on the cusp of $4. If the fighting continues and prevents oil and refined fuels from being exported from the Persian Gulf, the price at the pump is likely to spiral still higher.
Drivers suffering from price whiplash might be asking, "Who controls gas prices?" The short answer is that no single person, company or government can really be said to set gas prices, the same way that no single entity controls the prices of the most common types of car insurance.
But it is possible to break down some of the major factors that go into determining what a gallon of gas sells for. Let's take a look.
1. Crude oil
The Department of Energy has a handy chart that breaks down the major expenses involved in turning crude oil in the ground into the refined gas you can put in your car. The biggest, accounting for a bit more than half the price you pay, is the price of crude oil — the raw material from which gas is refined.

The price of that raw material has been soaring lately. On the eve of the war, benchmark West Texas Intermediate crude oil was trading near $65 per barrel. The decline in exports from the oil-rich Persian Gulf region has recently pushed WTI close to $100 per barrel at times. It has also fallen sharply on days when headlines feature hopeful reports about a potential ceasefire, but even when traders think an end to the war might be in sight, WTI has only fallen to around $90.
In other words, oil remains substantially more expensive than before the war began. And it could stay that way even after any ceasefire deal emerges, because it will likely take months for oil exports from the Persian Gulf to start flowing at normal levels again. Damage to oil wells and other infrastructure will take time to repair, keeping markets undersupplied.
Related: Kiplinger Energy Outlook
2. Taxes

The next biggest factor determining gas prices, according to the Department of Energy, is gas taxes — specifically, the state, local and federal taxes levied on fuel.
No one loves paying taxes, but they can't be blamed for the run-up in gas prices. The 18.4-cent-per-gallon federal tax on gas hasn't been increased in more than three decades.
Some states may even opt to temporarily lower their own fuel taxes if the current price spike drags on for long enough. That happened the last time a big geopolitical crisis caused a steep rise in gas prices, when Russia invaded Ukraine in 2022.
3. Other factors determining the price of gas

The remaining factors controlling gas prices are a mix of related costs:
- Refining crude into gasoline and other fuels
- Transporting it to stations by pipeline and truck
- Marketing gas
This bucket of costs includes refiners' profits on turning barrels of oil into barrels of gasoline, diesel and other fuels, and these days, those profits are soaring. Some refineries closed due to the slump in fuel demand during the pandemic, which means bigger profit margins for those that remain, now that demand is back to normal.
If you want to share in some of those profits as an investor, instead of just funding them as a driver, learn how to find the best energy stocks. Maybe they will provide some comfort during your next expensive fill-up.