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

Image source: Getty Images.

Gasoline prices vary tremendously by state. Fueling the difference is a combination of the incremental refining costs to meet higher standards, greater distribution, marketing, and transportation expenses due to location, as well as state gas taxes. These extra costs can add up. In fact, the seven states with the highest gas prices at the end of April, according to GasBuddy.com, paid on average $0.45 per gallon more than the median price of gas nationwide. Here's a look at why consumers in these seven states are still feeling some pain at the pump even though oil prices are half what they once were.

Pittsburgh, Pennsylvania skyline.

Image source: Getty Images.

No. 7: Pennsylvania

According to GasBuddy, at the end of April, those traveling in the Keystone State paid an average of $2.64 per gallon, which was $0.25 per gallon above the national average, according to AAA. The primary culprit is that Pennsylvania has the highest state gasoline tax in the nation at $0.58 per gallon. That's nearly five times more tax than what drivers in Alaska pay, which has the lowest state gas tax in the country.

Las Vegas sign with strip street background.

Image source: Getty Images.

No. 6: Nevada

While Nevada also has a relatively expensive gas tax at $0.33 per gallon, that's only the 14th highest in the country, so it's not the sole reason for the state's higher gas prices. The other driver is that it imports the bulk of its gasoline from refineries in California, which has one of the highest gas prices in the country. Because of that, its residents not only pay for that higher-cost gas but the transportation charges to ship gasoline in by pipeline.

Welcome to Oregon sign.

Image source: Getty Images.

No. 5: Oregon

Oregon also has a relatively high state gas tax of $0.31 per gallon, which ranks 19th in the country.  The state also doesn't have any refining capacity, so it must import gas from other states, with the bulk coming from California, Alaska, and Washington. Not only are those among the highest-cost states in the country but Oregon also pays higher transportation expenses to bring this gas to drivers. Finally, outside of rural areas, there is a ban on customers pumping their own gas, which adds to the price at the pump.

Space Needle and Seattle downtown.

Image source: Getty Images.

No. 4: Washington

Driving Washington's high gas prices is the state's gas tax, which at $0.49 per gallon is behind only Pennsylvania's. Fueling those high state gas taxes are two recently enacted increases to finance the state's $16 billion Connecting Washington plan, which will fund the construction of several highway projects across the state. In addition, Washington also imports oil from Alaska, which has higher costs due to transportation expenses.

Welcome to Alaska sign.

Image source: Getty Images.

No. 3: Alaska

With the cheapest gasoline tax in the country and no oil imports due to the amount of crude the state produces, it would seem like Alaskans should enjoy low gas prices. However, that's not the case because the state only has one small, inefficient oil refinery. Because of that, the state exports low-cost oil to Washington and California and then imports the more expensive gasoline back, thus paying twice to transport the same oil.

Golden Gate Bridge landmark in San Francisco, California.

Image source: Getty Images.

No. 2: California

The Golden State has come up quite a few times already for its high-cost gasoline. One of the drivers is that California requires a special blend of gasoline to meet its fuel standards, which are higher than the federal standard. That blend not only costs more but few refineries have the capacity to make that type of gas, which causes price spikes when a refinery has an issue. On top of that, the state has one of the highest gas taxes in the country at $0.38 per gallon.

Plumeria flowers on the shore.

Image source: Getty Images.

No. 1: Hawaii

The Aloha State rounds out the list due to many of the same issues that plague other high-cost states. Unsurprisingly, the state's gas tax is at the upper end, currently ranking third nationally at $0.44 per gallon. In addition, the state's refining costs are at the higher end of the spectrum because of the challenges of transporting oil there as well as its high cost of living. As a result, driving in paradise doesn't come cheap because Hawaiians pay a premium price every step of the way, including higher land and operating costs for gas stations and higher input costs for refineries.