Projects / Case 01 of 02 Probability engine / 2025 – present

Exact, not estimated.

Whole-integer draw probability for deck building. No simulation, no floating point. Just the true number, at any deck size.

Run the full app ↗ Source on GitHub ↗
01What it does

An exact multivariate hypergeometric draw-odds calculator: buckets with at-least, at-most, exactly and between conditions; combos with joint probabilities; a target solver that runs the question backward; and three named mulligan models: London, Vancouver, and Selective.

0
Platforms, one codebase
0
Mulligan models, named
0
Floating-point operations

The maths layer is pure Dart, separated from the UI so it can be unit-tested on its own, on arbitrary-precision BigInt arithmetic, so there is no drift at any deck size. Shareable state lives in the URL. No account, no backend.

02Exact by design The lazier version would have looked identical

A tie is reported as a range, never a winner picked at random.

When two counts are equally likely, it says "2–3" and highlights both rows. Fractional averages are labelled differently from whole counts, so 2.5 never reads as "you're holding half a card."

The lazier version was available and would have looked identical to a casual user. That's exactly why it matters: correctness you can't see from the outside is the habit that carries over to draw slips and ledgers.

03Against the field

Similar calculators exist. They're floating-point web tools answering the forward question. This one is exact, runs natively, solves backward ("how many copies do I need for 85%?") and lets you annotate any bucket or combo for whoever reads the deck next.

Source-available, not open source: you're welcome to read it and run the official builds; it isn't licensed for redistribution. The engine also runs the calculator on the original site's page, running the same maths in the browser.

04Not a screenshot Computing locally, in this page

Change a number. It answers exactly.

Buckets · multivariate
2 groups
Card groupCopiesAt least
P(every group satisfied)
Exact fraction ·
Target solver · backward
Target for “Starter
60%
1%50%99%
Copies needed
Sensitivity
Every count of “Starter” against the same draw, exactly. The highlighted row is the first that clears 60%.

The core of Deck Odds, rebuilt for this page in the same whole-integer arithmetic: BigInt binomials, the reduced fraction next to the percentage, because that's the point. The full app adds buckets, combos, joint probabilities and the three mulligan models.

← All projects Next: MetaStack Books →
← Home matt@matthewbraner.com © 2026 Matthew Braner