Permutation with Replacement Calculator

Calculate the number of permutations with replacement for selecting r elements from a set of n distinct objects

The size of the set or population
Please enter a valid non-negative integer
The size of the sample or subset
Please enter a valid non-negative integer

Explanation

Permutation with replacement calculates the number of ways to choose a sample of r elements from a set of n distinct objects where order matters and replacements are allowed.

Each of the r elements can be chosen in n ways, so the total number of permutations is n × n × … × n (r times) = nr.

Examples

Choosing Letters from an Alphabet

If we want to choose a sequence of 2 letters from an alphabet size of 4 letters {a,b,c,d}, the number of permutations with replacement is:

PR(4,2) = 42 = 16

Possible sequences: {a,a}, {a,b}, {a,c}, {a,d}, {b,a}, {b,b}, {b,c}, {b,d}, {c,a}, {c,b}, {c,c}, {c,d}, {d,a}, {d,b}, {d,c}, {d,d}.

Rolling Dice

When rolling a die 60 times and recording the sequence of results, we’re choosing a sequence of 60 dice rolls from 6 possible numbers:

PR(6,60) = 660 ≈ 4.887367798 × 1046

There are approximately 4.887367798 × 1046 possible sequences of 60 dice rolls.

Permutation with Replacement Calculator

Search-optimized longform breakdown of permutation with replacement calculator tools, formulas, and real-world uses. Master PR(n,r) = n^r in minutes—no math degree required.

What Is a Permutation with Replacement Calculator?

A permutation with replacement calculator instantly computes how many ordered sequences you can form when picking r items from n options—with repeats allowed.

Think passwords, dice rolls, or DNA strings. Order matters. Repeats happen. The result? n^r possibilities.

This tool skips manual multiplication. Enter n (total choices) and r (sequence length). Get the exact count—plus examples.

Permutation with Replacement Formula: PR(n,r) = n^r

The core equation drives every permutation with replacement calculator:

PR(n,r) = n^r

  • n = number of distinct items
  • r = length of sequence
  • Result = total ordered outcomes with replacement

Plain text formula: PR(n,r) = n^r

Each position in the sequence has n choices. Multiply across r positions.

Permutation with Replacement Example: 4-Letter Alphabet, 2-Letter Code

Set: {a, b, c, d} → n = 4
Code length: 2 → r = 2

PR(4,2) = 4^2 = 16

All outcomes:

aaabacad
babbbcbd
cacbcccd
dadbdcdd

Order matters: ab ≠ ba. Repeats allowed: aa counts.

Real-World Use: Dice Roll Sequences (n=6, r=60)

Rolling a six-sided die 60 times? Track the exact sequence.

  • n = 6 (faces: 1–6)
  • r = 60 (rolls)

PR(6,60) = 6^60 = 4.887367798 × 10^46

That’s more sequences than atoms in the observable universe.

A permutation with replacement calculator handles this instantly—no overflow errors.

Permutation Without Replacement Formula: P(n,r) = n! / (n-r)!

Compare to no repeats:

P(n,r) = n × (n-1) × … × (n-r+1)

Or in factorials:

P(n,r) = n! / (n-r)!

When n = r, this becomes n!—the classic factorial.

Use our factorials calculator for large values.

Key Differences: With vs Without Replacement

FeatureWith ReplacementWithout Replacement
Repeats allowed?YesNo
Formulan^rn! / (n-r)!
Order matters?YesYes
Total outcomesGrows fasterLimited by n
Example: n=3, r=29 (aa, ab, ac, etc.)6 (ab, ac, ba, bc, ca, cb)

How to Use a Permutation with Replacement Calculator (Step-by-Step)

  1. Enter n – Total distinct items (e.g., 10 digits)
  2. Enter r – Sequence length (e.g., 4-digit PIN)
  3. Click Calculate
  4. View result – PR(n,r) = n^r
  5. Optional: See sample outcomes or export

Try it now with our permutations replacement tool.

Advanced Example: Password Strength (n=62, r=12)

Modern passwords use:

  • 26 lowercase
  • 26 uppercase
  • 10 digits
    n = 62

12-character password → r = 12

PR(62,12) = 62^12 = 3.226266 × 10^21

That’s 3.2 sextillion possible passwords.

Brute-force? Impossible in a lifetime.

Common Mistakes to Avoid

  • Confusing with combinations → Combinations ignore order.
    Use our combinations calculator instead.
  • Forgetting order matters → “abc” ≠ “cba” in permutations.
  • Mixing replacement rules → Double-check: repeats allowed?

Permutation with Replacement vs Combinations with Replacement

TypeFormulaOrder Matters?Repeats?
Permutation (replacement)n^rYesYes
Combination (replacement)(n+r-1)! / (r!(n-1)!)NoYes

Need combinations with replacement? Use our combinations replacement tool.

When to Use PR(n,r) in Real Life

ScenarionrUse Case
PIN codes104Security
DNA sequences (A, T, C, G)4100Genomics
Lottery scratch-off patterns506Probability
License plates (digits + letters)367DMV stats

Permutation with Replacement Calculator vs Manual Math

TaskManualCalculator
5^100ImpossibleInstant
Error riskHighZero
Large exponentsScientific notation neededAuto-formatted
Teaching aidConfusingVisual examples

People Also Ask

What is the permutation with replacement formula?

PR(n,r) = n^r
Each of r positions has n choices.

How is permutation with replacement different from without?

With replacement: repeats allowed → n^r
Without: no repeats → n! / (n-r)!

Can I calculate permutation with replacement in Excel?

Yes: =POWER(n,r) or =n^r

Is order important in permutation with replacement?

Yes — always. “12” ≠ “21”.

Pro Tips for Accurate Calculations

  • Use 64-bit calculators for r > 50
  • Switch to scientific notation for n^r > 10^15
  • Validate with small cases: Test n=2, r=3 → should return 8
  • Avoid floating-point errors — use integer-based tools

Historical Note: Where PR(n,r) Comes From

The concept traces to 17th-century probability. Blaise Pascal and Pierre de Fermat used similar counting in gambling.

Today? It powers cryptography, AI sampling, and game design.

Permutation with Replacement Calculator Limitations

LimitWorkaround
Extremely large r (>1000)Use logarithmic output: log10(n^r) = r × log10(n)
Negative inputsInvalid — n, r ≥ 0
Non-integer inputsNot supported — use discrete math tools

Manual math fails at scale. A permutation with replacement calculator delivers:

  • Speed – Instant results
  • Accuracy – No human error
  • Clarity – Examples included
  • Scalability – Handles 10^100 with ease

Stop guessing. Start calculating.