Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Math
  3. /Probability Calculators
  4. /Permutation with Replacement Calculator

Permutation with Replacement Calculator

Last updated: March 28, 2026

Calculator

Results

Total Permutations (nʳ)

10,000

Exact Value

10,000

log₁₀(nʳ)

4

Prob of One Specific

0.0001

Results

Total Permutations (nʳ)

10,000

Exact Value

10,000

log₁₀(nʳ)

4

Prob of One Specific

0.0001

Permutations with replacement count the number of ordered sequences where items can be reused. This is the simplest and most common counting model: for each of r positions, you independently choose from n options, and the same option can appear multiple times. The total count is n raised to the power r (n^r).

This model appears everywhere in daily life. A 4-digit PIN using digits 0-9 has 10^4 = 10,000 possibilities. A password of 8 characters from a 62-character alphabet (a-z, A-Z, 0-9) has 62^8 ≈ 218 trillion possibilities. The number of possible DNA sequences of length k is 4^k (four nucleotide bases). Every multiple-choice exam where each question has n options independently has n^(number of questions) possible answer sheets.

The exponential growth of n^r is what makes longer passwords dramatically more secure. Going from 8 to 12 characters with a 62-character alphabet increases possibilities by a factor of 62^4 ≈ 14.8 million. This is the fundamental principle behind brute-force resistance in cryptography and the reason security experts recommend longer passwords over more complex but shorter ones.

Our calculator computes n^r using logarithms to handle extremely large results, and also provides the log base 10 (useful when the answer has many digits) and the probability of one specific sequence (1/n^r). Enter the number of available options and the number of positions to fill to see the total count.

Visual Analysis

How It Works

The formula for permutations with replacement is simply:

$$\text{Total} = n^r$$

This follows from the multiplication principle: if there are n choices for the first position, n for the second, and so on for r positions, the total is n × n × ... × n (r times) = n^r.

To avoid overflow for large values, we compute in log-space:

$$\ln(n^r) = r \cdot \ln(n)$$

$$\log_{10}(n^r) = r \cdot \log_{10}(n)$$

The probability of any one specific sequence is:

$$P = \frac{1}{n^r} = n^{-r}$$

Understanding Your Results

The result represents the total number of distinct ordered sequences of length r where each element is chosen from n options with replacement. A log₁₀ value of 6 means approximately 1 million sequences. For security applications, each additional character multiplies the total by n, so adding one digit to a numeric PIN multiplies possibilities by 10. Generally, log₁₀ > 12 is considered computationally difficult to brute-force.

Worked Examples

4-Digit PIN Code

Inputs

n10
r4

Results

total10000
total exact10000
log total4
prob one0.0001

10,000 possible PINs. A random guess has a 0.01% success probability.

8-Character Alphanumeric Password

Inputs

n62
r8

Results

total218340105584896
total exact218340105584896
log total14.339
prob one4.6e-15

Over 218 trillion possibilities. At 1 billion guesses/sec, brute force takes ~2.5 days.

Frequently Asked Questions

With replacement, each item can be used multiple times (like digits in a PIN — you can use 1-1-1-1). Without replacement, each item can only be used once (like assigning unique medals). With replacement gives n^r; without gives n!/(n-r)!.

Because each additional character multiplies the total by n. Going from 8 to 12 characters with 62 options multiplies the search space by 62^4 ≈ 14.8 million. This exponential growth is why length is the most effective way to increase password strength.

A binary string of k bits has 2^k possible values, which is a permutation with replacement where n=2 and r=k. An 8-bit byte has 2^8 = 256 values, a 32-bit integer has 2^32 ≈ 4.3 billion, and a 256-bit key has 2^256 ≈ 1.16 × 10^77 possibilities.

Yes, unlike permutations without replacement, r can exceed n because items are reused. A 20-character password from 26 letters is perfectly valid: 26^20 ≈ 1.95 × 10^28 possibilities.

The sample space of r independent experiments with n outcomes each has n^r elements. For example, flipping a coin 10 times has 2^10 = 1,024 possible sequences. Calculating the probability of specific patterns (like exactly 5 heads) requires dividing by this total.

The information content (entropy) of a random sequence of r choices from n options is r × log₂(n) bits. A 10-character alphanumeric password carries approximately 10 × log₂(62) ≈ 59.5 bits of entropy.

Sources & Methodology

Knuth, D.E. (2011). The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms. Shannon, C.E. (1948). A Mathematical Theory of Communication. NIST Special Publication 800-63B: Digital Identity Guidelines.
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Combination with Replacement Calculator

Probability Calculators