Coca-Cola's diet soda sales and higher prices helped the company beat Wall Street earnings and revenue projections during the third quarter, boosting profit by 30 percent.

Here's what the company reported Tuesday versus what Wall Street was expecting, based on average estimates of analysts polled by Refinitiv:

Earnings: 58 cents per share, adjusted, versus an estimate of 55 cents

Revenue: $8.25 billion compared with a forecast of $8.17 billion

Net income surged to $1.88 billion, or 44 cents a share, up from $1.45 billion, or 33 cents a share, during the same three months last year, the company said Tuesday. Excluding certain items, including discontinued operations, the company earned 58 cents a share, outpacing analyst expectations.

It generated $8.25 billion in revenue, a decline of about 9 percent from $9.08 billion a year ago, but sill beating analysts' estimates of $8.17 billion.

The company raised prices in North America to offset higher import and transportation costs, CEO James Quincey told analysts on a conference call Tuesday morning. "We had a solid quarter we're on track to close out the year for our guidance," he said.

Coke shares rose by about 2 percent in morning trading.

Coke said double-digit growth in sales volume for its popular diet soda, Coca-Cola Zero Sugar, and strong sales of other sparkling soft drinks helped drive the company's earnings results. Overall, sparkling soft drink sales grew 2 percent — driven by sales of its trademark Coca-Cola and diet versions of Fanta and Sprite.

Its water and sports drink sales rose 5 percent, primarily due to strong sales in China and Mexico.

Those gains were offset by a 3 percent decline in juice, dairy and plant-based beverage sales — mostly hurt in the Middle East and North Africa — as well as a drop in tea and coffee. A rise in sales of Fuze Tea and Gold Peak was hurt by a drop in sales of its local tea brand Turkey.

Overall, its unit case volume, a key indicator of how much product it sold, rose 2 percent from a year ago.

The company reiterated its previous forecast for growing organic revenue of at least 4 percent for the full year. Organic revenue, which grew 6 percent over the previous year, strips out fluctuations in foreign currency rates.