Calculation method
With replacement, return each token before the next draw. The target chance stays p = K/N, so the binomial model gives the number of targets in d independent draws. Without replacement, keep drawn tokens out until the batch ends; the hypergeometric model accounts for the changing bag.
For exactly k targets, the two formulas are C(d,k) p^k (1 − p)^(d − k) and C(K,k) C(N − K,d − k) / C(N,d), respectively. The main readout sums outcomes with at least the required count; the exact-count readout includes only that count. The expectation is d × K/N in either model.
Assumptions and limits
This is a tabletop design scenario using your inputs, not a prediction of player experience. Check your game's exact rules and edge cases before finalizing a design. Tokens are equally likely and split into one target group and all other tokens. This does not model changing the bag mid-batch, ordered sequences or any matching color across multiple target categories.
Use safe whole-number counts, at least one starting token, targets no greater than total tokens, and 0–1,000 draws. The draw cap is a browser computation limit, not a recommended game-design range. Without replacement, draws must fit in the bag; with replacement, more draws than starting tokens are valid. An unavailable without-replacement comparison is not reported as 0%. Probabilities use floating-point arithmetic and are rounded for display.
Related tools
Read the draw as a finite bag
Enter the counts before the whole draw batch. With 2 target tokens among 10 and 3 draws, at least one target is 53.33% without replacement versus 48.80% with replacement. Exactly one target is 46.67% versus 38.40%. These are different events, so the main and exact readouts need not agree.
Zero targets means 0% for at least one target; all-target bags are deterministic. With zero draws, at least zero and exactly zero targets both have probability 100%. A required count greater than the number drawn is a valid impossible event, with probability 0%. Re-enter the new counts when evaluating a later batch after tokens have been removed.
Use the result in a design decision
For a bag with 12 success tokens in 30 total, compare a one-token draw against a three-token draw before choosing an effect strength. Test the lowest and highest likely bag states so players do not encounter an unexpected swing after tokens are removed.