ForHosting KIT · Math

Lottery jackpot probability

Work out your exact chance of hitting a lottery prize: in a 6-from-49 game, matching all six numbers is 1 in 13,983,816, and you can ask for lower tiers such as three or five matches too. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Balls
49
Drawn
6
Matches
6
You get
Total combinations
13983816
Favorable combinations
1
Probability
0.0000000715
Odds
1 in 13983816

This lottery jackpot calculator turns a ball pool, a draw size, and a matching rule into an exact winning probability and a 1-in-N odds figure. You enter how many balls exist, how many are drawn, and how many of those drawn numbers a ticket must match to take the jackpot or a named prize tier. The engine evaluates the hypergeometric identity used by 6-from-49, 5-from-69, and classroom lotto problems: favorable combinations divided by every possible draw of that size. There is no sampling, no network, and no clock: every valid triple yields the same probability and odds every time.

What a lottery jackpot probability actually counts

A standard lotto draw picks a set of distinct balls from a numbered pool and never puts a ball back. A ticket is another set of the same size. The jackpot matching rule is usually “hit every number that was drawn”; lower prize tiers use a smaller match count, such as three of six or five of six.

If the pool has balls numbered one through n, the draw takes r of them, and a prize requires exactly m matches, the number of winning tickets is the product of two binomial coefficients: ways to keep m of the r winning numbers, times ways to fill the remaining r minus m slots from the n minus r losers. The number of possible draws is n choose r. The winning probability is that favorable count divided by the total count, which is the hypergeometric term P of M equals m.

When m equals r the formula collapses to one over n choose r, the familiar jackpot figure printed on posters. Odds are reported as one in total over favorable when that ratio is an integer, or as a reduced favorable-in-total pair otherwise, so a six-from-forty-nine jackpot reads as one in thirteen million nine hundred eighty-three thousand eight hundred sixteen. Impossible match counts inside the legal range, for example asking for more outside numbers than the pool has left, yield probability zero and the odds string impossible rather than a crash.

This page does not price a jackpot, apply tax, or simulate thousands of random tickets. It is the exact combinatorial chance of meeting a stated matching rule on a single ticket, computed without replacement.

Where jackpot odds belong in study, design, and code

Teachers introduce lottery probability when they want a concrete hypergeometric example that students already recognize from posters and news headlines. A worksheet that asks for the chance of matching all six numbers in a forty-nine-ball game, or of matching exactly three, is the same contract this calculator implements: pool size, draw size, match count. Exam generators can pin the success path with forty-nine balls, six drawn, and six matches, and the rejection path with any draw that exceeds the pool, which must fail rather than invent a combination count.

Game designers scan match counts from zero through drawn for a fixed pool to see how steeply a prize ladder should pay, without writing their own factorial helpers. Journalists convert a marketing slogan into an explicit one-in-N figure before publishing an explainer. Pair this landing with a generic combinations counter when you only need n choose r, and with independent-trial binomial tools when tickets are modeled with replacement rather than a single draw without replacement.

Homework and exam keys

Look up the exact jackpot probability and 1-in-N odds for textbook n-from-r lotto problems, including partial match tiers.

Prize-ladder sketches

Scan match counts for a fixed ball pool and draw size to see how steeply winning probability falls as the jackpot rule tightens.

What does the lottery jackpot calculator cost?

It is free in your browser on this page.

How is the winning probability computed?

P = C(drawn, matches) × C(balls − drawn, drawn − matches) / C(balls, drawn). When matches equals drawn this is the jackpot 1 / C(balls, drawn).

What happens if balls drawn exceed the ball count?

You cannot draw more balls than exist in the pool; drawn must be less than or equal to balls.

What do the odds field and combination counts mean?

odds is a 1-in-N string when the ratio is an integer, or a favorable-in-total pair otherwise. Combination counts are exact decimal strings.

Is this a jackpot payout or expected-value calculator?

No. It returns combinatorial winning probability and odds only. It does not model prize amounts, taxes, ticket cost, or expected money.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/stat/lottery

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/stat/lottery \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"balls":49,"drawn":6,"matches":6}'
{
  "balls": 49,
  "drawn": 6,
  "matches": 6
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.lottery",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_n10000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

When the number of balls drawn exceeds the ball count the request fails with invalid_input, because no such draw exists.

How to send balls, drawn, and matches, and how errors work

Missing fields, fractions, non-numeric strings, values outside the published range, and a match count larger than drawn are rejected the same way. POST a JSON body with three required integers. Field balls is the size of the numbered pool and must be a whole number from one through ten thousand; aliases n, ball_count, pool, and total are accepted. Field drawn is how many balls come out of the machine and sit on each ticket, from one through balls; aliases r, draw, picks, and balls_drawn map to the same value. Field matches is the matching rule: how many of those drawn numbers the ticket must hit for this prize, from zero through drawn; aliases m, match, hits, and match_count are accepted. A successful response echoes the three integers, returns total_combinations and favorable_combinations as decimal strings so huge jackpots stay exact, returns probability as a unit-interval number, returns odds as a one-in-N or impossible string, and includes formula as the hypergeometric identity. When the ratio is an integer the optional odds_against field is the conventional (1 minus p) over p count. The hard product rule is that balls drawn must not exceed the ball count: drawn greater than balls is rejected with invalid_input and is never billed. Pricing is a flat $0.002 per successful request with unit item. Use the endpoint from graders, explainers, and prize-ladder tools that need a reproducible jackpot probability without embedding binomial tables by hand.

Where jackpot odds belong in study, design, and code

Keep the pool at most ten thousand so the worst-case binomial still finishes quickly in a Worker isolate and in the browser, which is far beyond any live national lottery. Failed tasks that return invalid_input do not consume prepaid balance, so exploratory scripts stay cheap when someone types a draw larger than the pool.

Deterministic test fixtures

Generate reproducible probability, combination counts, and odds strings for unit tests without hand-rolled binomial coefficients.

Read the full KIT documentation →