Permutations with Replacement Calculator
Calculate permutations with replacement (n^r) - arrangements where items can be repeated and order matters. Perfect for PIN codes, passwords, and lock combinations.
Results
Permutations
10,000
10^4
Input Values
Number of choices at each position
Length or number of selections
Show P(n,r) without replacement
Results
With Replacement
Arrangements where items can repeat
10,000
10^4
Security Estimate
Time to try all combinations
10 seconds
at 1,000 attempts/second
With Replacement (n^r)
10,000
Without Replacement (n!/(n-r)!)
5,040
Ratio: 1.98x more with replacement
Step-by-Step Calculation
Visual Representation
Each position has 10 choices = 10^4 = 10,000 total
Practical Examples
Click to calculate:
Password Strength Guide
| Character Set | n | 6 chars | 8 chars | 12 chars |
|---|---|---|---|---|
| Digits only (0-9) | 10 | 1M | 100M | 1T |
| Lowercase (a-z) | 26 | 309M | 209B | 95Q |
| Mixed case (a-z, A-Z) | 52 | 19B | 53T | 390Sx |
| Alphanumeric | 62 | 57B | 218T | 3.2Sx |
| All printable | 95 | 735B | 6.6Q | 540Sx |
M = Million, B = Billion, T = Trillion, Q = Quadrillion, Sx = Sextillion
Permutations Comparison
| Type | Order | Replacement | Formula | Result |
|---|---|---|---|---|
| PR (this) | Yes | Yes | n^r | 10,000 |
| P (standard) | Yes | No | n!/(n-r)! | 5,040 |
| CR | No | Yes | C(n+r-1, r) | - |
| C (standard) | No | No | n!/(r!(n-r)!) | - |
Formula Reference
Permutations with Replacement
PR(n, r) = n^r
Order: Yes | Replacement: Yes
Standard Permutations
P(n, r) = n!/(n-r)!
Order: Yes | Replacement: No
Results
Permutations
10,000
10^4
Common Permutation Examples
Quick-start with common scenarios
Practice Permutation Problems
Test your skills with practice problems
Practice with 4 problems to test your understanding.
?How Do You Calculate Permutations with Replacement?
Permutations with replacement count arrangements where items CAN be repeated and order MATTERS. Formula: PR(n,r) = n^r. Example: 4-digit PIN from digits 0-9 = 10^4 = 10,000 possible codes. Each position has n choices, and we have r positions, giving n x n x ... x n = n^r total arrangements.
What are Permutations with Replacement?
Permutations with replacement count the number of ways to arrange r items from n types where each item can be used multiple times and the order matters. The formula PR(n,r) = n^r comes from having n choices for each of r positions. Common examples include PIN codes (each digit 0-9 can repeat), passwords (letters/numbers can repeat), and combination locks (each dial has same options).
Key Facts
- Permutations with replacement allow using the same item multiple times
- Formula: PR(n,r) = n^r (n to the power of r)
- Order MATTERS: 1234 is different from 4321
- Each position has n independent choices
- Used for: PIN codes, passwords, license plates, phone numbers
- 4-digit PIN (0-9): 10^4 = 10,000 combinations
- 6-character password (a-z): 26^6 = 308,915,776 combinations
- Always larger than permutations without replacement when r > 1
Quick Answer
Permutations with replacement count arrangements where items CAN be repeated and order MATTERS. Formula: PR(n,r) = n^r. Example: 4-digit PIN from digits 0-9 = 10^4 = 10,000 possible codes. Each position has n choices, and we have r positions, giving n x n x ... x n = n^r total arrangements.
Frequently Asked Questions
Permutations with replacement count arrangements where items CAN be repeated and order MATTERS. For example, in a 4-digit PIN, each digit can be 0-9 (repeated), and 1234 is different from 4321. Formula: PR(n,r) = n^r.
With digits 0-9 (10 options) and 4 positions: 10^4 = 10,000 possible PINs. Each position has 10 choices, and digits can repeat. At 1 guess per second, it takes ~2.8 hours to try all combinations.
The formula is PR(n,r) = n^r (n to the power of r). This represents n choices for each of r positions, all independent of each other. The formula works because each position multiplies the total by n options.
WITH replacement: items can repeat, formula is n^r. WITHOUT replacement: items cannot repeat, formula is n!/(n-r)!. Example: 4-digit PIN with repeats = 10^4 = 10,000. Without repeats = 10!/6! = 5,040.
Password strength depends on character set (n) and length (r). Lowercase only (26^r): 6 chars = 309M. Add uppercase (52^r): 6 chars = 19B. Add digits (62^r): 6 chars = 57B. Add symbols (95^r): 6 chars = 735B combinations.
Last updated: 2026-01-15
Related Math Tools
Explore similar calculators
How this works
Formulas follow standard definitions from the NIST Digital Library of Mathematical Functions and classical textbook derivations. Calculations run entirely in your browser. Where a closed-form solution exists, it is used; where an iterative or numerical method is required, the implementation is named on the page.
Sources
- [1]NIST Digital Library of Mathematical FunctionsAcademicdlmf.nist.govAccessed Apr 21, 2026

Full-stack software engineer specializing in embedded systems, web architecture, and AI/ML. Founder of Practical Web Tools. Built the gesture-controlled drone IP acquired by KD Interactive (Aura Drone, sold on Amazon).
Results
Permutations
10,000
10^4