No ads, no sign-upChecked 2026-08-25

Permutations with Repetition Calculator

Result

10,000sequences

Result: 10,000 sequences
How the result moves

Every position keeps all n choices, so the count is n multiplied by itself r times. Ten digits on four positions give 10 × 10 × 10 × 10 = 10,000 PINs; two symbols on eight positions give 256, one byte. Forbid repeats and the same question becomes the ordinary permutations calculator.

Worked examples

How it's calculated

P = n^r

  1. StepEnter how many distinct symbols each position may take as n — ten digits, 26 letters.
  2. StepEnter how many positions you fill as r; every position is filled independently.
  3. ResultRead the number of ordered sequences. Zero positions has exactly one answer.

What this number means

Of the four counting formulas this is the plainest, and the reason deserves saying out loud: it is the only one with nothing to correct. Each of the r positions is filled independently, and because nothing is consumed, each keeps all n options. The multiplication principle then runs straight through — n choices, times n, times n, r times over — and that is n^r. The other three formulas all end in an adjustment: a product that shrinks because items get used up, or a division that takes back orders counted more than once. Here nothing is used up and every order really is a different result, so no factorial appears anywhere. Ten digits on four positions give 10 × 10 × 10 × 10 = 10,000, which is also the plain reading of a four-digit PIN: the codes 0000 through 9999, ten thousand of them exactly. What is counted is possibilities, not difficulty. Eight printable ASCII characters span 6,634,204,312,890,625 strings, but that figure only describes how strong a password would be if it were drawn uniformly at random from the whole space. People do not choose that way, and an attacker does not work through the space in order. The number is an upper bound on the effort, never a measure of one particular choice.

Order counts, and every symbol stays available

Each of the r positions is filled independently and keeps all n choices, so the count is n multiplied by itself r times. Ten digits on four positions give 10,000 PINs; two symbols on eight positions give 256, one byte.

The largest of the four counts

Ten digits on four positions give 10,000 with repeats, 5,040 without, and 210 if the order is ignored as well. Nothing is ever used up, so no factor shrinks along the way.

Inputs stop at 98 symbols and 8 positions

99 to the power 8 is the first result a standard number can no longer write out digit for digit: it prints as 9,227,446,944,279,200 when the true value ends in 201. Inside the allowed range every printed digit is true, including 95 printable characters over 8 positions.

Commonly misread

A four-digit PIN over ten digits has 5,040 codes.

That count forbids using a digit twice. A PIN may repeat digits, so each position keeps all ten and there are 10,000.

One byte has 2 × 8 = 16 possible values.

Each of the eight positions independently takes one of two symbols, which is 2 to the power 8 = 256. Multiplying instead of raising to a power undercounts badly.

Filling zero positions must give zero sequences.

n to the power 0 is 1 for every n, the single empty sequence. That is the standard convention in combinatorics.

Reference table

n, rReads asSequences
1, 0no positions at all1
10, 0the empty code1
1, 5one symbol, five slots1
6, 2two dice rolls in order36
26, 3three letters17576
2, 8one byte256
10, 4a four-digit PIN10000
95, 8eight printable ASCII characters6634204312890625

Questions

How do I calculate permutations with repetition?

Raise the number of distinct symbols to the power of the number of positions: n to the power r. Each position is filled independently and keeps all n choices. A four-digit PIN over the digits 0 to 9 therefore has 10,000 possible codes.

How is this different from nPr and nCr?

Here symbols may repeat, so every position still has all n choices. Ordinary permutations use each item up and give n!/(n−r)!, and combinations ignore the order entirely and give the smallest of the three counts. Ten digits on four positions: 10,000 with repeats, 5,040 without, 210 if the order is ignored.

What happens when the number of positions is zero?

Filling zero positions has exactly one outcome, the empty sequence, so n to the power 0 is 1 for any n. The calculator returns 1, which is the standard convention in combinatorics.

Where is this used?

Anywhere order matters and symbols may repeat: PIN and password counts, licence-plate patterns, fixed-length strings over an alphabet, sequences of dice rolls or coin flips recorded in order, and the key space of a cipher.

Why do the inputs stop at 98 symbols and 8 positions?

Because 99 to the power 8 is the first result a standard number can no longer write out digit for digit: it prints as 9,227,446,944,279,200 when the true value ends in 201. Inside the allowed range every printed digit is true, including 95 printable characters over 8 positions. Longer strings need arbitrary-precision arithmetic.

Sources and last check

  1. en.wikipedia.org

Information, not professional advice.