HJ Heinz has agreed to be acquired by an investment group including billionaire investor Warren Buffett in a deal valued at $23.3 billion.

The ketchup company said the deal is the largest ever in the food industry.

Heinz shareholders will receive $72.50 in cash for each share of common stock they own. The transaction value includes the assumption of Heinz's debt.

Based on Heinz's number of shares outstanding, the deal is worth $23.3 billion excluding debt.

"It's our kind of company," Buffett said in an interview on CNBC, noting its signature ketchup has been around for more than a century. "I've sampled it many times," he added.

Last year, Heinz says it had sales of $11.6 billion, with ketchup and sauces accounting for just under half of that.

In addition to its ketchup, Heinz makes Weightwatchers meals, Heinz beans and Classico sauces. 

The company was founded by Henry John Heinz and his neighbour L Clarence Noble in 1869. The pair's first product was grated horseradish, bottled in a clear glass to showcase its purity.

The first ketchup was introduced in 1876 and the company says it was America's first commercial grade ketchup.

Given the saturated North American market, Heinz has increasingly looked to emerging markets for growth. In its last quarter, the company said emerging markets made up 23% of sales.

Berkshire Hathaway and 3G Capital, the investment firm which also bought Burger King in 2010, said that Heinz will remain headquartered in Pittsburgh.

The price for the deal represents a 20% premium to Heinz's closing price of $60.48 on Wednesday.

Heinz said the deal was unanimously approved by its board.

Mr Buffett said on CNBC that Berkshire is putting $12-$13 billion into the deal. But he noted that Berkshire will still have room to make more acquisitions, noting that its businesses continually replenish its cash supply.

"Anytime we see a deal is attractive and it's our kind of business and we've got the money, I'm ready to go," Buffett said.

The deal is expected to close in the third quarter.