Combination and Permutation Calculator
The combination and permutation calculator solves counting problems by computing combinations (nCr) and permutations (nPr) the moment you type. Enter a total (n) and how many items you pick (r), and you get the exact count with the formula and full working shown.
Use it whenever you need to count possibilities: lottery odds, committee selections, seating arrangements, passwords, or homework. A built-in quick reference makes it easy to tell the two ideas apart so you choose the right one every time.
How to Use the Calculator
Choose the calculation type
Click the Combination or Permutation tab depending on whether order matters in your problem.
Enter the total (n)
Type the total number of items in the Total items (n) field. Any whole number from 0 up to 1000 is supported.
Enter how many to choose (r)
Type how many items you want to choose or arrange in the Items to choose (r) field. Keep r less than or equal to n.
Read the result and the steps
The answer updates instantly as you type. Open Show calculation steps to follow how it was derived, or Quick reference to compare the two formulas.
Features
Combinations and Permutations
Switch between Combination (nCr) and Permutation (nPr) with a single tab to match any counting problem.
Instant Calculation
Results update automatically as you type n and r, with no calculate button to press.
Step-by-Step Solutions
Expand the calculation steps to see exactly how the answer is derived from the formula.
Large Number Support
Compute with n up to 1000 using BigInt precision, so even huge factorials stay exact.
Smart Number Formatting
Readable thousands separators for everyday numbers and scientific notation once results pass 20 digits.
Optimized Algorithms
Uses shortcuts like C(n,r) = C(n, n-r) and partial factorials to compute fast without overflow.
Quick Reference Table
A built-in table compares combination versus permutation by order, formula, example, and relationship.
Input Validation
Clear messages flag empty, negative, non-integer, r-greater-than-n, or out-of-range inputs as you type.
Frequently Asked Questions
What is the difference between a combination and a permutation?
In a combination, order does not matter, so ABC, BAC, and CAB count as the same selection. In a permutation, order matters, so ABC, BAC, and CAB are all different arrangements. Use combinations to select groups and permutations to arrange sequences.
How do I calculate nCr and nPr?
Pick the Combination or Permutation tab, enter n (the total) and r (how many you choose), and the result appears instantly. Under the hood it uses C(n,r) = n! / (r! × (n-r)!) and P(n,r) = n! / (n-r)!. Open the steps to see each one worked out.
What does "n choose r" mean?
"n choose r" is the everyday name for the combination C(n,r) — the number of ways to choose r items from n when order is ignored. For example, 10 choose 3 equals 120, the number of different 3-person groups you can form from 10 people.
When does order matter in counting?
Order matters when rearranging the same items creates a genuinely different outcome — ranking finishers, assigning distinct roles, or building a sequence such as a PIN. Whenever that is the case, use Permutation. If only the chosen set matters, use Combination.
How do I calculate lottery odds?
Use the Combination tab, since draw order does not matter. To find the odds of picking 6 numbers from 49, compute C(49, 6) = 13,983,816 possible combinations, which means a 1-in-13,983,816 chance for a single ticket.
What is the relationship between C(n,r) and P(n,r)?
P(n,r) = C(n,r) × r!. Permutations equal combinations multiplied by the number of ways to arrange the r selected items. This is also shown in the Quick reference panel.
Why is my result shown in scientific notation?
When a result is longer than 20 digits it is displayed in scientific notation, such as 1.234567e+50, so it stays readable. The calculation itself uses BigInt and remains exact behind the scenes.
Why is n limited to 1000?
The maximum value for n is capped at 1000 to keep calculations fast and responsive. That range covers virtually every practical counting problem while keeping performance smooth in the browser.
No comments yet. Be the first to comment!