Shares of the Pittsburgh company, which owns such brands as Kraft, Oscar Meyer, Jell-O and Velveeta, were down 4.6% to $37.16 on Wednesday.
Kraft reported a net loss of $27 million, or 2 cents a share, compared with a loss of $1.65 billion, or $1.35 a share, a year ago. Adjusted earnings came to 78 cents a share, beating analysts' estimates of 72 cents.
Sales of $6.615 billion were down from $6.648 billion last year, but ahead of Wall Street estimates of $6.551 billion.
"Our second-quarter results serve as a strong indicator that our Kraft Heinz team will not only deliver a stronger 2021 than we initially anticipated, but will come out of the global pandemic much stronger than we entered," CEO Miguel Patricio, said in a statement.
Free cash flow in the first six months of the year was down 18.4% to $1.6 billion from a year ago due to lower net cash provided by operating activities and higher capital expenditure.
Looking ahead to the third quarter, the company said it that expects a mid-single-digit percentage increase in organic net sales and a low-single-digit percentage decline in constant currency adjusted EBITDA compared with 2019.
Kraft said it views as a more meaningful comparison given "the exceptional, COVID-19-related consumer demand changes" in 2020. Sales of packaged foods soared during the pandemic.
"We are seeing signs that several pandemic-inspired cooking and eating behaviors are sticking, even as mobility increases and restrictions lift," Kraft senior executive Carlos Abrams-Rivera said, according to Reuters.
Last September, the company said it would cut $2 billion of costs over four years and use the funds to boost marketing spending 30%.
While the company said it still expects to deliver 2021 adjusted EBITDA ahead of its strategic plan, Kraft said it now expects adjusted EBITDA to be ahead of 2019 as well.