Walmart reported third-quarter earnings and revenue that narrowly beat analyst estimates and raised its full-year outlook, citing strong e-commerce growth ahead of the holiday season.

Global e-commerce sales grew 17%, driven by store-fulfilled pickup and delivery. Walmart U.S. e-commerce rose 23% and Sam's Club U.S. rose 30%. Walmart U.S. advertising sales increased 37% for the quarter.

For the quarter ended Oct. 31, Walmart reported net income of $4.95 billion, or 62 cents per share, down from $6.14 billion, or 77 cents per share, a year earlier. Revenue rose 5.2%. Walmart U.S. net sales reached $125 billion, up 3.6%, and comparable sales excluding fuel rose 2.9%, in line with StreetAccount expectations. Sam's Club reported net sales of $25.9 billion, up 10%.

Walmart now expects net sales to rise 4.9% to 5.2%, up from its previous forecast of 4% to 5%. It projects adjusted earnings per share of $2.84 to $2.89, compared with a prior range of $2.80 to $2.87. It also expects adjusted operating income to grow 8% to 8.6%, up from 7% to 8.5%.

Walmart said it cut prices on nearly 8,000 products as U.S. consumers worry about the cost of living amid elevated food and gas prices.

CEO John Furner told CNBC that diesel and transportation costs have risen above expectations and "work their way into cost of goods." He said tariff refunds have helped offset those costs. "So we're hoping to see these costs come down as soon as possible, and we'll keep prices as low as we can," Furner said.

CFO John David Rainey told CNBC that Walmart saw its largest food category share gains in three years during the quarter. He said the company is "optimistic" about holiday consumer spending and that the fourth quarter is "off to a pretty good start."

Furner said Walmart's AI agent, Sparky, has increased average customer basket sizes by 40%. He also said a joint membership option with Walmart+ and Sam's Club, launched in late October, has added roughly two million new Sam's Club members. Global membership fee revenue grew 17% in the quarter.

Walmart shares are up roughly 13% so far this year, according to the report.