Free Permutation & Combination Calculator
Calculate permutations P(n,r) and combinations C(n,r) for any values of n and r. Includes factorial reference table and step-by-step formulas. Free, private — all calculations run in your browser.
Permutation Combination Calculator — P(n,r) & C(n,r)
Calculate permutations P(n,r) and combinations C(n,r) for any n and r up to 20. Shows the factorial breakdown, the ratio between them, and a reference table from 0! to 15!. Used in probability, statistics, combinatorics and competitive mathematics.
How to Use This Calculator
- 1
Enter n — the total number of items in the set (up to 20).
- 2
Enter r — the number of items to choose or arrange.
- 3
Permutations P(n,r) and combinations C(n,r) appear instantly.
- 4
r must be ≤ n. Both must be non-negative integers.
- 5
Export a PDF with the complete factorial breakdown.
📐 How This Is Calculated
P(n,r) = n! / (n−r)! | C(n,r) = n! / [r! × (n−r)!] | C(n,r) = P(n,r) / r!
n—Total number of items in the full setr—Number of items selected from the setP(n,r)—Permutation — ordered arrangements of r items from n (order matters)C(n,r)—Combination — unordered selections of r items from n (order doesn't matter)n!—Factorial — n! = 1×2×3×…×n (n=0: 0!=1 by convention)Reference: Blaise Pascal (1654) — Pascal's triangle; Leibniz (1666) — combinatorics; NIST Handbook §26
Understanding Your Results
Frequently Asked Questions
More Calculator Tools
Disclaimer
Results are provided for informational and educational purposes only. They should not be used as a substitute for professional financial, engineering, medical, or legal advice. Always verify outputs with a qualified professional before making important decisions. Roughtools makes no warranties regarding accuracy or completeness for your specific situation.
About This Permutation & Combination Calculator
The Permutation & Combination Calculator is an essential tool for students, teachers, and professionals working in mathematics, statistics, probability theory, cryptography, and computer science. It computes both permutations and combinations instantly, displays the factorial table for reference values, and shows step-by-step working so you can understand not just the answer but the method behind it.
The Formulas — How They Work
Permutations count the number of ordered arrangements of r items chosen from n total items. The word "ordered" is key — swapping two selected items produces a different, distinct arrangement.
Combinations count the number of unordered selections of r items from n total items. Here, swapping two selected items produces the same selection — only the unique set of items matters, not their sequence.
Where: n = total items in the set, r = items being chosen or arranged, n! = n factorial = n × (n−1) × (n−2) × … × 1. The relationship between the two: P(n,r) = C(n,r) × r!, since each combination can be ordered r! ways to produce all its permutations.
Permutations vs Combinations — Real-World Examples
Understanding the distinction through concrete examples is the fastest path to mastery:
- •Lottery numbers (pick 6 from 49): Order doesn't matter — {3, 12, 25, 36, 41, 49} is the same ticket regardless of draw order → Combination C(49,6)
- •Race finishing positions (top 3 of 8 runners): Order matters — first, second, third are different outcomes → Permutation P(8,3)
- •PIN code (4 digits from 10 digits, repetition allowed): Order matters — 1234 ≠ 4321 → Permutation with repetition: 10⁴ = 10,000
- •Choosing a 5-person committee from 20 employees: Position doesn't matter → Combination C(20,5) = 15,504
- •Arranging 6 books on a shelf: Every position is distinct → Permutation P(6,6) = 6! = 720
Factorial Notation — Why It Grows So Fast
The factorial function n! grows faster than exponential functions. 10! = 3,628,800; 15! = 1,307,674,368,000; 20! ≈ 2.43 × 10¹⁸. This rapid growth is why combinatorial problems quickly produce astronomically large numbers — and why security relies on large key spaces being computationally infeasible to brute-force. By convention, 0! = 1, which ensures the formulas work correctly when r = 0 (one way to choose nothing) and r = n (one way to choose everything).
Privacy Notice
All calculations in this calculator are performed entirely in your browser. No data you enter is transmitted to any server, stored in any database, or shared with third parties. See our Privacy Policy for full details.
When to Use This Calculator
Calculate the exact odds of winning a lottery by computing C(pool, picks). Essential for understanding the true probability before playing.
Determine how many unique passwords or PINs are possible given a character set and length — key for security analysis and strength evaluation.
Find how many ways to select a team of k members from n candidates when position doesn't matter — classic combination problem.
Calculate the number of ways to arrange people in seats when position matters — a permutation problem common in event planning and exam prep.
Determine the number of possible finishing orders in a race or tournament — permutations where every position is distinct and order is critical.
💡 Pro Tips
The single most important question in any combinatorics problem: does ORDER matter? If rearranging the selected items gives you a different, valid result — use permutations. If rearranging gives you the same result — use combinations. This one question determines which formula to apply in every problem.
C(n,r) = C(n, n−r) — the symmetry property. Choosing 3 items from 10 gives the same count as rejecting 7 items from 10: C(10,3) = C(10,7) = 120. Use the smaller of r and (n−r) to simplify manual calculations and reduce arithmetic.
Pascal's Triangle is a shortcut for generating combination values without calculating factorials. Each entry is the sum of the two above it, and the r-th entry in row n is exactly C(n,r). This is why binomial expansion coefficients come from Pascal's Triangle.
For very large n, use Stirling's approximation: ln(n!) ≈ n×ln(n) − n + 0.5×ln(2πn). This lets you work with log-scale values to avoid overflow — useful in information theory, genetics, and statistical physics where n can reach millions.
Frequently Asked Questions
Related Calculators
Your input is processed locally in your browser and is never stored, transmitted, or shared with any server. See our Privacy Policy.