House of Calculator

Enter n items and r chosen, then pick whether order matters and whether repeats are allowed. The calculator gives the exact count and shows the formula it used.

Results are estimates for planning. Check the figures before you make a financial or health decision.

How the Permutations and combinations works

A permutation counts arrangements, so order matters. A combination counts selections, so order does not. The formulas, with n items and r chosen, are:

  • Permutations, no repetition (nPr): n! ÷ (n − r)!
  • Combinations, no repetition (nCr): n! ÷ (r! × (n − r)!)
  • Permutations with repetition: n^r
  • Combinations with repetition: (n + r − 1)! ÷ (r! × (n − 1)!)

The calculations use whole-number big arithmetic, so results are exact rather than rounded. Numbers up to 40 digits are shown in full with commas; longer ones are shown in scientific form with the digit count.

n and r must be whole numbers from 0 to 1,000. Without repetition, r cannot be larger than n. Both nPr and nCr are listed whichever you choose, along with n factorial, so you can compare them. By convention 0! equals 1.

Worked example

Using the default values in the calculator above:

InputValue
Number of items to choose from (n)10
Number chosen (r)3
Does order matter?Yes: permutations (nPr)
Can items repeat?No repetition

Permutations, n = 10, r = 3: 720

Formulan! ÷ (n − r)! = 10! ÷ 7!
Permutations (nPr)720
Combinations (nCr)120
n! (n factorial)3,628,800

Tips and common mistakes

To decide which one you need, ask whether swapping two chosen items gives a different outcome. A PIN code or a race podium is a permutation. A lottery ticket or a hand of cards is a combination.

“Repetition” means the same item can be picked more than once, as with the digits of a PIN. Choosing from n items r times with repeats allowed and order mattering gives n^r. If your answer seems too big, check that you have not set order to matter when it does not.

Frequently asked questions

What is the difference between nPr and nCr?

nPr counts ordered arrangements and nCr counts unordered selections. nPr is always r! times larger than nCr when there is no repetition.

What does 0! equal?

By convention 0! is 1. This keeps the formulas working, for example choosing all n items from n gives n! ÷ (n! × 1) = 1 combination.

Why are there limits on n and r?

Factorials grow very quickly, so the tool caps n and r at 1,000 to keep the exact result a sensible size and fast to compute.

Related calculators