acalculator

How many permutations are there?

Choose what you are arranging and type n and r, or a word. The permutation calculator gives the exact number of ordered arrangements and the formula with your numbers.

Your numbers

What are you arranging?
Permutations
720

There are 720 permutations (10! ÷ (10 − 3)! = 10! ÷ 7!).

Formula
10! ÷ (10 − 3)! = 10! ÷ 7!

Permutations: 720. There are 720 permutations (10! ÷ (10 − 3)! = 10! ÷ 7!).

How to calculate

Counts permutations exactly: nPr ordered arrangements of r items from n, arrangements with repetition (n^r), or the distinct arrangements of the letters of a word.

Example with the default inputs (What are you arranging? r of n items, Items to choose from (n) 10, Items arranged (r) 3): There are 720 permutations (10! ÷ (10 − 3)! = 10! ÷ 7!).

Method: nPr = n! ÷ (n − r)! = n (n − 1) … (n − r + 1); with repetition, n^r; letters of a word, n! ÷ (n₁! n₂! … nₖ!) where nⱼ counts each repeated letter.

  • n and r are whole numbers from 0 to 1,000. Without repetition, r is at most n.
  • Letters: spaces are ignored and capital and small letters count as the same letter; any other character counts as a letter too.
  • Counts are exact whole numbers; the scientific form is rounded half up to 6 significant digits.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. What are you arranging? r of n items, Items to choose from (n) 12, Items arranged (r) 9 gives Permutations 79,833,600.Source: OpenStax, Algebra and Trigonometry 2e, §13.5 Counting Principles, P(12, 9) = 79,833,600, https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-5-counting-principles
  2. What are you arranging? Letters of a word, Word or letters DISTINCT gives Permutations 10,080, Formula 8! ÷ (2! for I, 2! for T).Source: OpenStax, Algebra and Trigonometry 2e, §13.5 Counting Principles, DISTINCT: 8! ÷ (2! 2!) = 10,080, https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-5-counting-principles
  3. What are you arranging? Letters of a word, Word or letters Mississippi gives Permutations 34,650.Source: NIST DLMF §26.4 Multinomial Coefficients, equation 26.4.2, https://dlmf.nist.gov/26.4
  4. What are you arranging? With repetition, Items to choose from (n) 10, Items arranged (r) 4 gives Permutations 10,000, Formula 10^4.Source: OpenStax, Algebra and Trigonometry 2e, §13.5, https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-5-counting-principles
  5. What are you arranging? r of n items, Items to choose from (n) 52, Items arranged (r) 52 gives In scientific notation 8.06582 × 10⁶⁷.Source: OpenStax, Algebra and Trigonometry 2e, §13.5, https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-5-counting-principles
  6. What are you arranging? r of n items, Items to choose from (n) 7, Items arranged (r) 0 gives Permutations 1, Formula 7! ÷ (7 − 0)! = 7! ÷ 7!.Source: OpenStax, Algebra and Trigonometry 2e, §13.5: P(n, 0) = n! ÷ n! = 1, https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-5-counting-principles

How it works

The calculator has three modes.

r of n items (nPr). The number of ordered arrangements of r items chosen from n different items, each used at most once:

nPr = n! ÷ (n − r)! = n × (n − 1) × … × (n − r + 1)

with 0! = 1, so nP0 = 1 and nPn = n!. When r is more than n there is no answer, with a message that suggests the repetition mode.

With repetition. Each of the r places can take any of the n items: n^r arrangements, with 0⁰ = 1.

Letters of a word. The number of distinct arrangements of all the letters, where a letter used more than once gives no new arrangement when its copies swap places:

n! ÷ (n₁! × n₂! × … × nₖ!)

where n is the number of letters and n₁, …, nₖ are the counts of each letter that appears more than once. Spaces are ignored, capital and small letters count as the same letter, and any other character (a digit or a symbol) counts as a letter of its own. An empty word gives no answer.

Output format. The count is an exact whole number with thousands separators. When it has more than 15 digits, "In scientific notation" also shows it as d.ddddd × 10ⁿ, rounded half up to 6 significant digits, with trailing zeros dropped. "Formula" shows the formula with your numbers: 12! ÷ (12 − 9)! = 12! ÷ 3!, 10^4, or 8! ÷ (2! for I, 2! for T) (repeated letters in the order they first appear).

Assumptions

  • n and r are whole numbers from 0 to 1,000.
  • A word has at most 200 characters.

Worked examples by hand

12P9. 12 × 11 × 10 × 9 × 8 × 7 × 6 × 5 × 4 = 79,833,600.

DISTINCT. 8 letters, with I twice and T twice: 8! ÷ (2! × 2!) = 40,320 ÷ 4 = 10,080.

Mississippi. 11 letters: M once, I 4 times, S 4 times, P twice. 11! ÷ (4! × 4! × 2!) = 39,916,800 ÷ 1,152 = 34,650.

A 4-digit PIN. 10 digits in each of 4 places, repeats allowed: 10⁴ = 10,000.

52P52 (shuffles of a deck). 52! = 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000, about 8.06582 × 10⁶⁷.

7P0. 7! ÷ 7! = 1.

Other questions people ask

What is a permutation?

A permutation is an arrangement of items in order. ABC and CBA are different permutations of the same three letters. When order does not matter, count combinations instead.

What is the nPr formula?

nPr = n! ÷ (n − r)!, the number of ways to fill r ordered places from n different items. It is n × (n − 1) × … × (n − r + 1): 12P9 = 12 × 11 × … × 4 = 79,833,600.

What is the difference between a permutation and a combination?

A permutation counts orders; a combination does not. Choosing 3 of 10 people for gold, silver and bronze is 10P3 = 720. Choosing 3 of 10 for a team is 10C3 = 120, which is 720 ÷ 3!.

How do I count permutations with repetition?

When each of the r places can take any of the n items again, there are n^r arrangements. A 4-digit PIN from the digits 0 to 9 has 10⁴ = 10,000 possibilities.

How many ways can the letters of a word be arranged?

Divide n! by the factorial of the count of each repeated letter. MISSISSIPPI has 11 letters: 4 I, 4 S and 2 P, so 11! ÷ (4! × 4! × 2!) = 34,650 distinct arrangements.

What is 0!, and what is nP0?

0! = 1 by definition, so nP0 = n! ÷ n! = 1: there is exactly one way to arrange nothing. And nPn = n!, every order of all n items.

Why does the calculator say r cannot be more than n?

Without repetition you cannot fill more places than you have different items. Choose "With repetition" if an item can be used more than once.