Home / Math Calculators / Permutation and Combination Calculator

Permutation and Combination Calculator

Calculate nPr and nCr instantly, compare whether order matters, and explore counts with or without repetition using exact integer results.

Enter your values

Number of distinct items available (0–1,000).
Number selected or arranged; without repetition, r cannot exceed n.
When enabled, an item may be selected more than once.
Turn this off if you prefer to calculate only when pressing the button.

Exact integer arithmetic is used for the results. To keep calculations responsive and output manageable, n is limited to 1,000.

Your results

Permutations (nPr) · order matters
720
Ways to arrange 3 items selected from 10.
Combinations (nCr) · order does not matter
120
Ways to choose 3 items from 10.
n factorial (n!)3,628,800
r factorial (r!)6
RelationshipnPr = nCr × r!
RepetitionNot allowed
Permutation counts ordered arrangements; combination counts unordered selections.

Formula and working

nPr = n! / (n − r)! = 10! / 7! = 720
nCr = n! / [r! × (n − r)!] = 10! / (3! × 7!) = 120

What are permutations and combinations?

A permutation counts arrangements where order matters. A combination counts selections where order does not matter. For example, choosing a president and a secretary from a group assigns different roles, so order matters; choosing two people for the same committee does not depend on order.

Formulas without repetition

Permutation: P(n, r) = n! / (n − r)!
Combination: C(n, r) = n! / [r! × (n − r)!]
Factorial: n! = n × (n − 1) × … × 2 × 1, and 0! = 1

Formulas with repetition

Ordered selections: nʳ
Unordered selections: C(n + r − 1, r) = (n + r − 1)! / [r! × (n − 1)!]

When repetition is allowed, the same item may appear more than once. Ordered selections then have n choices for each of r positions. For unordered selections with repetition, the combination formula uses n + r − 1 available positions.

How to use this calculator

  1. Enter n, the total number of available items.
  2. Enter r, the number of items selected or arranged.
  3. Enable repetition if items can be chosen more than once.
  4. Review both nPr and nCr, then read the formula steps.
  5. Use the copy button to copy the results for notes or homework.

Worked example: n = 5 and r = 2

Without repetition, P(5, 2) = 5 × 4 = 20 ordered arrangements. C(5, 2) = 5! / (2! × 3!) = 10 unordered selections. There are twice as many permutations because each selected pair can be arranged in 2! ways.

Frequently asked questions

What is the main difference between nPr and nCr?

nPr counts arrangements where order matters. nCr counts selections where order does not matter. With the same n and r and no repetition, nPr = nCr × r!.

Can r be greater than n?

Without repetition, r must be less than or equal to n because an item cannot be selected more than once. With repetition allowed, r can be greater than n.

What does factorial mean?

The factorial of a non-negative integer n, written n!, is the product n × (n−1) × … × 1. By definition, 0! = 1.

When should I allow repetition?

Allow repetition when each pick can reuse an item, such as creating a code where digits may repeat. Leave it off when each item can be used only once, such as choosing people from a group.

Why can the result become very large?

Factorials and counting results grow quickly as n increases. This calculator uses exact integer arithmetic, so large results may contain many digits.

What are common real-life uses?

Permutations are useful for rankings, schedules, and assigning distinct roles. Combinations are useful for teams, committees, card hands, and selecting a group when order is irrelevant.

Use the permutation formula when changing the order creates a different outcome; use the combination formula when only the selected group matters.