When you pump $20 into your tank, you're not just paying for gas. Four main drivers influence the price at the pump. The cost of crude oil on the national and international markets, refining costs and shipping account for roughly 87 percent of the price. The rest comes courtesy of state and federal taxes.

What Determines Gas Price

The all-state average retail gas price in Oct. 2013 was $3.34 per gallon. The vast majority -- 71 percent -- of that price is down comes from the cost of crude oil. This fluctuates over time and across different regions. Refining costs and profits make up five percent of the price, and distribution, marketing and retail costs account for 11 percent. The remaining 13 percent represents gas taxes. Both federal and state governments levy excise taxes on gas.

State Taxes

The 2013 national average state gas tax is 23.47 percent per gallon of gasoline, and 24 percent per gallon of diesel. However, where you live determines how much you pay at the pump. State gas taxes are decidedly volatile. Based on 2013 figures, drivers can expect to pay over 40 cents per gallon more in New York, the highest rate state, than in Alaska, which has the lowest rate. For the average American driver, that's a difference of up to $240 per year in state gas tax alone.

Federal and Other Taxes

Gas stations also pay an excise tax to the federal government. In 2013, the federal tax rate stood at 18.4 cents per gallon, or 24.4 cents per gallon for diesel -- a figure that has remained unchanged since 1993. Depending on its location, the station may bear additional taxes, such as state sales tax, cleaner fuel and other environmental charges, storage tank fees and other taxes.

Arizona's Tax Burden

Arizona state taxes are among the lowest in the country. At the time of publication, those purchasing gas in Arizona pay 19 cents per gallon. Add that to the 18.4 cent federal tax, and you're paying 37.4 cents per gallon in tax. Of course, the figures don't look like that at the gas station. Station owners set an overall price that includes the tax rate. Assuming a hypothetical gas price of $3.34 per gallon, $0.184 goes to federal taxes and $0.19 to state taxes. This leaves $2.96 as the raw price of the gas. For every $10 of gas you pump, $1.12 goes to the government -- more than 11 percent of the price.