Packaged food makers H.J. Heinz Co and Hormel Foods Corp both posted better-than-expected quarterly profits as consumers bought more items like ketchup and Spam as they increasingly ate at home to save money.

Heinz, which makes its namesake ketchup and Ore-Ida potatoes said on Thursday that it also benefited from strength in emerging markets and price increases, although the stronger U.S. dollar cut into sales outside the United States, causing net income to fall.

Hormel, which makes Spam and Dinty Moore canned stew, also saw profits boosted by lower costs for livestock feed in its Jennie-O turkey business.

Most U.S. food companies have benefited over the past year from consumers trying to cut costs by eating more at home during the recession rather than at restaurants.

Food companies also raised prices last year as costs for commodities like wheat, corn and oil soared. Even as many of those costs have fallen, they have largely been able to maintain their pricing.

Heinz profit fell to $219.1 million, or 67 cents a share, in the first quarter ended July 29 from $234.3 million, or 72 cents a share, a year earlier.

Analysts on average forecast earnings of 62 cents a share, according to Reuters Estimates.

Sales fell 4.3 percent to $2.47 billion, topping the analysts' forecast of $2.44 billion.

Excluding the impact of currency, sales rose 4.5 percent, the company said.

For fiscal 2010, Heinz expects sales to rise 4 percent to 6 percent, excluding the impact of currency fluctuations, with earnings per share up 5 percent to 8 percent on that basis.

Hormel's net earnings rose to $77.2 million, or 57 cents a share, in the third quarter ended July 26, from $51.9 million, or 38 cents a share, a year earlier.

Analysts on average forecast profit of 52 cents a share, according to Reuters Estimates.

Sales fell 6.2 percent to $1.57 billion as the company cut back on turkey production and the weak economy hurt sales to restaurants.

Earlier this month, Hormel raised its full-year earnings forecast to a range of $2.36 to $2.42 a share, citing its better-than-expected third quarter. The company stood by that outlook on Thursday.

Heinz shares rose 2.8 percent to $39 in trading before the market opened. Hormel stock was flat at $37.24, with 130 shares traded.

(Reporting by Brad Dorfman; Editing by Lisa Von Ahn)