A man yelling with money in his hands as he pumps gas.

Image source: Getty Images.

Where you live can have a significant impact on how much you pay for a gallon of gasoline. Drivers in the 10 states with the highest gas prices spend an average of $0.36 per gallon more than the national average of $2.56 a gallon, according to the latest data from AAA. While that might not seem like a lot, it adds up. For perspective, the typical American driver uses 656 gallons of gas per year, which means those drivers are paying about $240 more per year to fill up their car. Meanwhile, motorists who live in the 10 states with the cheapest gas are saving an average of about $400 per year compared to those in the most expensive states. 

Read on to find out which states made these lists and why.

An aerial view of the Chicago skyline at dusk.

Image source: Getty Images.

No. 10 most expensive: Illinois

Drivers in Illinois currently pay about $2.72 per gallon, according to AAA. One of the culprits is the state's high gas tax, which ranks 11th in the nation at $0.34 per gallon, according to the American Petroleum Institute.

Washington, D.C. skyline with highways and monuments.

Image source: Getty Images.

No. 9 most expensive: District of Columbia

Motorists in the nation's capital currently shell out about $2.73 a gallon despite having a below-average gasoline tax of $0.24 per gallon. Several factors fuel the higher price, including the costs of transporting the gas to the pumps and a higher cost of living, which leads gas stations to charge more.

Traffic on the Las Vegas strip at night.

Image source: Getty Images.

No. 8 most expensive: Nevada

Travelers in Nevada pay around $2.74 for a gallon of gas these days. The state has an above-average gas tax, and it also imports the bulk of its gas from California, which is much further down on this list. Because of that, drivers are paying for higher-cost gas plus the extra cost of transporting it across the border via pipeline.

Downtown Detroit GM Headquarters.

Image source: Getty Images.

No. 7 most expensive: Michigan

Drivers in Michigan currently pay around $2.75 per gallon. One factor driving up prices in the state is its relatively high gas tax, which is now the fifth-highest in the nation at $0.44 per gallon.

The Philadelphia skyline.

Image source: Getty Images.

No. 6 most expensive: Pennsylvania

The Keystone State currently has the highest state gasoline taxes in the country at $0.58 per gallon, which is almost $0.10 more expensive than the state with the next-highest price (Washington). That's the primary reason why Pennsylvania drivers are paying $2.79 per gallon, which is 9% above the national average. 

Portland, Oregon with Mount Hood in the background.

Image source: Getty Images.

No. 5 most expensive: Oregon

While Oregon has a higher-than-average state gas tax, that's not why consumers are paying a relatively high price of $2.86 per gallon to fill up. Rather, the state imports the bulk of its gas from other high-cost states like Washington and California, which drives up the price. In addition, Oregon drivers aren't allowed to pump their own gas, so they end up paying a little extra to have an attendant perform that service.

Oil refinery on the Puget Sound with Mount Baker in the background.

Image source: Getty Images.

No. 4 most expensive: Washington

Washington has the second-highest state gas tax in the country at $0.49 per gallon, which takes much of the blame for the current unleaded price of $2.99 a gallon. However, Washington also imports most of its oil from Alaska, which has higher transportation costs than foreign crude imports due to the Jones Act.

An oil tanker in the icy waters off Alaska.

Image source: Getty Images.

No. 3 most expensive: Alaska

Drivers in the nation's 49th state currently pay the third-highest price for gas at $3.21 a gallon -- despite the fact that Alaska's gas taxes are the lowest in the U.S. at just $0.12 per gallon. The reason for Alaska's higher price is the fact that the oil-rich state doesn't have enough refining capacity to meet local demand. Because of that, it ships oil out to West Coast refineries, which then send their relatively expensive gas back to Alaska, forcing the state's drivers to pay for transport both ways.

An oil refinery in Hawaii.

Image source: Getty Images.

No. 2 most expensive: Hawaii

At one point, drivers in the Aloha State had been paying the highest price per gallon of gas. However, while the state doesn't currently hold that distinction, at $3.22 per gallon, drivers are still paying a hefty price compared to the rest of the country. Several factors are driving up the price, including the third-highest gasoline tax in the nation at $0.44 per gallon, as well as the additional costs of shipping oil to the state's two refineries, which have higher operating costs than those on the mainland.

Man's hand holding three hundred US dollars and gas nozzle while pumping gas into parked vehicle.

Image source: Getty Images.

No. 1 most expensive: California

The Golden State currently has the most expensive gas in the country at $3.24 a gallon. That's primarily because California's environmental standards are higher than the federal requirements. Because of that, the state needs a special blend of gasoline that few refineries have the capacity to make, which often leads to price spikes when one refinery goes offline for maintenance. On top of that, California has the seventh-highest gas tax in the country, which adds to the premium that drivers pay per gallon.

Closeup of man, showing thumb up gesture, pumping gasoline fuel in car at gas station.

Image source: Getty Images.

The 10 states with the cheapest gas

State

Recent price

Alabama

$2.26

Mississippi

$2.27

South Carolina

$2.29

Arkansas

$2.31

Louisiana

$2.31

Texas

$2.31

Virginia

$2.32

Tennessee

$2.34

Missouri

$2.36

Oklahoma

$2.36

Data source: AAA. Prices as of Nov. 11, 2017.

These states have the cheapest gas for two primary reasons. First, all of them charge low state gas taxes. For example, South Carolina's gas tax is the second-lowest in the nation behind Alaska's $0.17-per-gallon levy. In addition, several of these states are along the Gulf Coast, which is the nation's refining hub. Not only do those facilities refine cheaper varieties of oil than those on the West Coast, but they don't have to ship gasoline very far, which cuts down on transportation costs. When low taxes are combined with ample access to cheaper gas, it enables drivers to save hundreds of dollars per year when they fill up their cars compared to those in the most expensive states.

A hand putting money from rising  coin stacks into a jar.

Image source: Getty Images.

Paying more at the pump could cost you a fortune

Because where you choose to live affects what you pay per gallon, it can have a significant effect on your financial future. As noted earlier, drivers in the 10 states with the cheapest gas are saving about $400 per year compared to those in higher-cost states. To put the impact of those savings into perspective, if they invested that money over 30 years, they'd have an extra $40,000 toward retirement, assuming a modest 7% return. While that might not sound like a lot, it could make a huge difference considering what the average American has saved for retirement.

Matthew DiLallo has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.