Updated Combinatorics Tool

Permutation Calculator

Compute permutations nPr, factorial n! and permutations with repetition n^r. Enter n and r to see step-by-step formulas and numeric results.

nPr Permutations Factorial n! With Repetition n^r Step-by-Step Output

Interactive Permutation Calculator

Use this Permutation Calculator to explore how many ordered arrangements are possible when you choose r items from a set of n. It computes permutations without repetition nPr, permutations with repetition n^r and factorial n! in one place.

The calculator uses P(n, r) = n! / (n − r)! for permutations without repetition and n^r for permutations with repetition. Factorial n! is defined as the product of all integers from 1 to n, with 0! = 1.

Permutation Calculator – Count Ordered Arrangements

This Permutation Calculator helps you quickly count how many ordered arrangements are possible in typical combinatorics problems. By entering the total number of items n and the number selected r, you can see permutations without repetition nPr, permutations with repetition n^r and the factorial n! that underpins both formulas.

Permutations are used whenever order matters. Arranging books on a shelf, assigning finish positions in a race or creating unique ID codes are all examples where permutations show up in the background.

Key Permutation Formulas Used By The Calculator

The tool focuses on three core quantities: factorial n!, permutations without repetition P(n, r) and permutations with repetition n^r. Understanding these formulas makes the numeric output much easier to interpret.

1. Factorial n! – The Building Block

The factorial of a non-negative integer n, written n!, is the product of all whole numbers from 1 to n. By convention, 0! is defined to be 1.

n! = 1 × 2 × 3 × … × n, for n ≥ 1
0! = 1

For example, 5! = 1 × 2 × 3 × 4 × 5 = 120. Factorials grow very quickly, which is why permutation counts can become large even for modest n and r.

2. Permutations Without Repetition – P(n, r)

Permutations without repetition count the number of ways to arrange r distinct items chosen from n distinct items, where each item can be used at most once and order matters. The formula is:

P(n, r) = nPr = n! / (n - r)!

As a concrete example, suppose you have n = 5 people and you want to assign r = 3 different prize positions (gold, silver, bronze). The number of ways to do this is:

P(5, 3) = 5! / (5 - 3)! = 5! / 2! = 120 / 2 = 60

The calculator uses this formula when it computes permutations without repetition and shows the substitution steps with your chosen n and r.

3. Permutations With Repetition – n^r

Permutations with repetition apply when each position can be filled by any of the n items and the same item can be reused across different positions. Each of the r positions in the arrangement has n choices, so the total number of permutations is:

n^r

For example, if you are creating a code of length r = 4 using digits 0–9 (so n = 10) and codes like 0000 or 1122 are allowed, the number of possible codes is:

10^4 = 10,000

The calculator displays this n^r value alongside nPr so you can compare both models for your counting problem.

How The Permutation Calculator Uses These Formulas

When you click the calculate button, the tool performs several steps:

  1. Reads your inputs n and r and checks that they are non-negative integers.
  2. Computes factorial n! where n is not too large for reliable numeric calculation.
  3. Computes permutations without repetition using P(n, r) = n! / (n − r)! if r ≤ n.
  4. Computes permutations with repetition using n^r.
  5. Builds a summary table showing formulas, substitutions and the final results.

If n and r are too large, some values may exceed the numeric range that JavaScript can represent safely. In those cases, the calculator reports that results are too large to display exactly and suggests using smaller inputs or symbolic work.

Permutations Versus Combinations

It is easy to mix up permutations and combinations. The crucial difference is whether the order of selected items matters.

  • Permutations: order matters. ABC and BAC are different permutations.
  • Combinations: order does not matter. ABC and BAC represent the same combination.

The permutation formula P(n, r) = n! / (n − r)! counts ordered selections. The combination formula is:

C(n, r) = n! / [r!(n - r)!]

While this page does not calculate combinations directly, you can use the factorial values displayed to compute C(n, r) by hand if needed.

Permutations With Repeated Items In The Pool

The nPr and n^r formulas assume that the underlying pool of n items is made of distinct items. If some of the items are identical, the total number of distinct permutations can be smaller. In that case a different formula applies:

n! / (n1! · n2! · … · nk!)

Here n is the total number of positions and n₁, n₂, …, nₖ are the counts of each repeated item. For example, the number of distinct permutations of the letters in the word LEVEL is:

5! / (2! · 2!) = 120 / 4 = 30

This multiset permutation formula is explained here for completeness, although the main calculator focuses on the standard nPr and n^r cases.

Typical Uses Of Permutations

  • Arranging people in a line or assigning them to ordered positions.
  • Counting the number of possible rankings in competitions.
  • Designing codes, tickets, ID numbers or passwords where order matters.
  • Analyzing sample spaces in probability where each outcome is an ordered sequence.
  • Planning experiments where different factors appear in specific sequences.

The calculator is a quick way to get the counts for these scenarios without manually expanding factorial products.

How To Use The Permutation Calculator Step-By-Step

  • Enter the total number of distinct items n in the first input box.
  • Enter the number of items chosen or arranged r in the second box.
  • Adjust the decimal places if you expect very large values and prefer scientific notation formatting.
  • Press the calculate button to generate n!, nPr and n^r along with formula steps.
  • Interpret the results based on whether repetition is allowed in your problem and whether the set contains repeated items.

Limitations Of Numeric Permutation Calculations

Permutation values can become extremely large even for moderate n and r. For example, 20! is already over 2.4 trillion trillion. At some point, floating-point arithmetic cannot represent exact integer values, and results may be rounded or reported as very large exponents.

The calculator is designed for typical exam-style and practical problems rather than huge-scale cryptography. For extremely large n and r, symbolic algebra or arbitrary precision software is more appropriate.

Permutation Calculator FAQs

Frequently Asked Questions About Permutations

Learn more about how permutations work, how to apply nPr and n^r, and how to interpret the calculator’s results.

nPr counts permutations without repetition using P(n, r) = n! / (n − r)! and assumes you cannot reuse the same item. n^r counts permutations with repetition, where each of the r positions can use any of the n items independently.

In permutations without repetition you cannot choose more distinct items than exist in the set. If r were greater than n, it would require reusing items, which belongs in the n^r model instead.

The calculator computes factorials up to a practical limit. Beyond that, values may overflow the number range and are reported as too large. For extremely large problems, use symbolic methods or specialized software that supports big integers.

Yes. Along with the final numeric answers, the calculator displays the core formulas, substitutions with your n and r values and a short explanation so you can see how each result was produced.

Ask whether swapping the order of the same items creates a new outcome in your problem. If ABC and BAC count as different outcomes, use permutations. If they count as the same outcome, use combinations instead.