Permutation & Combination Calculator
Calculate nPr (permutations) and nCr (combinations) with arbitrary precision BigInt factorials and arrangement listings.
Permutations (nPr)
720
Combinations (nCr)
120
Probability Analysis
Odds of specific Permutation:1 / 720(1.3889e-3%)
Odds of specific Combination:1 / 120(8.3333e-3%)
Step-by-Step Formulas
Permutation nPr
Formula: P(n, r) = n! / (n - r)!
Product Sequence: 10 × 9 × 8 = 720
Combination nCr
Formula: C(n, r) = n! / ((n - r)! × r!)
Calculation: P(10, 3) / 3!
= 720 / 6 = 120
Permutations vs. Combinations
A permutation counts arrangements where order matters: P(n,r) = n! / (n-r)!. A combination counts selections where order does not matter: C(n,r) = n! / ((n-r)! x r!). For C(n,r), this calculator uses BigInt arithmetic to calculate the exact factorials without losing precision, allowing exact results up to n=500.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Counting arrangements where order matters against where it does not.
- Working out lottery or card-hand counts.
- Checking a combinatorics homework answer.
- Understanding how quickly factorial growth takes over.
- Confirming a count you reached another way.
Frequently Asked Questions
- What is the actual difference between P(n,r) and C(n,r)?
- Whether order counts. P(n,r) = n! / (n−r)! counts arrangements; C(n,r) = P(n,r) / r! counts selections. The r! is exactly the number of orderings of each chosen group, so dividing it out collapses them into one. Gold-silver-bronze from 10 runners is P(10,3) = 720; picking any 3 to advance is C(10,3) = 120.
- Why does it use BigInt instead of ordinary numbers?
- Because factorials outrun double precision almost immediately — 21! already exceeds 2⁵³ and silently loses its last digits. BigInt is arbitrary-precision integer arithmetic, so results are exact all the way to the n = 500 cap, where 500! is a 1,135-digit number that no floating-point type can represent.
- Is n! / (n−r)! really computed as two full factorials?
- Yes, and the division is exact because both are integers and the quotient always is too. The tool also shows the cancelled form — P(10,3) as 10 × 9 × 8 — which is what you would compute by hand, since every factor below 8 appears in both numerator and denominator and cancels.
- Why is r > n rejected rather than returning zero?
- Because it is a malformed question rather than a question with the answer zero. You cannot choose 5 items from 3, and (n−r)! is undefined for a negative argument. Combinatorial identities do define C(n,r) = 0 for r > n, but reporting a plain 0 would hide a typo in the inputs.
- Why does the listing tab only work on small inputs?
- Because the counts explode. Listing every permutation of 10 items means materialising 3,628,800 arrays; at 12 items it is 479 million. Counting stays instant to n = 500 precisely because it never builds the objects — listing is for seeing the structure of a small example.
Common errors and gotchas
- Using permutations where order does not matter, which overcounts by a factorial.
- Forgetting whether repetition is allowed, which changes the formula entirely.
- Overflowing on large factorials, where the intermediate values exceed the number range.
- Confusing nPr and nCr notation, which some sources write in the opposite order.
- Applying the formulas to a problem with constraints they do not model.
Related Calculators tools
Percentage Calculator
Solve percentage, increase, and change calculations.
Age Calculator
Calculate exact age in years, months, and days.
Unix Timestamp Converter
Convert Unix epoch timestamps to and from human dates.
Tip Calculator
Calculate tip and split the bill between people.
Aspect Ratio Calculator
Solve width or height for a target aspect ratio.
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin.
Data Storage Converter
Convert between bytes, KB, MB, GB, TB, and more.
Discount Calculator
Calculate sale price and savings from a discount.