"We're taking a realistic view on the back half (of the year), we believe," Chief Executive David Mackay said in an interview.
The company, which makes foods that include Special K cereal and Keebler cookies, said profit rose to $301 million, or 75 cents a share, from $267 million, or 67 cents a share, a year earlier.
Analysts on average forecast 70 cents a share, according to Reuters Estimates.
Sales rose 9% to $3 billion, compared with the analysts' average estimate of $2.93 billion. Excluding the benefits of the weak dollar, sales rose 6%.
Kellogg is posting "best-in-class growth" despite higher costs, because it continues to invest in new products and advertising, while taking steps to "tenaciously" cut costs, said Edward Jones analyst Matt Arnold, who rates the stock at "buy."
"If you can't grow sales, especially evenly, from both volume and pricing, you're not going to be capable of putting up the numbers that Kellogg is," he said.
Kellogg raised prices in September to help offset the impact of higher costs. In June, competitor General Mills announced its own price increase.
Rising wheat prices are hitting Kellogg especially hard.
Wheat futures hit an 11-year high on Thursday at the Chicago Board of Trade on concerns that harsh weather in Europe would harm the crop.
But the company also saw a 1.2% increase in gross margin, despite rising costs.
"They certainly set the stage for gross margin compression from costs, and gross margin expanded due to favorable pricing, and probably from currency," D.A. Davidson & Co. analyst Timothy Ramey said. He rates the stock "neutral."
Kellogg stood by its forecast calling for full-year earnings of $2.71 to $2.74 a share. Analysts on average forecast $2.76.
The company said it expected sales, excluding currency impact, to show a rise in the mid-single-digit percentage range.
Kellogg said cost inflation would be about 26 cents to 30 cents a share for the year, up 8 cents from its previous forecast.
North American sales rose 7% in the second quarter, with the company's retail cereal business up 3%.
International sales rose 13%, although 7 percentage points of that increase came from currency fluctuations.
Kellogg benefited from weakness in the U.S. dollar, which boosted overseas sales when converted to the U.S. currency.
The company's shares were up 25 cents to $52.17 in New York Stock exchange trading. The stock is up 3.7% this year, while General Mills is down 1.3 percent.
Kellogg trades at about 17.1 times next year's estimated earnings, compared with a 15.2 multiple for General Mills.