No Login Data Private Local Save

Permutation & Combination Calculator – nPr & nCr

5
0
0
0

Permutation & Combination Calculator

Calculate nPr (Permutations) and nCr (Combinations) instantly with step-by-step solutions

n
Please enter a valid integer (0–1000).
Range: 0 – 1,000
r
r must be ≤ n and a non-negative integer.
Must satisfy: 0 ≤ r ≤ n
Presets:
nPr — Permutation
P(n, r) = n! / (n−r)!
nCr — Combination
C(n, r) = n! / (r! × (n−r)!)
Calculation Steps

Enter valid values for n and r to see detailed calculation steps.

Frequently Asked Questions

Permutation (nPr) considers the order of items as important — different arrangements count as different outcomes. For example, ABC and CBA are distinct permutations.

Combination (nCr) ignores order — only the selection of items matters. ABC and CBA are the same combination. Use permutations when arranging items in sequence (like race rankings); use combinations when simply selecting a group (like lottery numbers).
The permutation formula is:
P(n, r) = n! / (n − r)!

This equals n × (n−1) × (n−2) × ... × (n−r+1) (exactly r factors). It counts the number of ways to arrange r items selected from a set of n distinct items, where order matters.
The combination formula is:
C(n, r) = n! / (r! × (n − r)!)

This can also be written as C(n, r) = P(n, r) / r!. It gives the number of ways to choose r items from n items where the order does not matter. It's also called the binomial coefficient and is often written as ⁿCᵣ or C(n, r).
Use permutations (nPr) when order matters:
  • Ranking winners in a race (1st, 2nd, 3rd)
  • Creating PIN codes or passwords
  • Arranging books on a shelf
  • Assigning specific seats to people
Use combinations (nCr) when order doesn't matter:
  • Selecting lottery numbers
  • Choosing committee members
  • Picking toppings for a pizza
  • Forming a hand in card games
No. For both nPr and nCr, you must have n ≥ r ≥ 0. If r > n, the calculation is mathematically undefined because you cannot select more items than are available. Our calculator will show a validation error if you try to enter r > n.
0! = 1 by convention. This definition ensures that the permutation and combination formulas work correctly for boundary cases. For example, nP0 = 1 (there is exactly one way to arrange zero items) and nC0 = 1 (there is exactly one way to choose zero items). This also makes nCn = n!/(n!×0!) = 1, which is consistent.
The relationship is: nPr = nCr × r!

In other words, a permutation is a combination followed by arranging the selected items. First choose r items from n (that's nCr), then arrange those r items in all possible orders (r! ways). This gives the total number of permutations: nCr × r! = nPr.
This calculator supports values of n up to 1,000 and r from 0 to n. It uses arbitrary-precision integer arithmetic (BigInt) to deliver exact results even when the numbers are extremely large — far beyond what standard floating-point calculators can handle accurately. Results may contain hundreds or even thousands of digits for large inputs.
Permutations: Password strength analysis, tournament bracket arrangements, DNA sequence ordering, scheduling tasks, cryptography key generation.

Combinations: Lottery probability calculations, quality control sampling, portfolio diversification in finance, clinical trial group assignment, poker hand probability, and any scenario involving selecting subsets without regard to order.