D DeckLab.
Math Utilities

4 underlying math tools behind every deck tool

Every TCG tool is, in the end, hypergeometric math plus a shuffle plus a counting. Here are those pieces as standalone utilities — useful when you're debugging a deck, checking a claim in a forum post, or testing a new TCG idea.

Hypergeometric Probability Lab

The general "draw N from population K with M successes" calculator. We also tell you when your "sample size" assumption makes the math dubious: hypergeometric converges to binomial when N ≪ K, and the tool flags that case so you know you can swap to a simpler formula.

Cryptographic Shuffler

Standard Fisher-Yates, but with crypto.getRandomValues() instead of Math.random(). Most "shuffle online" tools use the latter — which is biased and predictable. We also give you a seed you can save: paste it back later to reproduce an exact shuffle.

Combination Counter

nCr / nPr, with a clear breakdown of what the numbers mean for card games. The "Texas Hold'em hole-card combos" preset is a useful sanity check: 52 cards taken 2 at a time = 1,326 distinct starting hands, of which 312 are suited, 936 are unsuited, and 78 are pocket pairs.

Random Hand Generator

Draws a fair hand from 1–10 standard decks. Useful for practice, sorting games, magic tricks, and as a quick source of "test" cards for other tools. Optional filters by suit or rank let you isolate special cases.

Why we expose the math

Hypergeometric is the workhorse of every TCG

If you've ever wondered "is a 4-of in a 60-card deck the same as a 3-of in a 40-card deck?" — the answer is no, the difference is roughly 12% vs. 15% in opening-5. Use this lab to check.

Math.random() is not fair enough

It's a 32-bit PRNG with predictable period. For a real shuffle of a real deck, we use crypto.getRandomValues — and we still let you reproduce a deal with a seed.

1326 — yes, that number is correct

C(52,2) = 1,326 unique Hold'em starting hands. Each unsuited hand has 6 combos (4 × 3 / 2), each pocket pair has 6 combos (C(4,2)), and each suited non-pair has 4 combos. Add up: 312 suited + 936 unsuited + 78 pairs = 1,326.

Why "1-10 decks" only?

Past 10 decks the wall-clock time of drawing gets noticeable. Real games rarely need more than that.

Sponsored editorial slot.