# Basic Lottery Math

Most people who play the lottery know the odds against winning the jackpot are astronomically high; to invoke the popular adage that the lottery is a tax on stupidity may be a little harsh, as all lotteries are required to disclose their odds. But do people know just how bad the odds are?

What some avid lottery players also may not know is how to calculate those odds. How does the lottery arrive at their figures for the probability of winning the jackpot, or the overall odds of winning any prize? The answer depends on the structure of the lottery, how many numbers you have to choose, and the size of the field from which you choose those numbers. This tutorial shows you how to calculate the odds of winning the jackpot with a perfect match. To learn the more complicated math behind the probabilities of making partial matches, see the follow-up article Advanced Lottery Math.

## Single-Matrix Lottery

In a basic single-matrix lotto game, you choose N distinct numbers from 1 to P on your ticket, and during the official lottery drawing they randomly select N distinct numbers from 1 to P. There are no bonus numbers, powerballs, mega balls, etc. The order in which the numbers are drawn does not matter. If your selection exactly matches the numbers drawn by the lottery, you win the jackpot -- or your fair share of it in the case of multiple winners.

The total number of different lottery ticket combinations is the number of ways to choose N distinct objects from a set of P distinct objects where order does not matter. This is written in mathematical notation as "(P choose N)" or "(P c N)." The formula is

P! / [ N! * (P-N)! ]

= [P*(P-1)*(P-2)*...*(P-N+1)] / [N*(N-1)*(N-2)*...*1]

which always works out to be an integer despite the division in the expression. You can also work it out intuitively by considering that there are P ways to choose the first number, P-1 ways to choose the second number, P-2 ways to choose the third number, etc. These numbers are then multiplied to give the total number of ways to choose N objects from a set of P objects where order does matter, i.e., the number of permutations. To get the number of combinations (where order is disregarded) you must also divide this product by N! = N*(N-1)*(N-2)*...*1, which is the number of ways to order N objects.

The probability of winning the jackpot is 1 over the total number of possible different lottery tickets, since there is only one way you can make an exact match. In other words, the probability is the the reciprocal of the number of combinations:

1/ ( P! / [ N! * (P-N)! ] )

= N! * (P-N)! / P!

## Examples of Single-Matrix Lottery Probabilities

Consider a game in which you simply choose 6 distinct numbers from 1 to 49. The total number of different lottery ticket number combinations is

49! / (6! * 43!)

= 49*48*47*46*45*44/(6*5*4*3*2*1)

= 13,983,816

Therefore, the probability of winning the jackpot is 1/13983816 = 0.000000071511, or 0.0000071511%. Lotteries with this structure include Ohio Classic Lotto and New Jersey Pick-6.

## See Also...

**Lottery Jackpot Odds Calculator:** Mathematical tool for calculating the probability of any lotto. Just enter the parameters of the game.

**Lottery Odds Formula:** Condensed guide to calculating the probabilities and odds of perfect and partial matches.

Now consider a new game in which you pick 5 distinct numbers from 1 to 72. You have one fewer number to match in this scenario compared to the previous example, but the field of numbers from which they are drawn is now much larger. Will the probability of winning the grand prize be higher or lower than in the previous example? We can find out by computing the total number of possible ticket combinations the same way as before.

72! / (5! * 67!)

= 72*71*70*69*68/(5*4*3*2*1)

= 13,991,544

Therefore the probability is 1/13991544 = 0.000000071472, or 0.0000071472%. As you can see, these two lotteries offer roughly the same chances of winning even though they have markedly different structures.

## Double-Matrix Lottery

In a double-matrix lottery, you select some distinct numbers from one set, and then independently select one or more distinct numbers from a different set. Again, order does not matter. Some numbers in your first subset may match numbers in your second subset. Lotteries with this structure include Powerball, Mega Millions, and Hot Lotto.

Since the lottery structure is choosing N distinct numbers from 1 to P, and then choosing M distinct numbers from 1 to Q, the total number of different lottery ticket combinations is the product "P choose N" times "Q choose M." As a mathematical formula this is

[P! / (N! * (P-N)!)] * [Q! / (M! * (Q-M)!)]

In most lotteries with a a double-matrix structure, M = 1, that is, you just select one number from a second independent set. If you replace M = 1 in the formula above you get the total number of lottery ticket combos as

Q * P! / [N! * (P-N)!]

You simply multiply the single-matrix expression by a factor of Q, because each selection of N-out-of-P can be matched with Q different bonus balls. The probability of winning the jackpot in a lottery with this structure is the reciprocal expression

N! * (P-N)! / [Q * P!]

## Examples of Double-Matrix Lottery Probabilities

In the current format of the Powerball lottery, you choose 5 distinct numbers from 1 to 59, and then 1 "powerball" number from 1 to 35. The total number of possible lottery selections is

35 * (59 c 5)

= 35 * 59! / (5! * 54!)

= 35*59*58*57*56*55/(5*4*3*2*1)

= 175,223,510

And the probability is 1/175223510 = 0.000000005707 or 0.0000005707%

In the EuroMillions lottery, players choose 5 distinct numbers from 1 to 50 (main numbers), and then 2 distinct numbers from 1 to 11 (lucky stars). The number of possible combinations is

(50 c 5)*(11 c 2)

= [50! / (5! * 45!)] * [11! / (2! * 9!)]

= [50*49*48*47*46/(5*4*3*2*1)] * [11*10/(2*1)]

= 2118760 * 55

= 116,531,800

Therefore the probability of winning the jackpot is 1/116531800 = 0.0000000085813, or 0.000000085813%.

## Comments

I believe the epithet of "tax on stupidity" is apt if you consider that the lottery is one of the worst bets you can make. Sports betting is less risky. You could teach yourself to be a better poker player and make money, but you can't teach yourself the be a better lottery player.

Wow! With these probabilities I'm surprised anyone wins lotto haha.

Thanks, this is very helpful resource. I'm trying to figure out this problem. There is a lottery where you pick 5 different numbers from 1 to X and the probability of winning is about 1 in 11 million. What is that number X?