Permutations, anagrams and arrangements with an exact result.
A permutation counts the ordered arrangements of the elements of a set, where order matters: AB and BA are different outcomes. Choosing r out of n elements without repeating gives P(n, r) = n! / (n − r)!, also called a partial permutation or arrangement; ordering all n gives n!. With repetition each of the r positions has n options and the total is nʳ. The calculator uses BigInt and descending products (no giant factorials), accepts n up to 5000 and also covers anagrams of words with repeated letters (n! divided by the factorial of each repeat), circular permutations (n−1)!, derangements !n and the combination versions. It shows the formula, the step by step working, the five results for the same n and r, a list of every case in order (exportable as TXT and CSV) and turns the total into a probability, with password, PIN and anagram examples.
How to use
Enter n and r, pick the permutation type and read the result.
Pick the type (Permutation P(n,r) is preselected) and enter n, the total number of elements, and r, how many positions are filled.
For anagrams, switch to "Anagrams" and type a word (e.g. ANANAS) or the counts (3, 2, 1). Read the exact result and the step by step working.
List the cases in order to copy or download as TXT or CSV, compare with combinations in the all results panel, and use the password and PIN examples to see the probability.
The formulas
How P(n,r), n! and the variations are computed
Without repetition, P(n, r) = n! / (n − r)! = n · (n−1) · … · (n − r + 1). In practice it is a product of r descending factors, and the tool computes exactly that without building the whole n!. If r = n, P(n, n) = n!. The link to combinations is P(n, r) = C(n, r) · r!.
With repetition, each position picks among n options independently: PR(n, r) = nʳ. When some items are identical (anagrams), divide n! by the factorial of each repeated count: n! / (n₁! · n₂! · … · nₖ!). For circular permutations fix one element and order the other n − 1: (n−1)!.
A podium with 8 runners (3 ordered places): P(8, 3) = 8 · 7 · 6 = 336. Anagrams of ANANAS: 6 letters with A three times and N twice, so 6! / (3! · 2! · 1!) = 720 / 12 = 60. Anagrams of MISSISSIPPI: 11! / (4! · 4! · 2! · 1!) = 34,650.
A round table with 5 people: (5 − 1)! = 24 seatings. Secret Santa with 5 people where nobody draws themselves: !5 = 44 valid draws out of 120 possible (about 36.7%). As n grows that share approaches 1/e, about 36.79%.
Details and uses
Edge cases and applications
Without repetition r cannot exceed n. With repetition it can, and nʳ grows quickly: an 8-character password over 62 symbols has 62⁸ = 218,340,105,584,896 possibilities. The tool shows the scientific notation and digit count for huge results and copies the whole number.
Permutations show up in sorting algorithm analysis, cryptography and password counting, task scheduling, card games and any problem where the final order changes the answer.
Without repetition requires r ≤ n; with repetition it does not.
Tool limit: n and r up to 5000, always with an exact result.
Embed
Use this tool on your site
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
A permutation is an ordered arrangement of elements, where order matters. When you order all n elements, the total is n! (5 different books on a shelf: 5! = 120). When you choose and order only r of them, it is a partial permutation, P(n, r) = n! / (n − r)!. Example: 3 ordered letters out of A, B, C and D gives P(4, 3) = 4 · 3 · 2 = 24.