🧮 Permutation & Combination Calculator
Compute permutations (nPr) and combinations (nCr) from values of n and r. Exact integer results powered by BigInt — all in your browser.
Enter n and r to compute permutations and combinations.
About the Permutation & Combination Calculator
This calculator computes both permutations (nPr) and combinations (nCr) given the total number of items n and the number of chosen items r. It uses BigInt arithmetic to return exact integer answers even for large inputs (up to 1000!).
Formulas
- Permutation (order matters):
nPr = n! / (n-r)! - Combination (order does not matter):
nCr = n! / (r! × (n-r)!)
Both formulas use the factorial n! = n × (n-1) × … × 1, with 0! = 1.
How to use
- Enter the total number of items n.
- Enter the number of chosen items r (must satisfy 0 ≤ r ≤ n).
- Click Calculate. Both nPr and nCr values appear below.
Frequently asked questions
What is the difference between permutation and combination? A permutation counts ordered arrangements, so ABC and BAC are different. A combination counts unordered selections, so ABC and BAC are the same.
What happens when r > n? Permutations and combinations are undefined — the calculator will warn you because you cannot choose more items than exist.
Why are the numbers so large? Factorials grow extremely fast. For example, 20! is already 2,432,902,008,176,640,000. The calculator returns the full integer when possible.
Is the result always an integer? Yes. Both nPr and nCr are guaranteed to be non-negative integers for valid inputs.