It's taken 14 years and nearly $32 billion of cumulative losses, but ride-sharing and food delivery company Uber (UBER -2.39%) is finally a profitable company.

Uber reported a net income of $394 million in the second quarter. That number includes a $386 million unrealized gain from equity investments, so it's not quite as good as it looks. But still, reporting a GAAP profit is an achievement for a company that has been a chronic money loser for so long.

Finally making it work

I've had my doubts that any company could make ride-sharing and food delivery work as a sustainable business. Indeed, Uber's competitors are still struggling. Lyft, Uber's rival in the ride-sharing market, posted a net loss of $188 million of $1 billion of revenue in the first quarter. DoorDash, the restaurant delivery leader in the U.S., lost $162 million on $2 billion of revenue in the first quarter.

Uber has been profitable according to other metrics for a while, but none of those carry the same weight. Uber has been producing positive adjusted EBITDA, or earnings before interest, taxes, depreciation, and amortization, for some time, and it turned free cash flow positive last year. In the second quarter, Uber generated $916 million of adjusted EBITDA and $1.1 billion of free cash flow.

Both metrics have flaws as profitability measures. Adjusted EBITDA excludes a variety of real costs, most notably depreciation and amortization, which totaled $208 million in the second quarter, and stock-based compensation, which totaled $504 million. Free cash flow is a better metric, but it still backs out stock-based compensation, and swings in working capital can push it up or down.

GAAP net income is far from a perfect metric, but when a company is producing positive net income and positive free cash flow, there's no longer any question that the company is profitable.

Solid growth

Uber's rising profits were the result of solid growth in bookings and increased take rates across ride-sharing and delivery. Gross bookings jumped 28% year over year for the mobility segment and 14% for the delivery segment, while revenue from those segments rose 40% and 17%, respectively. The mobility take rate surged 2.7 percentage points to 29.3%, while the delivery take rate edged up 0.2 percentage points to 19.6%.

Both segments also became more profitable on an adjusted EBITDA basis. The mobility segment enjoyed a 52% bump in this metric, while the delivery segment saw a 232% surge. The freight segment was a weak spot, with revenue plunging 30% year over year and adjusted EBITDA falling into negative territory. The freight industry is going through a downturn, and there's little Uber can do but wait it out.

Is Uber stock a buy?

While Uber is now a profitable company with the potential to grow those profits over time, the stock remains expensive. Analysts are expecting the company to produce earnings per share of $0.83 in 2024, putting the price-to-earnings ratio at about 60 based on that estimate. The price-to-free-cash-flow ratio looks better. If you take Uber's free cash flow through the first six months of 2023 and extrapolate, the P/FCF ratio sits at about 30.

An argument can be made that this valuation is reasonable given Uber's growth potential. While revenue in the U.S. and Canada barely budged in the second quarter, the company is growing quickly in international markets. Latin America revenue surged 30%; Europe, Middle East, and Africa revenue rose 31%; and Asia Pacific revenue rose 31%. Uber's total addressable market is likely big enough that the company could grow at a double-digit rate for many years.

Still, there are risks, most notably the issue of how Uber classifies its drivers in the United States. Uber's business model hinges on treating its drivers as contractors instead of employees. The company has been fighting legal battles in California, and it's unclear how all of this will shake out in the long run. If Uber is eventually forced to treat drivers as employees, it could be a catastrophic blow to its business model.

Uber stock looks like a high-risk, high-reward investment. It will be appealing to some, but there are far safer options available.