Updated on April 17th, 2026

Permutation Calculator

Created By Jehan Wadia

P(n, r) = n! (n − r)!

P(6, 2)

30

Step-by-Step Solution

Introduction

A permutation is the number of ways you can arrange items from a group when the order matters. For example, if you pick 3 students from a class of 10 to win first, second, and third place, that's a permutation. Choosing Alice, Bob, then Carol is different from choosing Carol, Bob, then Alice. The formula for permutations is P(n, r) = n! / (n - r)!, where n is the total number of items and r is how many you are choosing.

This permutation calculator does the math for you. Just enter your values for n and r, and it will instantly give you the answer. Whether you're working on a homework problem, studying for a test, or solving a real-world counting problem, this tool saves you time and helps you avoid mistakes with large factorials.

How to Use Our Permutation Calculator

Enter the total number of items and how many you want to arrange. The calculator will tell you how many different ordered arrangements (permutations) are possible.

Total Number of Items (n): Type in the total number of items in your set. For example, if you have 10 books on a shelf, enter 10. This is the full group you are choosing from.

Number of Items to Arrange (r): Type in how many items you want to arrange in order. This number must be equal to or less than the total number of items. For example, if you want to arrange 3 books out of 10, enter 3.

What Is a Permutation?

A permutation is an arrangement of items where the order matters. If you pick 3 books from a shelf of 10 and line them up in a row, each different ordering counts as a separate permutation. This is what makes permutations different from combinations, where order does not matter. For example, choosing books A-B-C is the same combination as C-B-A, but they are two distinct permutations.

The Three Types of Permutations

Standard Permutations — P(n, r)

The most common type of permutation answers the question: "How many ways can I arrange r items chosen from a set of n items?" The formula is:

P(n, r) = n! / (n − r)!

The exclamation mark stands for factorial, which means you multiply a number by every whole number below it down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. So if you want to know how many ways you can seat 3 people out of a group of 7 in a row of chairs, you calculate P(7, 3) = 7! / 4! = 7 × 6 × 5 = 210 ways.

Permutations with Repetition

Sometimes you are allowed to pick the same item more than once. A good example is a combination lock with 4 digits, where each digit can be any number from 0 to 9 and digits can repeat. In this case the formula is simply:

P(n, r) = nr

For the lock example, that gives 104 = 10,000 possible codes. Repetition makes the number of arrangements grow very quickly because every position has the full set of choices available.

Permutations with Identical Items (Multiset Permutations)

When some items in your set are identical, you need to divide out the repeated arrangements. Imagine you want to arrange the letters in the word "APPLE." There are 5 letters total, but the letter P appears twice. Without adjusting, you would count some arrangements more than once. The formula is:

P = n! / (n₁! × n₂! × … × nₖ!)

Here, n is the total number of items and n₁, n₂, etc. are the counts of each identical group. For APPLE, that is 5! / (1! × 2! × 1! × 1!) = 120 / 2 = 60 unique arrangements.

Permutations vs. Combinations

The key difference is simple: permutations care about order, combinations do not. Picking players A, B, and C for a team is one combination regardless of order. But assigning them to first place, second place, and third place creates 6 different permutations (3! = 6). If you are counting arrangements, rankings, sequences, or any situation where position matters, you need permutations. If you are just picking a group, you need combinations.

Real-World Uses of Permutations

Connecting Permutations to Other Math Concepts

Permutations are closely tied to several other areas of mathematics. The factorial function at the heart of the permutation formula connects directly to concepts in statistics such as the z-score and standard deviation, where counting methods underpin probability distributions. When analyzing data sets, you might use the interquartile range (IQR) alongside permutation-based probability to understand how likely certain ordered outcomes are.

In algebra, the quadratic formula and permutations both appear frequently in competition mathematics, and understanding factorials helps when expanding binomial expressions. If your problem involves coordinate geometry — for instance, counting paths between points — tools like the distance calculator, midpoint calculator, and slope calculator can complement your combinatorial analysis.

Permutations also play a role in error analysis and experimental design. When measuring how observed results differ from expected values, the percent error calculator and percent change calculator are helpful companions. Meanwhile, the percentage calculator can help you express permutation-based probabilities as easy-to-understand percentages, and the rate of change calculator is useful when studying how the number of permutations grows as n or r increases.

How to Use This Calculator

Select the permutation mode that matches your problem. Enter your values for n (the total number of items) and r (the number you are choosing or arranging). For identical-item permutations, specify how many groups of identical items you have and the count for each group. Press Calculate to see the result, a step-by-step solution, and — for small enough values — a full list of every permutation along with a visual chart.


Frequently Asked Questions

What is the difference between P(n, r) and n^r in this calculator?

P(n, r) = n! / (n − r)! is used when each item can only be picked once. nr is used when items can repeat. For example, if you pick 2 letters from A, B, C without repeats, you get 6 arrangements. With repeats allowed, you get 9 because AA, BB, and CC are now possible too.

What does the exclamation mark (!) mean in the permutation formula?

The exclamation mark means factorial. It tells you to multiply a number by every whole number below it down to 1. For example, 4! = 4 × 3 × 2 × 1 = 24. Also, 0! is always equal to 1. Factorials grow very fast, which is why permutation results get big quickly.

Why does the calculator say r must be less than or equal to n?

In standard permutations (without repetition), you cannot arrange more items than you have. If you only have 5 items, you can't pick and order 6 of them. That's why r must be less than or equal to n. If you need r to be larger than n, switch to the "With Repetition" mode, which allows reuse of items.

What is P(n, 0) and why does it equal 1?

P(n, 0) = 1 for any value of n. This is because there is exactly one way to arrange zero items — you do nothing. The formula confirms this: P(n, 0) = n! / n! = 1.

When should I use the Identical Items mode?

Use the Identical Items mode when some of your items are the same and you want to count only unique arrangements. For example, to find the number of ways to arrange the letters in "BANANA," you have 6 letters but A appears 3 times, N appears 2 times, and B appears 1 time. This mode divides out the duplicates so you don't count the same arrangement more than once.

Why must the sum of groups equal n in Identical Items mode?

Each group represents a type of identical item, and the group counts tell the calculator how many of each type you have. The sum of all groups must equal n because n is the total number of items. If they don't match, the formula won't give a correct answer.

What is the largest value of n this calculator supports?

You can enter values of n up to 9,999. The calculator uses big number math internally, so it can handle very large factorials without losing accuracy. However, the full list of permutations is only shown when the result is small enough (up to 5,000 permutations with n ≤ 8).

Why don't I see the full list of permutations for large values?

Listing every single permutation takes a lot of memory and time. The calculator only shows the full list when the total count is 5,000 or fewer and n is 8 or less. For bigger values, you'll still see the total count and the step-by-step solution, just not every arrangement written out.

How do I calculate P(n, n)?

P(n, n) means you are arranging all n items. The formula simplifies to P(n, n) = n! / 0! = n! / 1 = n!. For example, P(5, 5) = 5! = 120. This gives you the total number of ways to arrange the entire set.

Can I use this calculator for probability problems?

Yes. Many probability problems require you to count how many ordered outcomes are possible. You can use this calculator to find permutations and then divide by the total number of outcomes to get a probability. For example, the chance of guessing a 4-digit PIN is 1 / P(10, 4) with repetition = 1 / 10,000.

What happens if I enter 0 for both n and r?

P(0, 0) = 0! / 0! = 1. There is exactly one way to choose and arrange nothing from nothing. The calculator will return 1.

How is a permutation different from a factorial?

A factorial (n!) counts the ways to arrange all n items. A permutation P(n, r) counts the ways to arrange only r items out of n. A factorial is actually a special case of a permutation: n! = P(n, n). So factorial is the full arrangement, and permutation is a partial one.


Related Calculators

Combination Calculator

Visit Combination Calculator