Premium Converters
Loading
Loading
Loading
Compute permutations (nPr, ordered arrangements) and combinations (nCr, unordered selections) using factorials — ideal for probability, lottery odds, poker hands, and password strength analysis.
Math
Generated on May 23, 2026
Compute permutations (nPr, ordered arrangements) and combinations (nCr, unordered selections) using factorials — ideal for probability, lottery odds, poker hands, and password strength analysis.
A permutation and combination calculator computes the number of ways to arrange or select r items from a set of n. Permutations (nPr) count ordered arrangements — first, second, third place on a podium — while combinations (nCr) count unordered selections — which 3 people are on a committee. These are the foundational building blocks of probability, combinatorics, and discrete mathematics, and they appear everywhere: lottery odds, card-game probabilities, password strength, statistical sampling, and genetics.
Formula
nPr = n! / (n − r)!. nCr = n! / [r! × (n − r)!]. nCr = nPr / r!.Lottery question: 'pick 6 numbers from 1 to 49 — what are my odds?' Or poker question: 'how many five-card hands can be dealt from a standard 52-card deck?' Or the question that keeps cryptographers up at night: 'how many ways can you arrange a 16-character password?' All three are combinatorics — counting possibilities — and all three reduce to permutations (when order matters) or combinations (when it doesn't). The clearest test: would 'Alice, Bob, Carol' be a different answer from 'Bob, Carol, Alice' in your problem? If yes, permutation. If no, combination. Pakistan lottery odds for 6 of 49 are 1 in 13,983,816 — and yes, that's why almost nobody wins. Poker hands? 52C5 = 2,598,960. Royal flush odds? 4 out of those nearly 2.6 million, or roughly 1 in 650,000 hands. This calculator handles nPr (ordered) and nCr (unordered) with full factorial precision, useful for school combinatorics homework, probability courses, password-strength analysis, and any back-of-envelope question about 'how many ways can this happen?' Worth knowing: factorials grow ferociously — 20! is over 2.4 quintillion, and most pocket calculators give up around 60!. JavaScript number precision starts losing accuracy around 18 digits, which limits exact calculations to roughly n = 20 or so.
A permutation and combination calculator computes the number of ways to arrange or select r items from a set of n. Permutations (nPr) count ordered arrangements — first, second, third place on a podium — while combinations (nCr) count unordered selections — which 3 people are on a committee. These are the foundational building blocks of probability, combinatorics, and discrete mathematics, and they appear everywhere: lottery odds, card-game probabilities, password strength, statistical sampling, and genetics.
Permutations count ordered arrangements: the first spot has n choices, the second has n − 1, and so on for r spots — giving n × (n − 1) × (n − 2) × … × (n − r + 1) = n! / (n − r)!. Combinations divide by r! because we are no longer counting orderings within the chosen group. That is why nCr is always smaller than nPr (except when r = 0 or r = 1, where they are equal).
Permutations (nPr, order matters) and combinations (nCr, order doesn't) for small n and r.
| n | r=2 (nPr / nCr) | r=3 (nPr / nCr) | r=4 (nPr / nCr) | r=5 (nPr / nCr) |
|---|---|---|---|---|
| 5 | 20 / 10 | 60 / 10 | 120 / 5 | 120 / 1 |
| 6 | 30 / 15 | 120 / 20 | 360 / 15 | 720 / 6 |
| 7 | 42 / 21 | 210 / 35 | 840 / 35 | 2,520 / 21 |
| 8 | 56 / 28 | 336 / 56 | 1,680 / 70 | 6,720 / 56 |
| 9 | 72 / 36 | 504 / 84 | 3,024 / 126 | 15,120 / 126 |
| 10 | 90 / 45 | 720 / 120 | 5,040 / 210 | 30,240 / 252 |
| 20 | 380 / 190 | 6,840 / 1,140 | 116,280 / 4,845 | 1.86M / 15,504 |
| 52 | 2,652 / 1,326 | 132,600 / 22,100 | — | 311M / 2.6M (poker hands) |
52C5 = 2,598,960 — the number of unique 5-card poker hands from a standard deck.
4-digit PIN: only 10,000 combinations (10^4) — a computer cracks it in milliseconds.
8-character password (lowercase only): 26^8 ≈ 208 billion combinations.
Rubik's cube: 4.3 × 10^19 possible states — yet solvable in at most 20 moves (God's number).
Ten sprinters racing for gold, silver, and bronze: 10P3 = 720 ordered outcomes (different medals mean different outcomes).
Picking 3 people out of 10 for a committee: 10C3 = 120 combinations (committee members are unordered).
Lottery drawing 6 numbers from 49: 49C6 = 13,983,816 possible tickets — one reason winning is so unlikely.
A 4-digit PIN with no repeated digits: 10P4 = 5,040 possibilities — stronger than it sounds, but still brute-forceable.
Seating 8 dinner guests in a row: 8P8 = 8! = 40,320 different arrangements.
Poker hand: 5 cards drawn from 52: 52C5 = 2,598,960 possible hands — the denominator for all basic poker probability calculations.
Jump to a ready-made conversion — useful for quick reference and sharing:
GPA Calculator
Calculate your semester or cumulative Grade Point Average on the 4.0 scale, weighted by credit hours, with support for both weighted and unweighted grading systems.
Grade Calculator
Calculate your final grade from weighted categories like tests, homework, and exams.
Student Result Card Calculator
Subject-wise marks, grades, and a printable school result card — ideal for small schools and parents.
Fraction Calculator
Add, subtract, multiply, and divide proper, improper, and mixed fractions with automatic reduction to lowest terms and decimal equivalents for cooking, carpentry, and homework.
Ratio Calculator
Simplify ratios to lowest terms using GCD and solve proportions like a:b = c:x for any missing value — useful for recipes, map scales, aspect ratios, and mixing ingredients.
Average Calculator
Compute the arithmetic mean, median, mode, range, count, sum, minimum, and maximum from any list of numbers — essential for descriptive statistics, surveys, and grading.
LCM / GCD Calculator
Find the LCM and GCD (HCF) of two or more integers using the Euclidean algorithm — useful for simplifying fractions, finding common denominators, and scheduling repeating events.
Prime Number Checker
Test whether any integer is a prime number using trial division up to its square root, and view the complete unique prime factorization for composite numbers.
Browse all Math calculators & converters
See every tool in this category, plus FAQs and category-specific guides.