Photo: Eric Risberg / Associated Press Photo: Santiago Mejia / The Chronicle Photo: Damian Dovarganes / Associated Press Photo: James Tensuan / Special To The Chronicle 2016 Photo: Eric Risberg / Associated Press Photo: Michael Macor / Special To The Chronicle Photo: Michael Macor / Special To The Chronicle

Most Uber and Lyft passengers have no idea how much of their fare goes to their drivers, but after a ride is finished, their drivers can see exactly how much — or little — of the fare they keep. That helps explain why Uber drivers took to the street this week in advance of Uber’s blockbuster public offering Friday.

The companies’ take is not a fixed percentage of the fare. They charge passengers an up-front fare based on the trip’s estimated length and duration, plus any surge pricing that may be in effect, minus any promotional discounts. Unlike taxi fares, which are regulated and pretty transparent, Uber and Lyft can charge riders whatever they think the market will bear at any place and moment in time.

They pay drivers based on actual time and distance, plus a cut of any surge pricing and incentives that might be in effect. Drivers get 100% of tips passengers may pass along.

The difference between the passenger fare and the driver fare is the company’s take, and it’s made up of two parts: a flat fee that varies by market (it’s typically $2.20 per ride in the Bay Area) and a variable fee that is all over the map.

If you include both fees, Uber’s share of the fare averaged almost 30%, according to an unscientific sample of two dozen trip breakdowns I got from five Bay Area Uber drivers this week. (I excluded tolls, airport fees and tips from the calculation.) One was negative, which means Uber lost money on the ride. The rest ranged from 19% to 45%. Driver Jin Lan said he’s seen Uber or Lyft take as much as 60% of the fare.

That’s higher than what the two firms reported in their prospectuses. Uber said its ride-hailing “take rate,” a complicated formula that essentially reflects its share of passenger fares, was 21% last year, “varying from 12% to 24% by region.” Lyft said its take rate, which it calls “revenue as a percentage of bookings,” was 26.8% last year, but that included revenues from things like electric scooters and bike rentals, in addition to car trips.

Photo: Todd Trumbull

Lyft said in its earnings call Tuesday that it would no longer report gross bookings or take rates, which contributed to a nearly 11% drop in its stock price Wednesday, said Dan Ives, an analyst with Wedbush Securities. Lyft shares recovered somewhat Thursday, rising 4.3%.

As independent contractors, drivers must pay from their cut of the fare all expenses including gasoline, maintenance, depreciation on their cars and self-employment tax.

Neither Uber nor Lyft would comment for this story, but on its website, Uber illustrates how it sets rider fares and driver pay.

“Uber’s service fee is the difference between what the rider pays and what the driver earns. It can vary from trip to trip, and it helps fund our platform’s operations, driver promotions and supports innovation that enables us to serve more riders and drivers,” it says.

It’s that variability, and unpredictability, that perplexes some drivers.

On a Facebook page for Bay Area Uber and Lyft drivers, a driver named Mikhail posted a screenshot of a trip this month that started during the morning rush hour in San Francisco and ended in Palo Alto. The rider paid $109.21, the driver got $68.45 and Uber got $40.76, or 37% of the fare, said Mikhail, who did not want his last name used out of fear of reprisal from Uber.

On the same trip, with the same rider, a couple of months earlier, he made about $15 more, but couldn’t find out why, even after visiting an Uber service center in San Francisco. “They did not understand why, either,” he said.

Harry Campbell, founder of the Rideshare Guy blog for drivers, said many are reluctant to be identified for fear of being deactivated, or kicked off the app.

“Uber’s deactivation process is very opaque. I don’t think they’d ever fire a driver over something they read. But a driver can be deactivated for anything; there is no formal appeal process,” he said.

Campbell solicits trip details from readers and said the most he’s ever seen Uber or Lyft take from a passenger fare is 70%, which is unusual. The companies’ take can vary widely, he said, because the fare passengers pay is based on the company’s estimate of the trip. Driver pay is based on actual time and distance. If the company’s algorithm miscalculates the trip, its cut could be more or less than intended. But, he said, “I’ve never understood how it could be off (by 70%) and why Uber and Lyft don’t cap their commissions.”

On the flip side, the companies can sometimes lose money on a ride. Drivers say this is most common on shared rides, where the driver picks up unrelated passengers at multiple locations.

“If they think it’s a $10 ride and there is a 50% chance” of matching the rider with another passenger, “they may charge (the first passenger) $5,” Campbell said. If the second passenger doesn’t materialize, the company’s variable fee could be negative after paying the driver a minimum guaranteed rate.

On a recent UberPool trip, driver Annette Rivero picked up two separate riders in the South Bay who paid a total of $14.35, including a 50 cent tip. Uber charged a $2.20 flat fee for each passenger, but its variable “service” fee was negative $9.12. Rivero said the ride probably took longer than Uber expected because she had to use city streets rather than the freeway to pick up the second rider.

Uber says it loses money on some rides on purpose. Here’s a passage from its prospectus: “In certain markets, other operators may use incentives to attempt to mitigate the advantages of our more liquid network, and we will generally choose to match these incentives, even if it results in a negative margin, to compete effectively and grow our business.”

Kathleen Pender is a San Francisco Chronicle columnist. Email: kpender@sfchronicle.com Twitter: @kathpender