🎲 Permutations & Combinations Calculator
How many 5-card poker hands? C(52, 5) = 2,598,960 — exactly. Combinations, permutations and factorials with arbitrary-precision integers, formulas shown.
Combinations — order doesn't matter
C(52, 5) = 52! / (5!(52−5)!)
2,598,960
Permutations — order matters
P(52, 5) = 52! / (52−5)!
311,875,200
52! (factorial)
80658175170943878571…0000000000 (68 digits)
Exact BigInt arithmetic — C(52, 5) = 2,598,960 poker hands, and even 1000! comes out digit-perfect where ordinary calculators overflow at 170!. Runs locally.
How the permutations & combinations calculator works
Combinations C(n, r) count selections where order doesn't matter (poker hands, lottery picks, committee choices); permutations P(n, r) count arrangements where it does (podium finishes, passwords from distinct symbols). Both formulas — C = n!/(r!(n−r)!) and P = n!/(n−r)! — are computed with exact big-integer arithmetic using overflow-free running products, and n! itself is shown when it fits on screen. Ordinary calculators die at 170! (floating-point overflow); here 1000! simply appears, all 2,568 digits of it (abbreviated for readability, digit count stated).
The order-matters question is the whole subject: from 5 people, picking a committee of 2 gives C(5,2) = 10, but picking a president and a vice-president gives P(5,2) = 20 — same people, double the count, because (Alice, Bob) ≠ (Bob, Alice) when the roles differ. Get that question right and the formula picks itself. A cross-check worth knowing: C(n,r) = C(n,n−r) — choosing 5 cards to keep is the same as choosing 47 to discard.
Frequently asked questions
What's the difference between permutations and combinations?
Combinations ignore order (a poker hand is the same 5 cards however dealt); permutations count order (gold-silver-bronze among 3 of 8 runners). C(52,5) = 2,598,960 but P(52,5) = 311,875,200.
What are the formulas?
C(n,r) = n! / (r!(n−r)!) and P(n,r) = n! / (n−r)!, where n! = n×(n−1)×…×1. They're shown on the page with your numbers substituted.
Why do normal calculators fail at large factorials?
They compute in 64-bit floating point, which overflows past ~1.8×10³⁰⁸ — reached at 171!. This tool uses arbitrary-precision integers, so 1000! (2,568 digits) is computed exactly.
What are the odds of winning a 6-of-49 lottery?
One in C(49,6) = 13,983,816. Type n=49, r=6 and see it — combinations, because the draw order doesn't matter.
Is anything sent to a server?
No — exact BigInt arithmetic in your browser, offline-capable.