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 August 22, 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:
Exponent / Power Calculator
Raise any base to any exponent — positive, negative, fractional, or decimal — to compute powers, reciprocals, and nth roots for compound interest, scientific notation, and computing.
Square Root Calculator
Compute the principal square root, cube root, square, and cube of any real number, with support for negative cube roots and irrational results like √2 for Pythagorean theorem work.
Logarithm Calculator
Calculate logarithms in any base, including common (log10), natural (ln), and binary (log2).
Triangle Solver
Solve any triangle from SSS, SAS, ASA, AAS, SSA, or right-triangle (Pythagoras) inputs. Drawn-to-scale visualization with all sides, angles, area, and perimeter.
3D Solid Volume Calculator
Volume + surface area for sphere, cylinder, cone, cube, and rectangular prism. Interactive 3D visualization — rotate and zoom.
Trigonometry Calculator
Compute sin, cos, tan, csc, sec, cot for any angle in degrees or radians. Interactive unit-circle visualization.
Distance & Midpoint Calculator
Find the distance between two points, the midpoint, slope, and angle. Interactive coordinate-plane visualization.
Statistics Batch Calculator
Mean, median, mode, std deviation, variance, quartiles for any list of numbers. Histogram + box plot visualizations.
Browse all Math calculators & converters
See every tool in this category, plus FAQs and category-specific guides.