What is a permutation with repetition?
A permutation with repetition counts the number of ways to fill r ordered positions by choosing from n distinct items, where each item may be used more than once. The notation is \({}^{n}\Pi_{r}\). Because order matters and repeats are allowed, every position is an independent choice among all n items. This is pure mathematics and applies the same everywhere.
The formula
The total number of arrangements is simply n raised to the power r:
$$ {}^{n}\Pi_{r} = \text{n}^{\,\text{r}} $$
This follows from the multiplication principle: the first position has n options, the second also has n options (repetition allowed), and so on for all r positions, giving \(n \times n \times \ldots \times n = n^{r}\).
How to use this calculator
Enter n, the number of distinct items available, and r, the number of positions to fill (the length of each ordered sequence). Both must be nonnegative integers. Since repetition is allowed, r may be larger than n. The calculator returns the exact integer count using arbitrary-precision arithmetic, so even huge results are shown precisely.
Worked example
With \(n = 5\) distinct items and \(r = 3\) positions:
$$ {}^{n}\Pi_{r} = 5^{3} = 5 \times 5 \times 5 = 125 $$So there are 125 ordered sequences of length 3 drawn from 5 items with repeats allowed. Another example: \(n = 2\), \(r = 10\) gives \(2^{10} = 1024\), the number of length-10 binary strings.
FAQ
How is this different from nPr? Ordinary permutations without repetition use \({}^{n}P_{r} = \frac{n!}{(n-r)!}\) where each item is used at most once. This tool allows repeats, so it uses \(n^{r}\).
What if r = 0? \({}^{n}\Pi_{0} = n^{0} = 1\), the single empty arrangement. By the standard combinatorial convention even \(0^{0} = 1\) here.
What if n = 0 and r \(\geq\) 1? The result is 0, because no positions can be filled from an empty set of items.