"How many ways can 3 people be chosen from 10?" has two different correct answers depending on whether the order they're chosen in matters. Here's how to tell which one you need, and how to get the exact count for either case — plus repeated arrangements, circular seating, and factorials past the point where normal calculators give up.
The question that trips people up
Quick answerThe word "order" is the whole game. If swapping two chosen elements creates a different result, you need a permutation (nPr). If swapping them changes nothing, you need a combination (nCr). For the same n and r, nPr is always r! times bigger than nCr.
Take the classic example: a company wants to pick 3 people out of a pool of 10 candidates. If those 3 people are simply "the project team" with no distinct roles, the order they're picked in doesn't matter — that's a combination, and 10C3 works out to 120 possible teams. But if the 3 slots are actually "lead, deputy, and note-taker" — three different jobs — then who ends up in which slot matters, and the count jumps to 10P3 = 720 possible assignments. Same 10 people, same group size of 3, six times more outcomes, purely because roles were introduced.
This is the single most common source of confusion in combinatorics homework, interview brainteasers, and real logistics problems (raffle prize order, batting lineups, PIN codes). The fix is always the same: ask whether two identical groups arranged differently should be counted once or multiple times.
Quick answernPr = n! / (n−r)! for ordered arrangements. nCr = n! / (r! × (n−r)!) for unordered selections. Both are built from the factorial n! = n×(n−1)×...×2×1, with 0! defined as 1.
Factorial (n!): the product of all whole numbers from 1 up to n. It grows fast — 10! is already 3,628,800, and 20! has 19 digits. Standard calculators and JavaScript's Number type run out of precision around 170! (roughly 10308), after which they just show "Infinity." A combination/permutation calculator that uses BigInt arithmetic sidesteps that limit and returns the exact digit string no matter how large n gets.
Here's a worked, illustrative table for n = 10, showing how nCr and nPr diverge as r changes (example values, not tied to any real dataset):
| r (chosen) | 10Cr (combination) | 10Pr (permutation) | Ratio (r!) |
| 1 | 10 | 10 | 1 |
| 2 | 45 | 90 | 2 |
| 3 | 120 | 720 | 6 |
| 4 | 210 | 5,040 | 24 |
Notice the ratio column matches r! exactly (2!=2, 3!=6, 4!=24) — that's the nPr = nCr × r! relationship holding for every row. A calculator built around this formula can compute both values at once and show the factorial breakdown for each step, which is useful for checking homework or double-checking a probability calculation before committing to it.
When repeats are allowed
Quick answerPermutation with repetition counts distinct orderings when some elements repeat: n! / (n₁!·n₂!·...·nₖ!). Combination with repetition counts unordered selections where repeats are allowed: C(n+r−1, r).
The word "BANANA" is the standard teaching example for permutation with repetition: it has 6 letters, but 3 A's and 2 N's are identical to each other, so swapping the two N's doesn't create a "new" arrangement. The count of distinct letter arrangements is 6!/(3!·2!·1!) = 60, not 6! = 720. A tool that accepts a typed word directly (rather than requiring you to count letter frequencies by hand) saves a step that's easy to get wrong.
Combination with repetition shows up whenever you're choosing a total quantity from a small number of categories and can pick more than one from the same category — for example, selecting 5 total pieces of fruit from 3 available types (apple, pear, banana), where taking 2 apples and 3 pears is a valid and different outcome from 1 apple and 4 pears. That count is C(3+5−1, 5) = C(7,5) = 21 distinct selections.
Seating people around a table
Quick answerA circular permutation — arranging n items around a circle rather than in a line — divides the usual n! by n, giving (n−1)!, because rotating the whole circle produces a layout that looks identical. If mirror images (flips) also count as the same, like a necklace, divide by 2 again: (n−1)!/2.
For example, 6 people seated around a round table can be arranged in (6−1)! = 5! = 120 distinct ways — fewer than the 6! = 720 you'd get lining the same 6 people up in a row, because a round table has no fixed "start" seat. If the same 6 items were beads on a necklace instead (which can be flipped over and still look the same), the count drops further to 5!/2 = 60.
Worked example only — swap in your own headcount, party size, or bead count. These formulas don't account for real-world constraints like "two people refuse to sit next to each other"; they count total arrangements assuming no such restriction.
Frequently asked questions
What is nCr and how do you calculate it?
nCr (combination) is the number of ways to choose r elements from a set of n, where order doesn't matter. Formula: C(n,r) = n! / (r!·(n−r)!). For example, a 3-person team from 10 people (where it doesn't matter who is 'president' vs. 'member') can be formed in 10C3 = 120 different ways.
What is the difference between permutation and combination?
In a permutation (nPr), the order of elements matters (an arrangement); in a combination (nCr), order doesn't matter (a selection/group). For the same n and r, nPr is always r! times larger than nCr: nPr = nCr × r!. Example: choosing 2 of 3 people in order (president, then vice-president) gives 3P2 = 6 ways, while choosing an unordered group of 2 gives 3C2 = 3 ways.
What is a permutation with repetition?
A permutation with repetition counts the distinct orderings of a sequence that contains identical elements. If n elements consist of n1, n2, ..., nk copies of each distinct item, the number of distinct arrangements is n! / (n1!·n2!·...·nk!). Example: the word 'BANANA' (6 letters: 3 A's, 2 N's, 1 B) has 6!/(3!·2!·1!) = 60 distinct arrangements.
Why do factorials above 170 show "Infinity" on a normal calculator?
JavaScript and most calculators use floating-point (double-precision) numbers, whose upper limit is about 1.79×10^308. 171! exceeds that limit, so the result displays as 'Infinity'. This tool uses the BigInt data type, which preserves full integer precision, to compute even factorials with thousands of digits exactly.
Can I see the actual list of combinations and permutations, using my own items?
Yes. In the 'nPr / nCr' tab, after entering n and r, the result shows expandable lists of the actual combination selections and permutation arrangements. You can also open 'Use my own list' and paste your own names, words, or prizes instead of the auto-generated A, B, C labels, then copy or download the generated list as a .txt file.
Related guides
Methodology note: All numeric examples in this guide (team sizes, fruit counts, table seating) are illustrative, not drawn from any real dataset, and are meant to demonstrate the formulas — not to serve as statistical, financial, or professional advice. Always double-check r ≤ n and use exact (BigInt) arithmetic for large factorials rather than a standard floating-point calculator.