By Emily Fredrix -- AP Food Industry Writer

In a sour economy, you can pad your budget by cutting out cable, trips to restaurants and vacations. But you can't cut out food.

Americans spend about 12.5 percent of their budgets on food each year, according to the Bureau of Labor Statistics. That means many families' finances are at the mercy of fluctuations in food prices, which soared last year and now are retreating.

What determines just how much you pay at the supermarket for a loaf of bread or a bag of chips?

Here are some questions and answers about the pricing of groceries.

Q: How are food prices set?

A: Food prices are closely linked to the cost of their main ingredients — like dairy, corn and wheat — along with the fuel that's used to transport groceries to your supermarket. All of those items, called commodities, can be volatile since their price is set based on demand and trading on various exchanges.

Last summer, those prices soared to record highs. Crude oil prices climbed to more than $100 a barrel, and corn and wheat prices also peaked. Many factors were at play, including Midwestern floods that devastated corn and soybean crops, and increasing demand as the global economy — for the moment, at least — was improving.

Some groups, especially food makers, also say a rise in demand for the corn-based fuel additive ethanol pushed up the cost of food, as supply had difficulty keeping up with the demand for corn as an ingredient in both food and fuel. Last month, the nonpartisan Congressional Budget Office said higher use of ethanol accounted for about 10 percent to 15 percent of the rise in food prices between April 2007 and April 2008.

The CBO said in a report that the effect of ethanol on future food prices is not yet clear, since it could lead to an increased supply of corn, which could lower food prices.

Q: How did food makers react to soaring commodity prices?

A: Food companies wanted to protect their profit margins and make sure they weren't losing money, so they boosted prices across many of their product lines. According to the Consumer Price Index, the average cost of food rose 5.9 percent last year, which is faster than previous annual rates in recent years.

If you liked this article you might like

Counterfeit Toys Are a Consumer Rip-Off -- And Health Hazard to Children

Obamacare Contraception Mandate Woes Continue

Cannabis Colleges Educate Budding Ganjapreneurs

4 Things to Avoid Before Closing on a House

Why 401(k) Savers Are Like Bad Boyfriends