Find nPr, nCr (“n choose r”), and counts with or without repetition—and get help choosing the correct rule. Exact integer arithmetic runs privately in your browser.
Choose what you are counting
Counting rule helper
Answer two plain-language questions; the matching rule is selected automatically.
Selected rule: Permutation without repetition, nPr.
Whole number from 0 to 5,000.
Whole number from 0 to 5,000.
Use this mode when objects themselves repeat, such as letters in a word. This is different from allowing a choice to be reused.
Spaces are ignored and letters are matched case-insensitively; maximum 5,000 characters.
— or —
Positive counts separated by commas or spaces; total must not exceed 5,000.
Results
Enter n and r to compare permutation and combination results side by side.
Which counting rule should you use?
Start with the outcome you mean. If swapping two selected items changes the outcome, order matters. If the same available item can fill more than one position, reuse is allowed. “Reuse allowed” does not mean the same thing as arranging identical objects such as the four I’s in MISSISSIPPI; use the repeated-objects mode for that case.
Case
Order matters?
Reuse allowed?
Formula
Example
Permutation without repetition
Yes
No
\(nP r=\frac{n!}{(n-r)!}\)
Gold, silver, bronze from 10 runners
Combination without repetition
No
No
\(nC r=\frac{n!}{r!(n-r)!}\)
A 3-person team from 10 people
Ordered selection with replacement
Yes
Yes
\(n^r\)
A 4-digit PIN using 10 digits
Combination with repetition
No
Yes
\(\binom{n+r-1}{r}\)
6 scoops chosen from 3 flavours
Worked permutation and combination examples
Race placements: 10P3
Choose first, second, and third from 10 runners: n = 10, r = 3. Order matters and a runner cannot place twice, so \(10P3=10!/(10-3)!=10\times9\times8=720\). There are 720 possible podium orders.
Committee selection: 10C3
Choose 3 of 10 people: n = 10, r = 3. Order does not matter and nobody is chosen twice, so \(10C3=10!/(3!7!)=(10\times9\times8)/(3\times2\times1)=120\). There are 120 distinct committees.
Using the same n and r, 10P3 is six times larger because every 3-person group has \(3!=6\) internal orders: \(720=120\times6\).
Four-digit PIN
There are 10 choices for each of 4 positions: n = 10, r = 4. Order matters and digits may repeat, so \(10^4=10,000\). That includes codes such as 0000 and 1212.
Repeated flavour choices
Choose 6 scoops from 3 flavours: n = 3, r = 6. Scoop order does not matter and a flavour may be chosen repeatedly, so \(\binom{3+6-1}{6}=\binom{8}{6}=28\). There are 28 flavour-count combinations.
Methodology and limits
The calculator applies the four formulas in the guide above. Repeated-object arrangements use \(N!/(a!b!\dots)\), where the denominator contains one factorial for each repeated frequency. These definitions agree with the formula summary in OpenStax, Algebra and Trigonometry.
Exact integers are produced with JavaScript BigInt; scientific notation is derived from base-10 logarithms and is labelled approximate. Inputs are limited to whole numbers from 0 to 5,000, with a combined 5,000 limit for combinations with repetition and repeated-object totals. Those practical limits prevent very long loops and result rendering from freezing a phone. Calculations and entered text stay in your browser.
Editorial review: Formula implementation and examples checked by the Starlight Tools editorial team. Last reviewed: 14 July 2026.
Frequently Asked Questions
What is the difference between nPr and nCr?
nPr counts ordered selections, so AB and BA are different. nCr counts groups, so AB and BA are the same. For the same n and r without repetition, \(nPr=nCr\times r!\).
What does n choose r mean?
“n choose r” means the number of unordered groups of r distinct items that can be selected from n distinct items. It is written nCr or C(n,r).
Is nCr the same as a binomial coefficient?
Yes. nCr, C(n,r), and the binomial coefficient read “n choose r” are three notations for the same value.
Why is nCr equal to nC(n−r)?
Choosing the r items to include uniquely determines the n−r items left out. Counting either choice describes the same set of outcomes, so the values are equal.
What are 0! and choosing zero items?
By definition, \(0!=1\). There is exactly one way to choose or arrange zero items: the empty selection, so \(nC0=nP0=1\).
Can r be greater than n?
Not when each item can be used only once. When reuse is allowed, r may be greater than n: ordered selections use \(n^r\), and unordered selections use \(C(n+r-1,r)\).
How do repeated-letter permutations work?
For a word or multiset with N total objects and repeated frequencies a, b, and so on, the number of distinct arrangements is \(N!/(a!b!\dots)\). MISSISSIPPI gives \(11!/(4!4!2!)=34,650\).
🧩 5 Fun Facts about Permutations & Combinations
1
Card shuffles are unique
There are 52! ways to order a deck—about 8×1067. Shuffle well and you likely create an arrangement the universe has never seen.
Astronomical counts
2
nCr is handshake math
A room of n people has C(n,2) unique handshakes. With 10 people, that’s 45 greetings.
Social graph
3
Pascal’s triangle hides them
Each row of Pascal’s triangle lists combination counts: row n gives C(n,0)…C(n,n). Adding a row always sums to 2ⁿ.
Binomial DNA
4
Passwords are permutations
A 6‑character code using 10 digits has 10⁶ possibilities. Add letters/symbols and order sensitivity explodes the search space.
Brute-force size
5
Stars-and-bars for repeats
Combinations with repetition use the classic “stars and bars” trick: C(n+r-1, r) counts ways to place r identical stars into n bins.