What this calculator does
This tool applies to Japan, where taxi fares are shown in Japanese yen and shared-ride splits are conventionally rounded up to the nearest 10-yen unit. When several people share one taxi and are dropped off one after another (nearest destination first), the metered fare keeps climbing. It would be unfair to split the whole fare equally, because people who got out early did not ride the later, longer part of the journey. This calculator splits the fare per leg: each segment between two drop-offs is paid only by the people still in the cab during that segment.
How to use it
Enter the number of passengers (N) and the cumulative meter reading at each drop-off, lowest first, separated by commas. The first value is the meter total when the first person leaves; the last value is the final total fare. For example, with three riders you might enter 800,1500,2400.
The formula explained
Let \(m_0 = 0\) and \(m_k\) be the meter total at the k-th drop-off. The fare for leg \(k\) is \(f_k = m_k - m_{k-1}\). During that leg, \(N - k + 1\) people are still riding, so each pays \(\lceil f_k / (10 \times \text{riders}) \rceil \times 10\) - the leg fare divided by the riders, rounded up to the nearest 10 yen. The general share formula is:
$$\begin{gathered} \text{Share}_j = \sum_{k=1}^{j} 10\left\lceil \frac{m_k - m_{k-1}}{\,N - k + 1\,} \right\rceil \\[1.5em] \text{where}\quad \left\{ \begin{aligned} m_k &= \text{Meter at drop-off } k \text{ (yen)} \\ m_0 &= 0 \\ \text{leg } k &= m_k - m_{k-1} \text{ split among } N-k+1 \text{ riders} \end{aligned} \right. \end{gathered}$$Because of rounding the totals can slightly overshoot, so the last passenger absorbs the remainder: their payment is set to the total fare minus everyone else's rounded shares, guaranteeing the sum equals the metered fare.
Worked example
Three riders, meter readings 800, 1500, 2400. Leg 1 (3 riders): \(800/3 = 266.67\), rounded up to 270 each. Leg 2 (2 riders): \(700/2 = 350\) each. Leg 3 (1 rider): 900. Provisional totals:
$$P_1 = 270, \quad P_2 = 620, \quad P_3 = 1520 \quad (\text{sum } 2410)$$The last person absorbs the 10-yen overshoot:
$$P_3 = 2400 - (270 + 620) = 1510$$Final: P1 pays 270, P2 pays 620, P3 pays 1510, total 2400.
FAQ
Who pays the most? Usually the person dropped off last, since they ride every leg and also absorb the rounding remainder.
Why round up to 10 yen? Japanese cash and shared-fare etiquette use 10-yen units; rounding up avoids fractional yen and is the common convention.
Is this always perfectly fair? It assumes drop-offs happen nearest-first. If a detour makes an earlier stop costlier, middle passengers can be slightly overcharged - an inherent caveat of equal-per-leg splitting.