Calculate the number of permutations (order matters) and combinations (order doesn't matter) when choosing r items from n total items.
Calculate the probability of rolling a specific sum with multiple standard six-sided dice. See the full probability distribution chart below.
Calculate the binomial probability of getting exactly k heads (or tails) in n fair coin flips. Also shows the probability of getting at least k heads.
Calculate lottery odds using the hypergeometric distribution. Find the probability of matching exactly m numbers when k numbers are drawn from a pool of n total numbers.
Four exact probability calculators in one place
The tabs above cover the questions that come up most in statistics homework, board games and lottery conversations: how many ways a selection can be ordered or grouped, how likely a particular total is when rolling several dice, how likely a given number of heads is in a run of coin flips, and what the odds are of matching some or all numbers in a lottery draw. Every tab shows the answer in a result box and repeats the formula with the intermediate numbers underneath, so you can check the working or copy it into your own notes.
How to use it
- Choose a tab: Permutation & Combination, Dice Probability, Coin Flip or Lottery Odds.
- Fill in the fields. The small hint under each one gives the accepted range, for example n from 0 to 170, 1 to 10 dice, or 1 to 1,000 flips.
- Press Calculate, or click one of the example chips (such as “2d6 sum=7” or “Lotto 6/49 (3 match)”) to fill in the fields and calculate in one step.
- On the dice tab, read the bar chart below the result: each bar is one possible total and the one you asked about is highlighted in yellow. Hover a bar to see its exact number of ways.
The maths used on each tab
Permutations and combinations. P(n,r) = n!/(n−r)! counts ordered arrangements and C(n,r) = n!/(r!(n−r)!) counts unordered selections. Both are computed with exact whole-number (BigInt) arithmetic, so even very long results such as C(170,85) are printed digit for digit rather than rounded.
Dice. The distribution of the total of N six-sided dice is built by adding one die at a time and counting how many of the 6N equally likely outcomes give each sum. The probability is simply favourable outcomes divided by 6N. With two dice, a total of 7 can happen 6 ways out of 36 (16.6667%); with three dice, a total of 10 happens 27 ways out of 216 (12.5%). The tab also reports P(sum ≥ target) and P(sum ≤ target).
Coin flips. The number of heads in n fair flips follows the binomial distribution with p = 0.5: P(X = k) = C(n,k) × 0.5n. Each term is computed in log space so that 1,000 flips do not overflow, and the “at least” and “at most” figures add up the individual terms. The mean n/2, variance n/4 and standard deviation are shown too.
Lottery. Matching m of the k numbers drawn from a pool of n uses the hypergeometric distribution, P = C(k,m) × C(n−k, k−m) / C(n,k), which assumes your ticket has the same count of numbers as the draw. For a 6/49 game the jackpot probability is 1 in 13,983,816, and matching exactly 3 numbers is about 1.765%, roughly 1 in 57. The tab lists the chance of every possible match count.
Percentages above 1% are shown to four decimals, smaller ones to six decimals, and anything under 0.01% in scientific notation. All calculations run in your browser; nothing is stored or uploaded.
Frequently asked questions
Are these results exact, or simulated?
They are exact counts and closed-form formulas, not random simulations. The only rounding happens when a final ratio is turned into a decimal or percentage.
Does the lottery tab handle a bonus ball such as a Powerball or Mega Ball?
No. It models a single pool. If a game also draws one bonus ball from a separate pool, multiply the “1 in” figure for the main numbers by the size of that bonus pool to get the combined odds. That is why the example chip is labelled 5 of 70 rather than after any particular game.
Why is 50 heads in 100 flips only about 8% likely?
Exactly 50 is the single most likely outcome, but the probability is spread over many nearby results such as 48, 49, 51 and 52. The calculator gives P(X = 50) ≈ 7.96% for 100 flips; the “at least” and “at most” rows show how the rest is distributed.
Can I use dice with other numbers of sides?
Not on this page. The dice tab assumes standard fair six-sided dice, so totals run from N to 6N. Loaded dice and d4/d8/d20 are not modelled.
Why does 0! equal 1?
It is the convention that keeps the counting formulas consistent: there is exactly one way to choose nothing, so C(n,0) = 1, and exactly one way to choose everything, so C(n,n) = 1.