Combination Calculator
nCr, computed so 52 choose 5 is still exact.
Work out Combination. nCr, computed so 52 choose 5 is still exact. Correct where the obvious implementation is not.
Ways to choose 5 from 52
2,598,960
Exact
Combinations count selections where order does not matter — a poker hand is the same hand however it was dealt. Permutations count arrangements, where order does, and are always larger by a factor of r!. This is computed multiplicatively rather than as n!/(r!(n−r)!). Three factorials overflow at n = 21, because 21! exceeds what a double holds exactly, and 52 choose 5 would be wrong on any calculator that takes the direct route — even though the answer, 2,598,960, is small. C(n,r) always equals C(n,n−r): choosing five cards to keep is the same act as choosing forty-seven to discard.
How the Combination Calculator works
Enter a total and a number chosen for the count of possible selections where order does not matter. Computed multiplicatively rather than from three factorials, so it stays exact at sizes where the direct formula has long since overflowed.
Also known as: ncr calculator · n choose r calculator · lottery odds calculator · combinations formula calculator
Frequently asked questions
What is the difference between a combination and a permutation?
Order. A combination counts selections — a poker hand is the same hand however it was dealt. A permutation counts arrangements, so ABC and CBA are different. Permutations are always larger, by a factor of r!.
How do I calculate combinations?
C(n,r) = n!/(r!(n−r)!). In practice never compute it that way: 21! already exceeds what a double holds exactly, so 52 choose 5 comes out wrong even though the answer is under three million. Multiply and divide alternately instead.
What are the odds of winning the lottery?
For a 6-from-49 draw there are 13,983,816 combinations, so a single ticket has about a one in fourteen million chance. For 5-from-52 there are 2,598,960.
Why does C(n,r) equal C(n,n−r)?
Because choosing which items to take is the same act as choosing which to leave. Picking 5 cards from 52 to keep is identical to picking 47 to discard, so the counts must match.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/combination-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Combination Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/combination-calculator" style="color:#64748b">Combination Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.