Permutations with Repetition Calculator
Enter the number of distinct items and the number of positions to count every ordered selection when items may repeat — the n^r behind PINs, passwords, and license plates.
Order matters, repeats allowed
Each position is filled independently from all n items, so the same item can appear again — the count is simply n raised to the power r.
Whole numbers only
Use a whole number of distinct items (n ≥ 1) and a whole number of positions (r ≥ 0); fractions have no combinatorial meaning here.
What are permutations with repetition?
Ordered selections where items may repeat
A permutations with repetition calculator counts the ordered selections you can make when you fill r positions, each chosen freely from the same set of n distinct items — and the same item may be used more than once. Because every position is independent and order matters, the total is n raised to the power r (n^r). It is the number behind a 4-digit PIN, a fixed-length password, a license plate, or any string drawn from a fixed alphabet. Enter how many distinct items you can pick from and how many positions you fill, and the calculator returns the exact count.
Enter the number of distinct items (n) and the number of positions (r) to get the total number of ordered selections, n^r, instantly.
When order matters and items may repeat, each of the r positions can be any of the n items independently, so you multiply n by itself r times.
P = n^rEach position multiplies the running total by n, so the count grows exponentially with the number of positions. With n = 10 digits and r = 4 positions there are 10^4 = 10,000 PINs; adding a fifth digit multiplies that to 100,000. The result is dimensionless — a plain count of distinct ordered selections.
Suppose you want to count every possible 4-digit PIN built from the ten digits 0–9.
Identify n and r
There are n = 10 distinct digits to choose from, and you fill r = 4 positions in order.
Raise n to the power r
Each position can be any of the 10 digits independently, so the count is 10^4.
Read the result
10^4 = 10,000 — there are exactly 10,000 possible 4-digit PINs, from 0000 to 9999.
The result is the number of distinct ordered selections, and two features define it: order matters and repeats are allowed. Order matters means that AB and BA are counted separately — swapping the positions gives a different selection. Repeats are allowed means an item used in one position is still available for the next, which is exactly why every position keeps all n choices and you raise n to the power r. This is what separates permutations with repetition from the other combinatorics counts. Ordinary permutations without repetition, nPr = n! ÷ (n − r)!, also care about order but use up each item, so each position has one fewer choice. Combinations, nCr = n! ÷ (r! (n − r)!), ignore order entirely and so return far smaller counts. When you can reuse items and the arrangement matters — codes, passwords, plates, dice rolls recorded in sequence — n^r is the right model, and it is always at least as large as the no-repeat count for the same n and r.
The formula is exact, but a couple of practical points are worth keeping in mind.
Distinct items and whole positions
This count assumes n genuinely distinct items, each equally available for every position; if some items are identical, the true number of distinguishable selections is smaller. The number of distinct items must be a whole number of at least one, and the number of positions must be a non-negative integer — choosing 0 positions has exactly one arrangement, the empty selection. Very large n or r can produce numbers beyond what is exactly representable, so treat extreme results as approximate.