american-decimal-conversion draft
Bidirectional conversion between American odds and decimal odds
- Tags
- odds conversion fundamentals
- Vocabulary
- american_odds
- Sportsbook-style odds; positive (e.g. +150) means win $150 on $100 stake, negative (e.g. -120) means stake $120 to win $100. Mimir's canonical even-money form is -100.
- decimal_odds
- Total payout (stake + winnings) per $1 stake; e.g. 2.50 means $2.50 returned for every $1 bet.
- even_money
- A bet whose payout equals its stake — win $1 on $1 wagered, with implied probability 50%. Decimal 2.00; American +100 or -100 (Mimir uses -100 as canonical).
American and decimal are two notations for the same underlying probability claim. American is sportsbook-native in the US; decimal is sportsbook-native in Europe and the UK and is the easier format for arithmetic. Converting between them is a deterministic, lossless transform.
Worked example
American +150 → decimal: 1 + (150 / 100) = 2.50. American −120 → decimal: 1 + (100 / 120) ≈ 1.833. Decimal 2.50 → American: positive branch since decimal ≥ 2.0 → (2.50 − 1) × 100 = +150. Decimal 1.833 → American: negative branch since decimal < 2.0 → −100 / (1.833 − 1) ≈ −120.
Gotchas
- The positive/negative split happens at decimal 2.00 (American ±100 / "even money"). Any conversion code must branch on this; a single formula won't cover both directions cleanly.
- American odds of exactly +100 and −100 represent the same probability (50%) and are mathematically interchangeable. Mimir's canonical form is −100. Code reading from Mimir's wisdom can normalize to either; readers comparing values across systems should normalize to −100 for consistency.
- Decimal odds of exactly 1.00 are degenerate — implies certainty, which means the line is unbettable. Don't crash, but don't try to convert to American either.
Open questions
- Kairos handles degenerate inputs explicitly:
decimal_odds_from_american(0)returnsNone, andamerican_from_decimal(decimal ≤ 1.0)returnsNone. Confirm consumers should likewise return a sentinel rather than raise.