Aug 1 (Reuters) - Uber Technologies on Tuesday forecast third-quarter operating profit above Wall Street expectations as it sees growing demand for ride hailing due to strong leisure travel trends and gradual return to in-office work.

The ride-sharing platform's cost controls ranging from layoffs to lower transaction costs and maintaining a steady headcount have helped the company maintain its target to post operating income profitability this year. At the same time, the number of rides after the pandemic is growing.

"Robust demand, new growth initiatives, and continued cost discipline resulted in an excellent quarter, with trips up 22% and a GAAP operating profit, for the first time in Uber's history," CEO Dara Khosrowshahi said.

However, Uber reported second-quarter revenue of $9.23 billion, missing analysts' estimates of $9.33 billion, according to Refinitiv IBES data, as a weak freight market pinches.

The ride-sharing company forecast third-quarter adjusted earnings before interest, taxes, depreciation and amortization (EBITDA) — a profitability metric keenly watched by investors — between $975 million and $1.025 billion. Analysts are expecting $925.9 million.

Meanwhile, adjusted EBITDA margin as a percentage of gross bookings hit a record high of 2.7% in the second quarter, the company said.

"Over the next few quarters, we will evaluate returning excess capital to shareholders as our cash flows ramp, and with any potential further monetization of our equity stakes over the long term," Uber added.

Sales in the company's freight brokerage segment slumped 30% from a year earlier, hurt by an tough economy in which shipping prices and volumes fell from highs during the pandemic.

"Uber Freight continued to be pressured by category-wide headwinds with industry spot rates seasonally weak - a trend we expect to continue in the near term," the CEO said.

Economic uncertainty and high levels of inflation have forced many to seek driving opportunities with Uber and rival Lyft to supplement their regular income. Drivers for Uber's ride-share segment grew by 33% from a year earlier.

The gradual return to working in offices across the United States has also helped boost demand for ride-hailing services.

Khosrowshahi said trips in the U.S. and Canada have returned to pre-pandemic levels when compared with the same period in 2019. Trips across Uber's markets during the quarter grew 22% to 2.3 billion, representing an average of 25 million trips per day.

Gross bookings, or the total dollar value from its services, is expected in the third quarter to be between $34 billion and $35 billion, compared with estimates of $34.13 billion.

Net profit was $394 million, or 18 cents per share, for the three months ended June 30, compared with a loss of $2.6 billion, or $1.33 per share, a year earlier.

The profit included a $386 million pre-tax benefit due to unrealized gains stemming from the revaluation of Uber's equity investments.

(Reporting by Akash Sriram in Bengaluru; Editing by Peter Henderson and Shounak Dasgupta)