Enter n and r to get nPr, nCr, and their with-repetition variants — computed exactly using BigInt arithmetic.
Enter n and r to calculate permutations and combinations
A permutation and combination calculator counts exactly how many ways you can arrange or select items from a group — instantly and exactly, even for large numbers. Enter the total number of items (n) and how many you're choosing (r), and this free calculator returns nPr (permutations, where order matters), nCr (combinations, where order doesn't matter), and their with-repetition variants, all computed using exact BigInt arithmetic so nothing gets rounded off. Whether you need an nPr calculator for a seating arrangement problem or an nCr calculator for a committee-selection problem, this tool shows the exact factorial substitution behind every result.
A permutation counts the number of ways to arrange r items from a pool of n when the order matters — ABC and BCA count as different outcomes. A combination counts the number of ways to choose r items from n when order does not matter — ABC and BCA count as the same selection. Both without-repetition formulas rely on factorials (n!), while the with-repetition variants (nʳ and C(n+r−1, r)) allow the same item to be picked more than once.
This tool is built for students learning combinatorics and probability, competitive exam candidates practicing nPr/nCr problems, security analysts assessing password or PIN brute-force difficulty, event planners counting seating arrangements, researchers in genetics or combinatorics, and anyone who needs an exact count of arrangements or selections without manual factorial arithmetic.
Counting problems show up everywhere probability is involved — from lottery odds to card game hands to cryptographic key spaces. Permutations and combinations give an exact, provably correct count rather than an estimate, which is essential in fields like security (where brute-force difficulty must be calculated precisely) and probability theory (where exact counts of outcomes are the foundation of every calculation).
Security professionals use permutations with repetition to calculate how many possible PINs or passwords exist for a given length and character set. Event planners use permutations to count seating arrangements or scheduling orders. Committee and team selection uses combinations to count how many distinct groups can be formed. Card game and lottery odds rely on combinations to count equally likely hands or ticket outcomes. Geneticists and combinatorics researchers use both to count sequence arrangements and trait combinations.
How this calculator computes nPr, nCr, and their with-repetition variants
Permutations count ABC and BCA separately; combinations treat them as the same selection. This is the single most important distinction to get right.
"Without repetition" means each item can be used once; "with repetition" allows the same item to be chosen multiple times, like digits in a PIN.
Factorials grow extremely fast — 20! already exceeds what a standard JavaScript number can represent exactly, so this calculator uses BigInt to keep every digit precise.
From entering n and r to reading every result
Type the total number of distinct items available to choose from.
Type how many items will be selected or arranged from that total.
The calculator computes nPr, nCr, and both with-repetition variants instantly using exact BigInt arithmetic.
nPr counts arrangements where order matters; nCr counts selections where order doesn't matter.
Review permutations with repetition (nʳ) and combinations with repetition, used when items can be chosen more than once.
See the exact factorial substitution behind every result to verify the calculation by hand.
The calculator's own default values: n = 10, r = 3
You have 10 distinct items and want to choose or arrange 3 of them. We'll compute all four results: nPr, nCr, permutations with repetition, and combinations with repetition.
Explanation: nPr (720) is always ≥ nCr (120) for the same n and r, since every combination of 3 items can be arranged in 3! = 6 different orders (720 ÷ 120 = 6). The with-repetition variants are both larger than their no-repetition counterparts, since allowing reuse always creates more possible outcomes.
When to use each of the four results this calculator returns
| Result | What It Answers | Example Question |
|---|---|---|
| nPr | How many ordered arrangements of r items from n exist, no repeats | How many ways can 3 of 10 runners finish 1st, 2nd, 3rd? |
| nCr | How many unordered selections of r items from n exist, no repeats | How many different 3-person committees from 10 people? |
| Permutations w/ repetition (nʳ) | How many ordered sequences of length r exist if items can repeat | How many 3-digit PINs from 10 digits? |
| Combinations w/ repetition | How many unordered selections of r items exist if items can repeat | How many ways to pick 3 scoops from 10 ice cream flavors? |
Reading the size: for the same n and r, permutations are always greater than or equal to combinations, and with-repetition results are always greater than or equal to without-repetition results — more freedom (order or reuse) always produces at least as many possible outcomes.
Manual verification: confirm nCr = nPr ÷ r! by hand, and confirm nPr = n × (n−1) × … × (n−r+1) (the first r terms of n!) rather than computing the full factorials of large n directly.
Where counting arrangements and selections exactly actually matters
Check homework on nPr, nCr, and factorial-based counting problems step by step.
Quickly verify permutation and combination answers for entrance and certification tests.
Compute lottery odds, card game probabilities, or dice roll outcomes exactly.
Count possible password or PIN combinations to assess brute-force difficulty.
Count possible seating arrangements, team lineups, or task orderings.
Count how many distinct groups of r people can be chosen from n candidates.
Count arrangements of sequences or combinations of traits in scientific research.
Count feature subsets or hyperparameter combinations when designing experiments.
Compute exact hand odds in poker, bridge, and other card games using nCr.
Count possible combinations of toppings, flavors, or product variants, with or without repeats.
Count possible match-ups, bracket orders, or finishing-position arrangements.
Count possible product configurations or assembly-order sequences.
Solve everyday "how many ways" questions, from raffle draws to team jersey numbers.
What this permutation and combination calculator does well, and where care is still needed
All four counting modes side by side
| Mode | Order Matters? | Repetition Allowed? | Formula |
|---|---|---|---|
| Permutation (nPr) | Yes | No | n! ÷ (n−r)! |
| Combination (nCr) | No | No | n! ÷ (r!(n−r)!) |
| Permutation with repetition | Yes | Yes | nʳ |
| Combination with repetition | No | Yes | C(n+r−1, r) |
Summary: This permutation and combination calculator gives you an instant, free, and exact way to compute nPr, nCr, and their with-repetition variants for any n and r, with the full formula substitution shown. Pair it with related tools like the Probability Calculator and Median & Mode Calculator for a fuller picture of combinatorics and statistics.
Common questions about permutations and combinations
Trusted educational references to go deeper on the math behind this calculator
Explore other statistics & probability tools