Probability Calculator Formula

Understand the math behind the probability calculator. Each variable explained with a worked example.

Formulas Used

Probability

probability = favorable / total

Probability Pct

probability_pct = (favorable / total) * 100

Odds For

odds_for = favorable / (total - favorable)

Odds Against

odds_against = (total - favorable) / favorable

Variables

VariableDescriptionDefault
favorableFavorable Outcomes3
totalTotal Outcomes10

How It Works

How to Calculate Probability

Formula

P(event) = Favorable Outcomes / Total Outcomes

Probability ranges from 0 (impossible) to 1 (certain).

Odds

  • Odds in favor = favorable / unfavorable
  • Odds against = unfavorable / favorable
  • Worked Example

    A bag has 10 marbles: 3 red, 7 blue. What is the probability of drawing a red marble?

    favorable = 3total = 10
    1. 01P(red) = 3 / 10 = 0.3
    2. 02As a percentage: 30%
    3. 03Odds in favor: 3 / 7 ≈ 0.4286
    4. 04Odds against: 7 / 3 ≈ 2.3333

    Ready to run the numbers?

    Open Probability Calculator