A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities
About this tool
The Permutation & Combination Calculator computes P(n,r) (permutations — ordered arrangements) and C(n,r) (combinations — unordered selections) for any whole number values of n (total items) and r (items chosen). The results include step-by-step factorial expansion so you can follow the working: P(n,r) = n! / (n-r)! and C(n,r) = n! / (r! × (n-r)!). This is a core tool for probability, statistics, combinatorics coursework, and probability calculations in fields such as genetics, games, and cryptography. Both results are shown simultaneously so you can compare the two at a glance. The factorial-based formulas P(n,r) and C(n,r) are foundational across discrete math, probability theory, statistical mechanics, and computer science (e.g., counting paths in graphs).
Why use it
Calculates both permutations and combinations simultaneously.
Step-by-step factorial working helps students understand the calculation.
Handles large values using BigInt to avoid integer overflow.
Instant results with no form submission needed.
Step-by-step working makes it useful for students learning the formulas, not just for getting answers.
Privacy-first: input numbers never leave your browser; calculations are pure JavaScript.
How to use
- Enter the total number of items (n).
- Enter the number of items to choose (r).
- Both P(n,r) and C(n,r) are calculated instantly.
- Expand the 'Show working' section to see the factorial breakdown.
- Use the toggle to compare P(n,r) and C(n,r) for the same n and r — the ratio is exactly r!.
- Verify edge cases by entering r = 0 (always 1) or r = n (P returns n!, C returns 1).
When it helps
- Solving probability problems involving ordered or unordered selections.
- Combinatorics homework involving factorial calculations.
- Calculating lottery odds or game probability scenarios.
- Verifying hand calculations in statistics and probability coursework.
- Deriving probability fractions for card games, dice rolls, or other combinatorial setups.
- Estimating arrangements in genetics, cryptography, or scheduling problems.
Examples
01P(10, 3) — picking gold/silver/bronze from 10 athletes
Expected resultP(10,3) = 10!/(10-3)! = 10×9×8 = 720
02C(52, 5) — five-card poker hands from a deck
Expected resultC(52,5) = 52!/(5!×47!) = 2,598,960
03C(49, 6) — UK lottery odds (1 in C(49,6))
Expected resultC(49,6) = 13,983,816 (odds 1 in ~14 million)
Tips
- Use combinations C(n,r) when order does not matter (e.g., lottery, picking team members, hand of cards) and permutations P(n,r) when it does (e.g., podium finishes, password arrangements).
- Cancel the larger factorial in the numerator and denominator before multiplying — for P(50,3) compute 50×49×48 directly, not 50!.
- Pascal's triangle gives all C(n,r) values for small n quickly: each entry is the sum of the two above it, with the rows being C(n,0), C(n,1)... C(n,n).
- C(n,r) = C(n,n-r) — choosing 7 from 10 is the same count as choosing 3 from 10. Use the smaller r to simplify by hand.
- P(n,r) = r! × C(n,r) — if you know the combination, multiplying by r! gives you the corresponding permutation count.
- For probability problems, divide favorable arrangements by total arrangements — both numerator and denominator are usually permutations or combinations.
Frequently Asked Questions
What is the difference between permutation and combination?⌄
A permutation counts arrangements where order matters (ABC ≠ BAC). A combination counts selections where order does not matter (ABC = BAC = CAB). C(n,r) = P(n,r) / r!
What does P(5,3) mean?⌄
P(5,3) is the number of ordered arrangements of 3 items chosen from 5 distinct items. P(5,3) = 5!/2! = 60.
What does C(5,3) mean?⌄
C(5,3) is the number of unordered groups of 3 items chosen from 5 distinct items. C(5,3) = 5!/(3!×2!) = 10.
What is n! (factorial)?⌄
n! is the product of all positive integers up to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1.
Can r be greater than n?⌄
No. Choosing more items than exist (r > n) is undefined and results in 0 for both permutations and combinations.
How does this compare to a graphing calculator (TI-84) or Wolfram Alpha?⌄
The math is identical — same factorial formulas. This tool's advantage is showing the cancellation steps in plain text, which calculators usually hide. For symbolic algebra (n choose 2k+1 simplifications), use Wolfram Alpha; for numerical answers, this is faster.
What happens for very large n?⌄
BigInt internally handles n up to several thousand without precision loss; the result may be a 100+ digit integer. The display truncates extreme values with scientific notation but preserves the exact BigInt internally.
How do I use this for poker probability?⌄
Total 5-card hands = C(52,5) = 2,598,960. Royal flush count = 4 (one per suit). Probability = 4/2,598,960 ≈ 1 in 649,740. Most poker probabilities are ratios of two C(n,r) values.
Glossary
- Permutation
- An ordered arrangement of items. P(n,r) = n! / (n-r)! counts the ways to arrange r items chosen from n distinct items.
- Combination
- An unordered selection of items. C(n,r) = n! / (r! × (n-r)!) counts the ways to choose r items from n without regard to order.
- Factorial (n!)
- Product of all positive integers up to n. 5! = 5×4×3×2×1 = 120. By convention, 0! = 1.
- Pascal's triangle
- A triangular array where each entry is C(n,r); each row sums to 2^n and adjacent entries follow C(n,r) = C(n-1,r-1) + C(n-1,r).
- Binomial coefficient
- Another name for C(n,r), often written (n over r) or ⁿCᵣ. Coefficient of x^r in the expansion of (1+x)^n.
- Sample space
- The set of all possible outcomes of a probability experiment; counted using permutations or combinations depending on whether order matters.
- With repetition
- When an item can be chosen multiple times. P with repetition = n^r; C with repetition = C(n+r-1, r).