While it posted a second-quarter loss, Uber generated free cash flow of $382 million and beat Wall Street expectations for quarterly revenue.

Uber also forecast third-quarter profit above estimates, as more people have come to rely on its services for transportation and food delivery.

The company also added more drivers and delivery agents to its fleet in the quarter, taking their total number to an all-time high of about 5 million and easing concerns that soaring gas prices were deterring them from signing up.

Uber's net loss of $2.6 billion was largely hurt by investments in companies such as India's Zomato. A source told Reuters Uber is likely to sell its stake in the Indian food-delivery firm on Wednesday.

Revenue from Uber's ride-share business surged 120% to $3.55 billion in the second quarter, boosted by office re-openings and a spike in travel demand.

Uber's better-than expected results helped drive a 14% gain in shares of rival Lyft, which is scheduled to report results on Thursday.