The Fair Taxi Problem
Ali, Boone, and Chet are splitting a taxi cab home from the airport. The cab costs . Ali gets out after the first miles, Boone gets out after another , and Chet goes more for a total of miles. Each house is right on the way to the next without requiring any detours. How should the three fairly split the fare?
I sometimes pose this problem to my students. I'd like to share possible solutions and a bit about how I use it in the classroom.
This puzzle came from a course I took as part of BU's math ed curriculum. Versions with different numbers have been covered by Numbers Guy (at Wall Street Journal) and Mind your Decisions. I held off on reading their articles until after writing mine. See the end for a comparison.
Update: You can try these solution algorithms out for yourself here.
Solutions
What I love about this problem is how many reasonable answers there are. Here I'll present as many as I can think of, and I'll include an argument in favor and against each. I'm only including systematic solutions which adapt to changing numbers. My students choose numbers on vibes a lot, but I am a Dan of science! Pause here to have a think.
Equal
Students always suggest this first: .
- Pro: Intuitively, equal is fair (in simple cases).
- Pro: They all got home, didn't they? Isn't that equal utility?
- Con: People who went further pay the same as people who went less far.
- Con: If we change the distances to, say , Ali and Boone pay more than they would taking a cab alone.
Marginal
The other reason kids give for comes from "individual contribution" to the distance. Ali should pay her , then Boone only adds by joining, and Chet adds another . Each person pays for the amount they personally added to the cost, i.e. the marginal cost of their joining.
- Pro: The strategy adapts well to changing Chet's distance, since only he is affected.
- Pro: It's easy to implement. When someone gets out of the cab, they pay what's due so far and reset the meter.
- Con: In a case like , Boone and Chet go similar distances but Boone pays much more.
- Con: Ali gets no discount. This remains true no matter what distances we use.
- Con: If we imagine Chet was going to take the cab anyway, then he's "first." Ali and Boone each contribute a marginal cost of . In other words, this system is order-dependent.
Mean Marginal
I see order-dependence as the biggest problem with the marginal solution. So what if we compute the costs for every possible order of people and then we average these possibilities together? It turns out this gives the same values as the segmented solution detailed later, with the same pros and cons.
Equal Discount
Instead of paying equal amounts, why not have the riders save equal amounts? If they all rode separately, the rides would cost . Since the shared ride only costs , the riders can split the other of savings equally. Each person saves , so Ali pays , Boone pays , and Chet pays .
- Pro: The difference in cost between two riders is the same as it would be riding those distances in separate cabs.
- Pro: A flat dollar-amount discount is the intuitive way coupons often work.
- Con: Ali rides for free, which might bug some people.
- Con: With distances , the pooled cost is the same but the total savings is greater. As a result, Ali pays .
By Person-Miles
Instead of saving the same dollar amount, maybe the riders should share their discount proportionally to the distance they went. To fairly distribute the savings, let's just recalculate the cost of a person mile. They went person-miles at a total cost of , so each person-mile costs . A,B,C pay respectively.
- Pro: It's a discount, plain and simple. Cost is distributed proportionally to the distance each person traveled, and so is savings.
- Con: Cabs don't work that way. A taxi charges per mile the car travels with passengers in it irrespective of how many passengers it holds. That's where we originally got the total fare from, and it's unavoidably baked into the problem.
- Con: If Chet goes a lot further after Ali and Boone get out, it will reduce everybody's savings. Should Chet's decision really affect Ali and Boone after they're already out of the cab?
- Con: "Mister Dan, you did NOT tell us we were doing fractions."
Split Segments
It seems that only Chet should pay for the time he spends alone in the cab. All three passengers benefit from the first miles; only B and C benefit from the middle ; and only C benefits from the last miles. So maybe we should split each segment evenly. A,B,C each pay towards the first segment. Then B and C each pay for the next segment. Finally, C pays the full for the last segment. The contributions will be .
- Pro: Each 3-mile segment is paid as if it were its own trip, and everyone tends to agree on how those small trips would be paid.
- Pro: Nobody ever pays differently depending on what happens after they exit the cab.
- Con: The proportionality to distance traveled is way out of whack. Is a cab shared three ways really only a third as valuable as a cab you take alone? This system disregards the utility each person gets out of the ride. As a result, C pays times more than A while only traveling times the distance.
In the Classroom
This is a sort of "number talk," a teaching strategy pitched as increasing student engagement but which might have more hype than efficacy.
Stoking Debate
For me, what sets this problem apart is how many right answers there are — and how many wrong. Students can get heated in their opinions, and while they may win each other over, no answer will be compelling to everyone all the time.
I find this type of debate makes the mathematics real. Students use the numbers to make an argument. Buy-in, however, is not automatic. With some groups, I've found it helpful to multiply the numbers by 10 to make the problem weightier.
Students will usually have strong, diverse preferences for one solution or another. Usually, though, they can't articulate why they like the solutions they do. Or rather, they can't easily advocate for a given solution, but they can usually defend it. I encourage students to share what issues they see with peer solutions. In response, the proponents of a criticized solution either address the criticism or, less often, change their minds.
Systematizing
Once students have settled on their preferred solutions, I change the numbers. We try their solutions with different distances. The task demands that each student knows how they got their numbers and why that method is fair.
Rigorous generalization is a key part of mathematical reasoning. Too often, kids view math problems as discrete entities to be answered by numbers. Generalizing exposes the difference between and answer (the numbers) and a solution (the path to those numbers).
I originally heard the problem posed with as the distances. Some of the methods, including the segmented one, give thirds of a dollar (and thus thirds of a cent) with those numbers. I prefer because it scales the original to avoid fractional cents with all the common solutions.
When challenging my students to generalize, I pose the following sample values, all of which avoid fractional cents with every method I've listed:
Assumptions
Students frequently attend to parts of this problem that, in a typical math classroom context, aren't the point. Schoenfeld (1983) discusses classroom-specific assumptions, and Tate (2005) has an especially relevant example to our problem on page 480. He discusses a test item in which students had to choose between paying per bus ride or getting a weekly pass. The students disproportionately chose the "wrong" answer:
The district's test designers constructed the problem on the assumption that students who solved the problem correctly would choose to pay the daily fare. Implicit in the design of the test item is the notion that all people work five days a week. It is also assumed that the employee has only one job.
In our taxi problem, I often find students import notions which are relevant to fairness but not to the intention of a typical word problem. For one, teenagers in 2026 are more familiar with Uber and Lyft than with taxis. These services use a different, more opaque pricing model. Ride shares do care how many people are in a car, but your fare doesn't halve just because you shared with a stranger.
Students also always ask if Ali, Boone, and Chet are friends. I used to call them friends when I posed the problem, but now I wait for the kids to ask. Students rightly notice that the fairest way to split the ride depends on social dynamics. If the three riders are strangers, they seem to deserve more discount for sharing. If they're friends, paying per person-mile starts to make more sense. Or maybe their friendship suggests they have other joint ventures to pay for — I've had several students suggest Chet pays it all but Ali and Boone owe him lunch. And what if Boone is the only one with a job? Maybe he pays more because he can, or maybe he pays less because he's the only one whose family needed him to work.
Comparison
What did the other articles say?
Numbers Guy (2005)
Original article (paywalled) →
Right off the bat, the original problem uses as the distances. This gives fractional cents with the segmented method, but I can scale it up to if that really bothers my students.
The author, Carl Bialik, chooses the segmented method before consulting anyone else. He notes that this method lets you pay your part right when you get out. I never would have thought about that practicality because I'm writing in the age of Venmo. There go the differing assumptions again!
Then he speaks with economists, who propose various options. Read the whole article, really. One economist likes the person-miles proportional solution. One likes the equal-savings solution, with an adjustment to avoid negative costs.
And then there are the economist-minded solutions I didn't consider. One method, based on the Talmud, involves paying an amount you definitely owe and splitting the rest evenly. A friend recommended me this Mathologer video on the topic. The other economists use cooperative bargaining solutions from game theory, arguing from the possibility of bargaining coalitions. In this free-market view, a solution is only fair when no individual or pair of people can get a better deal by riding separately. Furthermore, each pair of riders must be mutually satisfied with their relative savings. The game theoretic methods end up closely related to the Talmudic one! But if I'm honest, my game theory chops aren't up to snuff to understand it all (yet). (Edit: I watched the whole video this time and mostly get it now. The original paper still goes over my head.)
The article goes on to consider social dynamics and individual preferences. There are some examples I covered and some I didn't. In all, I liked seeing how economists value bargaining power where I emphasized a utility-focused approach.
Mind Your Decisions (2011)
Original article (it's free!) →
The author, Presh Talwalkar, uses the same from the original. He begins by analyzing the solutions from the 2005 article with more of a focus on the math. I appreciated the analysis
Talwalkar then gets into his own method. He considers that if you go miles, that doesn't cost because cabs charge a flat rate before the per-mile fare. Pulling from Chicago fares at the time of writing, he accounts for the complex way the total cost would actually be calculated. The actual fare depends on time in the cab, the number of riders, the ages of those riders, and the distance traveled (in increments of mile). Talwalkar's solution rolls much of this into a flat cost per person, and he proceeds to split the rest with the person-miles proportional solution. It takes some finagling in the comments to iron out all the details. Nice extension!
Conclusion
So which answer is correct? According to my students: "Bro honestly at that point take separate cabs."
Remember to try the algorithms here.