Americans are shelling out more money at the gas pump just as the summer driving season is about to heat up.

Soaring crude oil prices have lifted national gasoline prices 21% over the past year, according to AAA. Drivers in nine states are paying $3 a gallon for regular gasoline.

Prices could continue to climb after President Donald Trump decided this week to sanction Iran, the world's fifth largest oil producer.

This pain at the pump threatens to drain some of the extra take-home pay that many households are enjoying from Trump's tax cuts.

Higher gas prices are on track to cost Americans an extra $38 billion in 2018, wiping out about one-third of the direct benefit from the tax law, according to Morgan Stanley. The firm estimated that American households will take home an additional $128 billion in 2018 because of the new tax law.

"While the tax cuts have lifted take-home pay for the vast majority of workers," Morgan Stanley chief US economist Ellen Zentner wrote to clients, "rising gasoline prices are eating into that benefit."

Related: What Trump's Iran decision means to oil and gas prices

Every 10-cent jump in gas prices costs Americans an extra $10.6 billion per year to fill up their tanks, Morgan Stanley found.

That's money that Americans aren't spending on other stuff that stimulates the economy.

"People probably aren't going to cancel their vacation plans, but it will manifest in spending elsewhere," said Tom Kloza, global head of energy analysis at the Oil Price Information Service.

The price of gas is nowhere near $4 a gallon like in 2008 or even $3.50 in 2014.

Still, spending more at the pump can be painful, especially for families that live paycheck to paycheck.

Morgan Stanley found that the bottom fifth of earners spend 8% of their pre-tax income on gasoline. The top fifth spend just 1%.

In addition to the tax cuts, higher gas prices could water down the economic gain from the bipartisan agreement in Congress to ramp up spending.

Oxford Economics said on Tuesday that about half of the "fiscal boost" from tax cuts and government spending could be reversed in 2018 should US oil prices average $70 a barrel.

Related: How Trump's tax cuts are affecting CNNMoney readers

The jump in gas prices may not be done yet. Crude oil climbed nearly 3% on Tuesday and topped $71 a barrel for the first time since late 2014.

Trump's decision to exit the Iran nuclear agreement and re-impose sanctions on the OPEC nation could lift prices even higher. The key will be whether Iran's crude oil exports are significantly restricted — and whether Saudi Arabia or another nation fills the gap.

Strong demand and production cuts from OPEC and Russia tightened global oil supplies prior to the Iran decision.

Saudi Arabia pledged on Tuesday to "work with major producers within and outside OPEC" to "mitigate the impact" of supply shortages.

Related: America's biggest oilfield is running out of pipeline

The United States may be able to compensate as well. US oil production is skyrocketing, though output in the oil-rich Permian Basin is being limited by pipeline shortages that could last until late 2019.

The US Treasury said oil sanctions on Iran won't take effect until November. However, Treasury officials advised nations to immediately cut back imports of Iranian crude.

Goldman Sachs said Brent oil prices could top its summer forecast of $82.50 a barrel, or about 7% higher than current prices.

"Oil prices will certainly move up," Fereidun Fesharaki, chairman of energy consulting firm FGE, wrote to clients on Wednesday. $90 or $100 oil "may again be in the cards," Fesharaki wrote.