Just a few cents of every gallon goes to the gas station when you fill up - most goes to those that produce the oil.

NEW YORK (CNNMoney.com) -- Motorists may fume when forking over $3 a gallon at the local service station, but as it turns out, your local filling spot makes chump change from a gallon of gas.

So exactly who is getting rich?

Oil traders: While often blamed for pushing up prices, traders don't necessarily benefit from the high price of crude or gasoline; they profit from how much the price changes. Traders can get rich - as long as they bet correctly on whether prices will rise or fall.

For example, an investment bank that makes a bet that the price of oil will rise makes money when oil prices go from $95 to $100 a barrel - or $100 to $95 if it bet the price will fall - not on the difference between production cost and trading price.

"If you wanna keep your job, you gotta be more right than wrong," said John Kilduff, an energy analyst at the trading firm MF Global in New York, explaining how traders make their money.

Gas stations: A surprisingly small amount goes to the guy who runs the station.

Most service stations are independently owned and operated and take in between 7 and 10 cents for every gallon they sell, according to the U.S. Energy Information Administration.

That 7 to 10 cents going to the gas station isn't even profit. Out of that, station owners still have to pay leases, workers, and other expenses - leaving them with a profit of just a few cents. For the service stations, most profit comes from selling coffee, cigarettes, food and other amenities.

These calculations are based off of EIA's most recent numbers, when gas was $3.04 a gallon. Gasoline hit another record nationwide average of $3.27 a gallon Thursday.

Taxes: The government takes about 40 cents right off the top, with about 18 cents going to the feds. State taxes vary widely, but the national average is about 22 cents a gallon. Most of this money is used to build and maintain roads.

Transportation: Getting the gas from refineries to service stations via trucks or pipelines - and the cost of storing it in large tanks - eats up another 23 to 26 cents per gallon.

Refining: About 24 cents a gallon goes to refining companies like Valero (VLO, Fortune 500), Sunoco (SUN, Fortune 500) or Frontier (FTO, Fortune 500) that specialize in turning crude oil into gas. Some companies like ExxonMobil (XOM, Fortune 500), Chevron (CVX, Fortune 500) and ConocoPhillips (COP, Fortune 500) also have refining operations.

Profits for refiners have been squeezed lately because the price they pay for oil has risen so much faster than the price they can sell the gas for. This helps explain why Big Oil companies -like Exxon, which actually buys more crude oil than it produces - haven't seen their profits rise as much as the price of oil.

Crude oil: This is the most expensive part of a gallon of gas. Of every gallon of gas $2.07 from every gallon of gas goes to producers of crude like Chevron (CVX, Fortune 500), BP (BP), and smaller outfits like Anadarko (APC, Fortune 500) and Marathon (MRO, Fortune 500), or national oil companies controlled by countries like Saudi Arabia, Mexico or Venezuela.

Crude currently trades around $110 a barrel, but breaking down the money in that barrel of oil is tough. Exploration and production costs, royalty payments - all a big part of $110 a barrel oil - vary widely country by country and project by project.

"It's difficult to generalize; there's a whole spectrum of costs," said Ron Planting, an economist with the American Petroleum Institute, an industry trade group.

They can range from $1 a barrel to produce crude in Saudi Arabia to over $70 a barrel to find, develop and pump oil in the deep water Gulf of Mexico or off the coast of Algeria, said Ann-Louise Hittle, an oil analyst with the energy consultants Wood Mackenzie.

EIA estimates it costs U.S. oil companies an average of about $24 a barrel to find, develop and produce oil worldwide, but that doesn't include costs like transportation, administration, or income taxes - which can be substantial. While Exxon made $40 billion in 2007, a 60% increase from 2004, it paid $100 billion in taxes and royalties.

Nonetheless, $40 billion - or any of the record profits seen by most oil companies over the last few years - is certainly a lot of money, and it has put Big Oil in lawmaker's cross hairs.

Rep. Edward Markey, D-Mass., has called the chief executives of the five biggest oil companies to testify on the industry's record profits on April 1st. Markey's office swears it's no April fool's joke.

Have you lost your job, your business or your home? Are you raiding retirement accounts to pay the bills? We want to hear from you. Tell us how you're being affected by the weakening economy and you could be profiled in an upcoming story.

Send emails to realstories@cnnmoney.com.