🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
STATISTICS

Permutation Calculator — nPr, with and without repetition

Count the ordered arrangements of r items chosen from n, compare repetition against no repetition, and see how far apart the two answers are.

The size of the pool you are choosing from. Must be a whole number of zero or more.
How many you select and place in order. Without repetition r cannot exceed n.
A padlock code allows repetition. Handing out distinct prizes does not.
Circular arrangements divide by r, because rotating the whole circle changes nothing.
Counting problems grow fast, and past about 10¹⁵ no ordinary number type stays exact.
Permutations
0
 
0
nPr — no repetition
0
n^r — with repetition
0
nCr — order ignored
0
r! — orderings per selection
Tip: if swapping two chosen items produces a different outcome, you want a permutation. If it produces the same outcome, you want a combination.
Advertisement

A permutation is an ordered arrangement. Choosing three runners from ten for gold, silver and bronze is a permutation, because who gets which medal matters. This permutation calculator returns nPr for selections without repetition, n^r when items may repeat, the circular variant where only relative order counts, and the corresponding combination count so you can see exactly how much the ordering requirement multiplies the answer by.

Arb Digital publishes it because the arithmetic is never the hard part of a counting problem. Deciding whether order matters and whether repetition is allowed is the hard part, and getting either one wrong changes the answer by a factor of hundreds. Most of this page is about making that decision correctly, with the calculator handling the multiplication once you have.

What This Permutation Calculator Does

It computes the number of ordered selections of r items from a pool of n, in four variants: linear without repetition (nPr), linear with repetition (n^r), circular without repetition, and circular with repetition. Alongside the headline it always shows the unordered combination count nCr and the factor r! that separates the two, because seeing them together is what makes the relationship stick. Results that exceed exact integer precision are reported in scientific notation rather than silently rounded to a wrong-looking whole number.

Ordering is precisely the boundary against our binomial coefficient calculator, which returns nCr — the count when the order of the chosen items is irrelevant — and does not handle ordered arrangements or repetition at all. The two counts differ by exactly r!, and this page shows that factor explicitly.

How to Use It

  1. Set n to the size of the pool. This is everything you could choose from, not the number you are choosing.
  2. Set r to how many you are placing. Without repetition r must be no larger than n; the calculator says so rather than returning zero without explanation.
  3. Decide on repetition. Ask whether the same item can be used twice. A four-digit PIN can; a seating plan cannot.
  4. Choose line or circle. Use circular only when rotating the whole arrangement produces something you would call identical.
  5. Compare the grid figures. The gap between nPr and nCr is r!, and the gap between nPr and n^r shows how much repetition adds.

The Formulas and How It's Calculated

Without repetition the reasoning is sequential. There are n choices for the first position, n − 1 for the second because one item is now used, n − 2 for the third, and so on for r positions. Multiplying gives nPr = n! ÷ (n − r)!, which is just shorthand for that product of r descending factors. With repetition nothing is consumed, so every position has all n choices and the count is simply n^r.

Take the defaults, n = 10 and r = 3. Without repetition: 10 × 9 × 8 = 720. With repetition: 10³ = 1,000. The combination count is 720 ÷ 3! = 720 ÷ 6 = 120, which says there are 120 possible sets of three runners and six ways to award medals within each set. Those two multiply back to 720, which is the fastest check on any answer of this kind.

Circular arrangements divide by the number of rotations. Seating r people around a round table gives (r − 1)! distinct arrangements rather than r!, because rotating everybody one seat clockwise produces the same neighbours. When selecting r from a larger pool of n and arranging them in a circle, the count is nPr ÷ r. The formal definition of a permutation as a one-to-one mapping of a set onto itself, along with cycle structure and parity, is set out in section 26.13 of the NIST Digital Library of Mathematical Functions.

Advertisement

The One Question That Decides Everything

Before any formula, ask this: if I swap two of the items I have chosen, is the result a different outcome? If yes, order matters and you need a permutation. If no, order does not matter and you need a combination. Gold and silver swapped is a different result, so medals are permutations. Two people on the same committee swapped is the same committee, so committees are combinations.

The error is nearly always in one direction — using combinations where order genuinely matters — and it understates the count by a factor of r!. At r = 3 that is a factor of 6, at r = 5 it is 120, and at r = 10 it is over three and a half million. In probability problems the mistake usually cancels if you make it consistently in both numerator and denominator, which is why it can survive undetected for a long time before producing a badly wrong answer.

Repetition Changes the Growth Rate, Not Just the Total

With repetition the count is exponential in r: each extra position multiplies the total by n, forever. Without repetition the pool shrinks with every pick, so growth slows and stops dead at r = n. For small r the two are close — 10 × 9 = 90 against 10² = 100 — but the gap widens quickly. At r = 5 from 10 items the counts are 30,240 and 100,000; at r = 8 they are 1,814,400 and 100,000,000.

This is exactly why password strength is quoted with repetition allowed. A password may reuse characters, so the space is n^r and every added character multiplies it by the size of the alphabet. Removing repetition would shrink the space and, worse, leak information: an attacker who knew characters never repeated could prune the search. The same exponential structure underlies our exponent calculator, which handles the powers directly when the counting context is not needed.

Repeated Items in the Pool Itself

There is a third case the formulas above do not cover, and it catches almost everyone: the pool contains duplicates. Arranging all the letters of a word like BANANA is not 6! = 720, because swapping the two Ns produces something indistinguishable. The correct count divides by the factorial of each repeat count: 6! ÷ (3! × 2! × 1!) = 720 ÷ 12 = 60, since there are three As, two Ns and one B.

The general rule is n! divided by the product of the factorials of the group sizes, and it is called a multiset permutation. This page assumes distinct items, so if your pool has duplicates, compute the arrangement count with all items treated as distinct and then divide by the factorials of the repeat groups yourself. The factorial calculator handles those correction factors.

From Counting to Probability

Counting is the engine underneath most exact probability calculations. If every arrangement is equally likely, the probability of a particular outcome is the number of arrangements that produce it divided by the total number of arrangements. Drawing three cards in a specific order from a standard deck gives 52 × 51 × 50 = 132,600 ordered outcomes, so one specified sequence has probability 1/132,600.

The trap is mixing conventions between numerator and denominator. If you count the favourable outcomes as ordered, the total must be ordered too. Counting one as ordered and the other as unordered introduces a factor of r! that has no business being there, and it is the most common source of wrong answers in exam probability questions. Our probability calculator handles the event arithmetic once the counts are established.

Why the Numbers Get Astronomical So Fast

Factorial growth outruns everything. There are 3,628,800 orderings of ten items, but 2.43 × 10¹⁸ orderings of twenty, and 52! — the number of ways a deck of cards can be arranged — is about 8 × 10⁶⁷. That is why any well-shuffled deck has almost certainly never existed in that order before in human history.

Practically, this means brute force stops working almost immediately. Checking every route between 10 cities is trivial; every route between 20 is beyond any computer that will ever be built. It also means ordinary double-precision arithmetic loses exactness past about 9 × 10¹⁵, which is why this calculator switches to scientific notation and says so rather than displaying a long integer whose final digits are fiction. Counting principles at this scale, together with the permutation and combination rules behind them, form a core unit of the MIT OpenCourseWare 6.042J Mathematics for Computer Science course.

Testing too many variants at once?

Arb Digital sizes multivariate tests against the number of combinations they actually create, so the experiment can finish before the quarter does.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Using combinations when order matters — this understates the count by exactly r!, which is a factor of 120 at r = 5.
  • Allowing repetition without checking — ask whether the same item can occupy two positions before choosing a formula.
  • Ignoring duplicates in the pool — identical items make some arrangements indistinguishable, and the total must be divided by the factorial of each repeat group.
  • Setting r greater than n without repetition — you cannot place more distinct items than you have, and the count is zero.
  • Mixing ordered and unordered counts in one probability — the numerator and denominator must use the same convention or a stray r! survives into the answer.

Related Free Tools From Arb Digital

Count unordered selections with the binomial coefficient calculator, compute a single factorial with the factorial calculator, model repeated independent trials with the binomial distribution calculator, or weight outcomes by value with the expected value calculator. The full free online tools hub lists every statistics tool we publish.

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation counts ordered arrangements, so swapping two chosen items gives a different outcome. A combination counts selections where order is irrelevant. The permutation count is always r! times the combination count.

What does nPr mean?

It is the number of ways to choose r items from n and place them in order, calculated as n factorial divided by (n − r) factorial. It is the same as multiplying r descending factors starting at n.

How does repetition change the formula?

With repetition allowed nothing is used up, so every position still has all n options and the count is n to the power of r. Without repetition the pool shrinks by one at each step.

Can r be larger than n?

Only when repetition is allowed. Without repetition you cannot place more distinct items than exist in the pool, so the count is zero and the calculator says so.

What is a circular permutation?

An arrangement around a circle where only relative order matters, because rotating everyone by one place gives the same arrangement. Seating r people at a round table gives (r − 1) factorial distinct arrangements.

How do I handle repeated items in the pool?

Divide the total arrangements by the factorial of each repeat group. Arranging the six letters of BANANA gives 6 factorial divided by 3 factorial times 2 factorial, which is 60 rather than 720.

Why does the answer switch to scientific notation?

Because counting problems outgrow exact integer arithmetic quickly. Past roughly nine quadrillion the digits would no longer be reliable, so the result is shown as a power of ten instead of a false exact figure.

This page explains a mathematical method for study and for checking your own working. It is not a substitute for showing your method, and it is not medical, legal, or financial advice.

Advertisement
Advertisement

Take it further