EarningResult.kt / ItineraryImpl.kt in the real repo. The fare-brand to SQC multiplier table, the per-partner-airline distance tables, and the elite bonus math are the real rules, not a guess. Airport & route distances still load live from cowtool's public CSVs in your browser.
● loading live distance + country data…
Fare brand codes
How this is calculated
AC-operated flights (or codeshares under AC's own codes) always earn on the dollar + fare-brand method: TG=2× SQC, FL/CO/LT=4× if ticketed 014 else 2×, PL/PF/EL/EF=4×, BA/GT=0×. Fare fare-class letter is used as a fallback when no brand code is given (J/C/D/Z/P/O/E/A→4×, Y/B/M/U/H/Q/V→4× if 014 else 2×, S/T/L/K/G→2×).
Points = eligible dollars × (1 + elite bonus multiplier), where the bonus multiplier is an integer, not a percentage: None=0, 25K=1, 35K=2, 50K=3, 75K=4, SE=5. So an SE member earns 6× points per dollar on AC-operated flights.
Fare is split across segments by distance, not evenly. Each segment's eligible dollars = its share of total distance × total fare, rounded up. This only works if every segment in the itinerary has a known distance.
Partner-ticketed, partner-operated flights (ticket not 014) earn Points from a % of distance flown, using that specific airline's own fare-class table, and SQC = points ÷ 5. AC-ticketed (014), partner-operated flights still use the dollar+brand method above. Non–Star Alliance partners never earn SQC.
LQM (lifetime miles) only accrue on AC-metal flights, at 1×/1.25×/1.5× distance depending on cabin, with a 250-mile floor once you hold any elite status.