Permutation and combination calculator

Count ordered or unordered selections, with or without repetition, using exact integers.

Selection order

Order is ignored: AB and BA are the same choice. Enter whole numbers 0–1,000.

Assumptions & limits

n distinct items or types; choose r items. Both must be whole numbers 0–1,000, written with digits (no fractions or e notation). Order matters for permutations and is ignored for combinations. Repetition means each type can be reused without limit; this is not rearranging a multiset with fixed duplicate counts. Selecting zero items has exactly one outcome, including n = 0. A nonempty selection from zero types, or r > n without repetition, has zero outcomes. Counts use exact integers, up to 3,001 digits. Long results show a preview plus a scrollable full value; Copy result retains every digit.

YOUR ANSWER

Exact count

10

Order
Ignored (combinations)
Repetition
Not allowed
Digits
2
How it’s calculatedCalculated on your device

n! / (r! (n − r)!). Empty selection: 1 outcome. No available selection: 0 outcomes.

Displayed values may be rounded. Calculations keep the underlying precision.

n and r are whole numbers 0–1,000, entered as digits without e notation or separators. Repetition means unlimited reuse of a type; it is not a fixed multiset's rearrangements. r = 0 gives one empty selection, including n = 0. If n = 0 and r > 0, or r > n without repetition, the count is zero. Exact counts are bounded to 3,001 digits. Long answers have a preview and a keyboard-scrollable full result; copying includes every digit.

The formula, made simple

Count selections from n distinct items or types. Choose whether order matters and whether the same type can be selected repeatedly. Results are exact integers rather than rounded floating-point approximations.

Without repetition: permutations P(n,r) = n!/(n − r)!, combinations C(n,r) = n!/[r!(n − r)!]. With unlimited repetition: ordered sequences = n^r, unordered multisets = C(n + r − 1,r). Empty selections have one outcome; impossible nonempty selections have zero.

A worked example

Choosing 3 of 5 distinct items gives 10 unordered combinations or 60 ordered permutations without repetition. With unlimited repetition, there are 35 unordered choices or 125 ordered sequences.

A few useful answers

When should I choose permutations?

Choose permutations when positions or order distinguish outcomes, such as first, second and third prizes. Choose combinations for a group where selecting Alice then Bob is the same group as Bob then Alice.

Why is selecting nothing counted as one?

There is one empty selection. This convention makes the counting identities consistent. For this counting problem, an empty ordered sequence is also one outcome even when no types are available.

Can I count rearrangements of a word with repeated letters?

Not with the repetition option here. That problem requires the count of each repeated letter and uses a different multiset-permutation formula. Here n denotes distinct available types and repetition permits unlimited reuse.

Back to calculator ↑