Ask whether swapping the selected items changes the outcome. Use P if it does and C if it does not, after checking distinctness and replacement. This guide helps learners check counting exercises and developers define a selection model before computing its size.
Open the permutation and combination calculator, enter n=5 and r=2, and compare 10 with 20 by switching modes. First establish which of those answers describes your problem.
Choose nPr or nCr: order, repetition and distinctness
| Situation | Method | Example | Direct calculator mode |
|---|---|---|---|
| No order, no replacement | nCr | Two equal-role members from five: 10 | Combination |
| Ordered roles, no replacement | nPr | President and deputy from five: 20 | Permutation |
| Arrange all distinct items in a row | n! | Five seats in a row: 120 | Factorial |
| Ordered, symbols reusable | nʳ | Four digits, leading zero allowed: 10000 | Exponent tool |
| Identical objects present | Divide by repeated-item factorials | AAB: 3!/2!=3 | Separate steps |
| Rotation identified in a circle | (n−1)!, n≥1 | Five distinct people: 4!=24 | Factorial after modeling |
Numbered seats around a table make rotations different: five people then have 5!=120 seat assignments. Identifying rotations does not automatically identify reflections, as some necklace models do.
Formulas and worked examples: five people, two choices
For integers 0≤r≤n, distinct items and no replacement, nPr=n!/(n−r)! and nCr=n!/[r!(n−r)!]. See the conditions in OpenStax Counting Principles.
- Choose the president in five ways.
- Choose the deputy from the four remaining people.
- The ordered count is 5P2=5×4=20.
- For equal-role committee members, AB and BA are the same pair. Divide by 2!: 5C2=20/2=10.
For three people chosen from ten, 10P3=10×9×8=720. Each group has 3!=6 orders, so 10C3=720/6=120. In general nPr=nCr×r!; counts are equal for r=0 or 1, and permutations are larger for r≥2.
Check the conditions, then calculate
Compare the same input in two modes
Enter n=5 and r=2. Switch from combination 10 to permutation 20 and check where the 2! denominator appears in the working.
Repetition, leading zero and identical letters
Do not use nPr unchanged when an item is replaced after drawing or a digit can be used again.
| Task | Calculation | Result | Condition to check |
|---|---|---|---|
| Four digits, leading zero and repeats allowed | 10⁴ | 10000 | A string, not necessarily a four-digit integer |
| Four-digit integer, repeats allowed | 9×10³ | 9000 | First digit cannot be zero |
| Four digits, leading zero allowed, no repeats | 10P4 | 5040 | One fewer option at each position |
| Arrange AAB | 3!/2! | 3 | AAB, ABA, BAA |
| Choose two from three types, repetition allowed, no order | 4C2 | 6 | AA, AB, AC, BB, BC, CC |
The last row is a multiset selection: n types and r items map to (n+r−1)Cr for n≥1. The calculator does not perform that mapping automatically. Enter the transformed n=4, r=2 in combination mode for this example. For repeated digits, use the exponent guide and exponent calculator.
Lotto 6 odds: why use 43C6?
The official rules specify six distinct numbers from 1 to 43, with all six main numbers matching for first prize. Order does not matter.
43C6=(43×42×41×40×39×38)/(6×5×4×3×2×1)=6096454.
If all six-number sets are equally likely, a fixed entry has first-prize probability 1/6096454, about 0.0000164%. Buying the same set twice does not cover a second distinct set. This is a counting example, not a prediction or a purchase recommendation.
Zero factorial and large results: input/output checks
| Mode and input | Result | What it checks |
|---|---|---|
| Combination n=5, r=0 | 1 | One empty selection |
| Combination n=5, r=5 | 1 | One full group |
| Factorial n=0 | 1 | The 0!=1 convention |
| Combination n=52, r=5 | 2598960 | Unordered five-card hands |
| Combination n=500, r=250 | 150 digits | Full result and digit count |
| Factorial n=500 | 1135 digits | 150 is not an output ceiling |
| n=5, r=7 / n=501 / decimals | Error | Integer and range restrictions |
The calculator accepts 0≤r≤n≤500, or 0≤n≤500 for factorial. BigInt keeps these integers exact, displayed with grouping commas. Inputs are processed in your browser. Save a long copied integer as text in a spreadsheet: the spreadsheet may otherwise round digits even though the calculator did not.
Check the model before saving an answer
- Write AB and BA to test whether a swap matters.
- Check replacement, leading zero, identical objects and circular symmetry.
- Compare nCr with nC(n−r), or check nPr=nCr×r!.
- A probability needs numerator and denominator counted consistently, and an equally likely model.
Check the conditions, then calculate
Keep the assumptions with the result
Use the 43C6 example and confirm 6096454. Copy the answer into your notes with “unordered, no replacement.”
Favorite the tool for a shortcut in the same browser; this does not save or synchronize inputs or notes. The mathematics category connects other exercises, including logarithms and trigonometry.
Editorial verification scope
On October 29, 2026, Tools Hub Editorial Team checked the public teaching sources, official lottery rules and worked numbers above. Mathematical assumptions and tool limits are separate. Local browser verification covers results, working, copy and rejected inputs.
FAQ
How do I decide between P and C?
Swap the two selected people. President and deputy are different outcomes after a swap, so use P; a committee with equal roles stays the same group, so use C. First check that items are distinct and selected without replacement.
What are 0!, nC0 and 0C0?
All are 1: there is one empty selection or arrangement. The calculator accepts integers with 0≤r≤n≤500. It rejects n<r as an input error.
Does a PIN with repeated digits use nPr?
No. If all n symbols may be reused independently at each of r positions, there are nʳ strings. Four digits with leading zero allowed give 10⁴=10000 strings, compared with 10P4=5040 without repeated digits.
Is 150 digits the output limit?
No. The input limit is 500 for n and r. BigInt gives the complete integer: 500C250 has 150 digits, while 500! has 1135 digits.