Permutations with Repetition Calculator
Calculate the number of permutations with repetition (ordered arrangements with replacement) using the formula n^r. Enter the number of items and positions to get instant results with step-by-step solutions, slot-machine visualizations, comparisons to other counting methods, and real-world examples like passwords, PIN codes, and license plates.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Permutations with Repetition Calculator
The Permutations with Repetition Calculator computes the number of ordered arrangements when items can be selected more than once, using the formula nr. Enter the number of available items (n) and the number of positions to fill (r) to instantly get the total count, a step-by-step solution, an interactive slot-machine visualization, comparisons with other counting methods, growth tables, and real-world analogies. This tool supports both small and astronomically large values.
What Are Permutations with Repetition?
Permutations with repetition (also called ordered arrangements with replacement or r-tuples) count the number of ways to fill r ordered positions using n distinct items, where each item may be used any number of times. The result is nr because each of the r positions independently has n choices.
For example, creating a 4-digit PIN code from digits 0–9: each of the 4 positions can be any of 10 digits, giving 104 = 10,000 possible PINs. The code "1111" is valid (all positions use the same digit), and "1234" is different from "4321" (order matters).
The Formula: nr
The formula follows directly from the multiplication principle (also called the fundamental counting principle):
- Position 1 has n choices
- Position 2 has n choices (items can repeat)
- Position 3 has n choices
- … and so on for all r positions
Total arrangements = n × n × n × … × n (r times) = nr
Permutations with Repetition vs. Other Counting Methods
There are four main counting formulas in combinatorics. Understanding when to use each one depends on two questions: Does order matter? and Can items repeat?
- Permutations with repetition (nr) — order matters, repetition allowed. Example: PIN codes, passwords.
- Permutations without repetition (n!/(n−r)!) — order matters, no repetition. Example: race finishing positions.
- Combinations without repetition (C(n,r) = n!/(r!(n−r)!)) — order doesn't matter, no repetition. Example: lottery draws.
- Combinations with repetition (C(n+r−1,r)) — order doesn't matter, repetition allowed. Example: choosing scoops of ice cream.
Common Real-World Applications
- PIN Codes and Passwords: A 4-digit PIN using 0–9 has 104 = 10,000 possibilities. An 8-character password using 62 characters (a–z, A–Z, 0–9) has 628 ≈ 218 trillion possibilities.
- Binary Strings: An 8-bit byte has 28 = 256 possible values. A 32-bit integer has 232 ≈ 4.3 billion values.
- Dice Rolls: Rolling a standard 6-sided die 3 times gives 63 = 216 possible outcome sequences.
- License Plates: A plate with 6 alphanumeric positions using 36 characters gives 366 ≈ 2.18 billion unique plates.
- Multiple Choice Tests: A 20-question test with 4 options per question has 420 ≈ 1.1 trillion possible answer sheets.
- Genetic Sequences: DNA sequences of length r using 4 nucleotides (A, T, C, G) have 4r possible sequences.
Why nr Grows So Fast
Exponential growth is extremely powerful. Even small increases in n or r lead to enormous results:
- Doubling r squares the result: n2r = (nr)2
- Adding 1 to r multiplies the result by n: nr+1 = n × nr
- This is why longer passwords are exponentially more secure — each extra character multiplies the search space by n
Special Cases
- n0 = 1 — There is exactly one way to fill zero positions: do nothing (the empty arrangement).
- n1 = n — Filling one position simply means choosing one of n items.
- 1r = 1 — If there is only one item, every position must use it, giving one arrangement.
- 2r — Binary strings of length r. This equals the number of subsets of an r-element set.
How to Use This Calculator
- Enter n, the total number of distinct items available to choose from (e.g., 10 for digits 0–9, 26 for letters A–Z).
- Enter r, the number of positions or slots to fill. Each position can use any of the n items, including items already used elsewhere.
- Click "Calculate Permutations" to compute the result.
- Review the step-by-step solution, slot visualization, comparison table, growth charts, and real-world analogies.
- Use the quick scenario buttons to explore common real-world examples.
Frequently Asked Questions
What are permutations with repetition?
Permutations with repetition are ordered arrangements where each item can be selected more than once. The formula is nr, where n is the number of items to choose from and r is the number of positions to fill. For example, a 4-digit PIN code using digits 0–9 has 104 = 10,000 possible arrangements.
What is the difference between permutations with and without repetition?
In permutations without repetition, once an item is used it cannot be used again, giving n!/(n−r)! arrangements (and requiring r ≤ n). With repetition, each item can be reused in any position, giving nr arrangements. Permutations with repetition always produces a larger or equal result because there are no restrictions on reuse, and r can exceed n.
When should I use permutations with repetition?
Use permutations with repetition when (1) order matters (the arrangement ABC is different from CBA) and (2) items can be reused (the same item can appear in multiple positions). Common examples include PIN codes, passwords, dice rolls, license plates, binary strings, and genetic sequences.
Can r be larger than n?
Yes. Unlike permutations without repetition (which requires r ≤ n), permutations with repetition allows r to be any non-negative integer. A 10-character password drawn from 26 letters (r = 10, n = 26) has 2610 ≈ 141 trillion possibilities.
What is the formula for permutations with repetition?
The formula is nr (n raised to the power r), where n is the number of distinct items available and r is the number of positions to fill. This follows from the multiplication principle: each of the r positions has n independent choices, so the total is n × n × … × n (r times).
Reference this content, page, or tool as:
"Permutations with Repetition Calculator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-04-16
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.