Permutation & Combination Calculator
Compute nCr, nPr and n! with exact big-integer arithmetic. Large results such as lottery odds never overflow, and every calculation shows its working step by step.
Inputs are not collected. Usage measurement requires your consent.
Try an example
Enter n and r to see the result with the working.
Done
Permutation & Combination Calculator
Next time, open this tool from My Tools. Only the tool list is saved in this browser, not your inputs or results.
⌥DPress Option+D anytime to toggle My Tools instantly
How to use
- 1
Pick a calculation type
Choose combination (nCr), permutation (nPr) or factorial (n!).
- 2
Enter n and r
Type the total count n and how many you choose, r. The example buttons work too.
- 3
Read the result and working
The exact value and each step are shown, ready to copy into notes or reports.
Features
- Combinations (nCr), permutations (nPr) and factorials (n!) on one page
- Exact BigInt for 0≤r≤n≤500: 500C250 has 150 digits and 500! has 1135
- Every step shown, from formula substitution to the final value
- Clear errors for n < r and out-of-range input; inputs are never transmitted
Use cases
Check counting problems
Compare hand-worked permutation and combination answers with the exact value.
Lottery and card odds
Confirm the true number of combinations in lotteries and poker hands.
Verify program output
Compare the counts your algorithm produces against exact big-integer results.
Details
A combination nCr counts the ways to choose r items from n when order does not matter; a permutation nPr counts the ways to choose and arrange them when order does. Because order matters, nPr is larger than nCr for the same n and r (whenever r ≥ 2). The formulas are nPr = n!/(n−r)! and nCr = n!/(r!(n−r)!), and the tool shows every substitution step from formula to result.
Calculations use JavaScript BigInt (arbitrary-precision integers), so values such as 43C6 = 6,096,454 for Lotto 6 or 52C5 = 2,598,960 five-card poker hands come out exactly, with no floating-point error. Even 500C250 — a number with about 150 digits that overflows ordinary calculators — computes without truncation.
The condition is n ≥ r ≥ 0. If n < r no selection exists, so the input is rejected as an error. The tool also follows the standard conventions 0! = 1 and nC0 = nCn = 1. Inputs are never transmitted; all computation happens locally in your browser.
FAQ
What is the difference between nPr and nCr?
Permutations count arrangements where order matters; combinations count selections where it does not. For the same n and r, nPr = nCr × r!, so permutations are larger whenever r ≥ 2.
What are 0! and nC0?
By convention 0! = 1 and nC0 = nCn = 1 — there is exactly one way to choose nothing. The tool follows these conventions.
How large can the numbers get?
n and r can go up to 500. 500C250 has about 150 digits, but BigInt arbitrary-precision arithmetic handles it with no overflow or rounding error.
Can I copy the result?
Yes. The copy button places a line like "C(43, 6) = 6,096,454" on the clipboard, ready to paste into notes or reports.
Related guide
How to Use the Laws of Exponents: Product, Quotient, Power and More
Compare exponent laws, negative bases and reciprocals. Distinguish −2⁴ from (−2)⁴, understand the 0⁰ convention, fractional-exponent limits, scientific notation for 10⁻⁷ and exact versus approximate calculation.
Adding and Subtracting Fractions: Steps and Visual Checks
Compare fraction operations with tables and diagrams. Learn common denominators, negative mixed numbers, zero denominators, exact checks, seven-digit inputs and rounded decimal output.
Permutations vs Combinations: nPr and nCr Explained
Choose nPr or nCr by checking order, repetition and distinctness. Worked examples, a decision diagram, repeated digits, Lotto 6 odds, zero factorial and exact integer limits up to n=500.
Related Tools
Prime Factorization
Factor an integer at least 2 with up to 15 digits. Check product and exponent forms, positive divisor count and primality. Press Factorize or Enter to run.
Fraction Calculator
Add, subtract, multiply and divide fractions with exact results. See the reduced answer plus mixed-number and decimal forms, with the working shown.
Statistics Calculator
Paste numbers to get count, sum, mean, median, min, max and standard deviation at once. Handles newline, comma and space separators.
Quadratic Equation
Solve ax² + bx + c = 0 with real or complex roots, the discriminant and substitution into the quadratic formula.
All processing happens in your browser. Your files are never uploaded.
Verified: Known values (43C6, 52C5, 10!, 0!), the n < r error, factorial mode and the English page are covered by browser tests
Did you know?
The number of five-card poker hands is 52C5 = 2,598,960 — the starting point for many classic probability questions.