Give it the chance of a single try, written the way you already say it out loud as 1 in 6, 17% or 0.17, then set how many tries you get. You get the odds of at least one hit, of none at all, of exactly k hits, plus the number of tries needed to pass a 50, 90 or 99 percent chance.
At this per-try chance.
| Target | Tries |
|---|
Exact integer values for your current n and k, worked out with big integers rather than floating point.
Ask someone the odds of rolling at least one six in four rolls and most people add: four rolls, one in six each, so four in six. Around 67 percent. Follow the same logic to seven rolls and you get more than 100 percent, which is where the method falls apart. Probabilities of separate tries do not add. Two coin flips do not guarantee heads.
Count the misses instead. One roll misses five times in six. Four rolls all miss with probability (5/6)4, which works out to 0.4823. Anything other than four misses is at least one six, so the answer is 1 minus 0.4823, or 51.775 percent. Barely better than a coin flip, not the two thirds people expect. The whole panel above runs on that one subtraction:
P(at least one) = 1 - (1 - p)n
When the number of tries matches the denominator of a 1 in N chance, the answer settles close to 63.2 percent every time:
| Chance per try | Tries | At least one |
|---|---|---|
| 1 in 10 | 10 | 65.132% |
| 1 in 100 | 100 | 63.397% |
| 1 in 1,000 | 1,000 | 63.231% |
| 1 in 100,000 | 100,000 | 63.212% |
Keep the number handy as a sanity check. A 1 in 200 event over 200 attempts sits near two in three, nowhere near certain. Pushing the same event to a 99 percent chance takes 918 attempts, and the table on the right of the panel prints that figure for whatever chance you enter.
The six tiles answer different questions, and mixing them up is the second most common mistake after adding probabilities.
An expected value above 1 is no guarantee. Three tries at 40 percent gives 1.2 expected hits, and yet 21.6 percent of runs end with nothing at all. Averages describe a pile of runs, never the one in front of you.
The chart shades every bar past your k in a lighter tone, so the at-least-k total is the shaded block plus the bar you selected. On wide inputs the chart shows a 41-bar window centred on the average rather than every count from 0 to n, since a chart of 100,000 bars tells you nothing.
Write 1 - Math.pow(1 - p, n) in a spreadsheet and it works fine at 1 in 6. Take p down to 1 in 10 million and the digits fall apart. A 64-bit float stores 1 - p as 0.9999999000000000, dropping the tail of the number you subtracted, and the final subtraction of two numbers close to 1 throws away most of the remaining precision. The answer comes back with three or four believable digits at best.
This page never forms 1 - p in floating point. It computes the log first and exponentiates once:
exp(n × log1p(-p)), where log1p is built to keep precision near zero.-expm1(n × log1p(-p)), which computes the subtraction from 1 in one accurate step.Load the lottery example to see the difference. A 1 in 13,983,816 jackpot across 100 tickets returns 7.1512 × 10-6 here, with digits you may check against an exact calculation. Reaching an even 50 percent chance takes 9,692,842 tickets, roughly one ticket for every 1.4 people in London.
Every number on this page assumes two things: tries do not influence each other, and p stays fixed from the first try to the last. Break either one and the results turn optimistic, usually in the direction that flatters your plan.
Tries are capped at 100,000, which keeps every readout instant. Exact integer output for C(n, k) and P(n, k) switches to scientific notation past 21 digits and past n of 1,200, since a 3,000-digit integer is not something you read off a screen. Conditional probability and Bayes theorem answer a different question, namely how learning one fact shifts the odds of another, and neither is modelled here. Continuous quantities such as heights or wait times need the normal distribution calculator, counts of rare events over a stretch of time fit the Poisson calculator, and anything with rules too tangled to write as a formula belongs in the Monte Carlo simulator.
How the inputs are read, what the readouts mean, and where the model stops applying.
Six forms work: 1 in 6, the fraction 1/6, a percentage such as 17%, a decimal such as 0.17, odds written 1 to 5 or 1:5, and a bare number above 1 such as 25, which is read as 25 percent. The line under the field repeats how your entry was understood before any result is shown.
Probabilities of separate tries do not add. Multiply the misses instead: each roll misses 5 times in 6, four rolls all miss with probability (5/6) to the fourth power, or 48.225 percent. The remaining 51.775 percent covers every outcome with at least one six.
Exactly 2 counts runs that finish with two hits and no more, a single bar of the chart. At least 2 adds every run with 2, 3, 4 or more hits. The at-least figure is always the larger of the two whenever n is above k.
Rearrange the formula: n = log(1 - 0.9) / log(1 - p). At a 1 percent chance per try you need 230 tries, at 5 percent you need 45. The table beside the chart prints the 50, 90, 99 and 99.9 percent thresholds for whatever chance you type in.
No. Every try here uses the same fixed chance, so drawing without replacement is modelled poorly when the sample is a large share of the pool. Treat the binomial answer as an approximation only when the population is at least twenty times the number of draws.
No. Those describe how one event changes the odds of another, while every try on this page carries the same fixed chance and ignores what came before. Use the Monte Carlo simulator when the rules of your problem are too tangled to write as a single formula.
Exact integers are shown up to 21 digits and up to n of 1,200. Past either limit the value is computed through log-gamma and printed in scientific form. C(1000, 500) alone runs to 300 digits, which is accurate but unreadable.
Nothing about a single run. It is the long-run average, n times p, across many repeats of the same experiment. An expected value of 1.2 hits still leaves a 21.6 percent chance of zero hits when n is 3 and p is 0.4.
No. The arithmetic runs in your browser and nothing is uploaded, logged or stored. The page keeps working with the network switched off once it has loaded.