Probability Calculators

nCr nPr Calculator — Combinations & Permutations

Count ordered and unordered selections with or without repetition. Expand the exact integer and distinguish counts from probabilities.

Jump to calculator ↓Help me choose a test

Quick Reference

TypeFormulaExample
Permutationn!/(n-r)!Arranging 3 from 5: P(5,3)=60
Combinationn!/(r!(n-r)!)Choosing 3 from 5: C(5,3)=10
Perm. w/ Rep.n^r3-digit code (0-9): 10³=1000
Comb. w/ Rep.C(n+r-1,r)5 scoops, 3 flavors: C(7,5)=21

Common Combinations C(n,r)

C(5,2)
10
C(6,3)
20
C(10,5)
252
C(52,5)
2,598,960
C(49,6)
13,983,816
C(20,10)
184,756

Match the counting rule to the selection process

Use nonnegative whole numbers n (available distinct items) and r (selections). Ordinary permutations P(n,r)=n!/(n−r)! distinguish order without replacement. Ordinary combinations C(n,r)=n!/[r!(n−r)!] ignore order without replacement. Both require r≤n.

With replacement, ordered selections have nʳ possibilities. Unordered selections from n item types use C(n+r−1,r) for positive n. With no available types, there is one empty selection and zero nonempty selections.

The tool rejects fractional inputs and uses BigInt for integer arithmetic. It limits n≤170, r≤1000 and n+r≤1001 to keep computation bounded. Large results use shortened scientific notation; expand Show the exact integer to inspect the full count.

Worked examples

Choosing three committee members from five people gives C(5,3)=10. Assigning three distinct roles instead gives P(5,3)=60. Each committee corresponds to 3!=6 role arrangements.

A four-digit code drawn from ten digits with repetition allowed has 10⁴=10,000 possibilities, including leading zeros. Without repetition it has P(10,4)=5,040. Excluding a leading zero changes the count and must be handled separately.

Selecting two toppings from six types without repetition gives 15 unordered pairs. With repetition it gives C(7,2)=21.

From a count to a probability

Counts may exceed 1; probabilities cannot. Dividing favorable counts by all counts yields a probability only when the elementary outcomes have the appropriate equal probabilities. Selection bias can change probabilities without changing which outcomes are possible.

Repeated indistinguishable items and restrictions can require adjustments not provided by these four standard modes. Write out the sample space if the formula choice is unclear.

Continue

Read counting principles and binomial probability, or calculate a factorial.

Want to learn the theory?

Our lessons explain the statistical concepts behind this calculator with clear examples.

Understand this method →