Bryan Byrne

February 16, 2023

Betting odds formats and open sourcing "oddx"

TL;DR: I was unfamiliar with American "Moneyline" odds formatting and open sourced oddx to simplify switching between formats (e.g. +300 » 3/1).

Until recently I was unfamiliar with American "Moneyline" sporting odds (e.g. +300). Having grown up in Ireland I'm much more familiar with "fractional" presentation of odds (e.g. 3/1 aka "3 to 1").

As an avid sports fan the rise of sports betting in the United States has caught my attention, following legalization in many states (in 2018 the Supreme Court overturned the federal ban on sports betting). By some estimates roughly 20% of the population bet on the Super Bowl last week.

Unfortunately not all sports betting apps support fractional display of odds and this caused me to learn about odds formatting. Ironically my first exposure to an American talking about gambling odds was likely Harry Connick Jr. in the movie Memphis Belle––he used fractional odds :)

Screenshot 2023-02-16 at 5.06.51 PM.png


There are four common formats:

  1. Moneyline (aka "American"), represented in the form +200 / -200 etc. "The odds for favorites are accompanied by a minus (-) sign and indicate the amount you need to stake to win $100. On the other hand, the odds for the underdogs are accompanied by a positive (+) sign and indicate the amount won for every $100 staked." - source
  2. Decimal, represented as any decimal number. "The decimal odds number represents the amount one wins for every $1 wagered. For decimal odds, the number represents the total payout rather than the profit. In other words, your stake is already included in the decimal number" - source
  3. Fractional, represented in the form 3/1, 2/5 etc. "A fractional listing of 6/1 (six-to-one) odds would mean that you win $6 against every $1 you wager and receive your dollar back (i.e., the amount you wagered)." - source
  4. Implied Probability, a percentage representation. For example, an implied probability of 25% is represented as +300 moneyline, 3/1 fractional, 4 decimal.

These learnings sparked me to create oddx, an open source library (written in Ruby), to make it easy to convert odds between formats. Example usage and output follows:

require "oddx"

class OddxExample
  def self.convert(odds)
    converter = Oddx.parse(odds)

    puts "Fractional: #{converter.fractional}"
    puts "Decimal: #{converter.decimal}"
    puts "Implied Probability: #{converter.probability}"
    puts "Moneyline: #{converter.moneyline}"
  end
end

> OddxExample.convert("11/1")
Fractional: 11/1
Decimal: 12                                                  
Implied Probability: 8.3%                                    
Moneyline: +1100