Combinations & Permutations (nCr, nPr)
How do I calculate nCr and nPr?
Result
How it is calculated
Choose r items from n. Permutations count ordered selections: nPr = n × (n−1) × … × (n−r+1). Combinations ignore order: nCr = nPr ÷ r!. The factorial shown is n! = 1 × 2 × … × n. Both n and r are whole numbers (decimals are cut off), r cannot exceed n and neither can be negative; n above 1,000,000 also returns no result. nCr, nPr and n! are exact while they fit in 64-bit integers; beyond that they are approximate floating-point values. n! shows "—" when n is 171 or more because it exceeds the float range, while nCr and nPr are still shown (n = 200, r = 2 gives 19,900 and 39,800).
Worked example
Pick 3 people out of 10. nPr = 10 × 9 × 8 = 720 ordered arrangements. Each group of 3 can be ordered in 3! = 6 ways, so nCr = 720 ÷ 6 = 120 distinct groups. The factorial 10! = 3,628,800.
Common mistakes
- Using permutations when order does not matter (a lottery draw is a combination) or the reverse (a podium finish is a permutation).
- Reading the factorial output as n!/r!; it is simply n! and does not depend on r.
- Entering r larger than n, which has no valid answer because you cannot pick more items than exist.
- Typing a decimal such as 5.7 and expecting rounding; the value is truncated to 5.
- Assuming repetition is allowed; these formulas pick each item at most once.
About this calculator
This calculator computes combinations (nCr), permutations (nPr) and the factorial (n!) from two inputs, n (the total number of items) and r (how many are being chosen or arranged). Permutations count arrangements where order matters, combinations count selections where order doesn't, and both formulas are built from the factorial function, which itself multiplies every whole number from 1 up to n.
These formulas are core to probability and statistics coursework, where students calculate the odds of a specific hand, drawing, or arrangement occurring out of all possible outcomes. Outside the classroom, the same math shows up whenever someone needs to know how many possible outcomes exist — the number of ways to arrange a race's finishing order, the number of possible lottery ticket combinations, or how many different teams of a given size can be formed from a larger group — situations that come up in game design, scheduling and odds calculation alike.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Use nCr when the order does not matter and nPr when it does, with no repeats allowed in either. A familiar case is a lottery that draws 6 numbers from 49, where nCr gives 13,983,816 possible tickets. Results are exact while they fit in a 64-bit integer and approximate beyond that. For n of 171 or more the factorial shows a dash because it is out of range, yet nCr and nPr still appear. What kind of selection problem are you solving?