Revenue more than doubled to $8.1 billion in the three months through June.

Uber reported better-than-expected revenue on Tuesday, fueled by strong demand for the San Francisco-based company's ride-hailing and food delivery services that sent its shares upward.

Revenue more than doubled to $8.1 billion in the three months through June, a 105 percent increase, at a time when many tech companies are struggling to navigate global economic turbulence.

Still, the firm posted a net loss of $2.6 billion, but investors shrugged it off and shares were up about 13 percent in early trading on Wall Street.

Uber primarily attributed the loss to the falling value of its investments in financially-strapped companies such as Singapore's VTC Grab, US self-driving vehicle start-up Aurora and Indian food delivery service Zomato.

The ride hailing giant posted $1.8 billion in revenue from its freight operations, and said income figures got a boost from a change in how it accounts for its rides business in Britain.

Uber also notched gains in monthly active platform consumers, gross bookings and trips compared with a year ago, reflecting higher demand but also a higher number of drivers for its signature ride service and food delivery operations.

Inflation attracts new drivers

"We continue to benefit from an... increase in the on-demand transportation of people and things," Uber CEO Dara Khosrowshahi said. "We intend to continue capitalizing on these growth tailwinds."

Analysts noted that the relatively robust earnings were well above expectations, a relief during an earnings season buffeted by inflation, economic uncertainty and the ongoing impact of the coronavirus pandemic.

"Consumers are still moving to the Uber platform especially as travel, shifting to the office, and other post-pandemic trends take hold globally," wrote analyst Dan Ives.

Uber reported it now has nearly five million drivers and couriers on its platform, a 31 percent increase from last year.

"We saw an acceleration in both active and new driver growth in the quarter," Khosrowshahi. "Against the backdrop of elevated gas prices globally, this is a resounding endorsement."

Uber noted that some 70 percent of drivers coming to the platform said inflation played a part in their decision, as people look for additional income to offset price increases.

The latest earnings season has been marked both by investors being relieved when results weren't as bad as feared, but also backing away from companies with less clear futures.

Facebook owner Meta and messaging app Snapchat's parent company both saw shares fall after results showed their ad-driven models were vulnerable to the current economic uncertainty.

But giants like Apple and Amazon reassured markets last week with better than expected results on strong demand and sales.