SAN FRANCISCO — Lyft had warned this year that it would lose record amounts of money as it expanded its business.

But on Wednesday, the ride-hailing company walked that prediction back.

With its number of ride-hailing passengers growing and its trip commissions also increasing, Lyft said its revenue for the year would be better than it had expected, rising to a range of $3.47 billion to $3.5 billion. That growth would also help crimp its losses, Lyft said, with its expected adjusted losses totaling around $875 million for the year instead of a previous projection of $1.17 billion.

“We anticipate 2019 losses to be better than previously expected, and we are pleased to have updated our outlook,” Logan Green, a co-founder and the chief executive of Lyft, said in a statement.

Yet the improved prospects do not mean that Lyft was close to making a profit. It lost $644.2 million in the second quarter, Lyft said, far more than the $178.9 million it lost a year earlier. A large chunk of that loss — about $296.6 million — was due to expenses related to the stock compensation that Lyft pays its employees. Revenue rose 72 percent from a year earlier, to $867.3 million.