Permutation and combination calculator

Enter n items and r chosen. You get the number of ordered arrangements (permutations) and unordered selections (combinations), computed exactly and shown in full or in scientific notation when long.

A whole number from 0 to 5,000.
A whole number from 0 to 5,000. Without repetition it cannot exceed n.
Permutations (order matters)720
Combinations (order does not matter)120
Permutation formula
nPr = n! / (n − r)!
Combination formula
nCr = n! / (r! (n − r)!)

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose without or with repetition.
  2. Enter n, the number of items to pick from, and r, the number you pick.
  3. Both counts appear at once, with the formula that produced them.

How it works

Without repetition, nPr is the product n × (n−1) × … × (n−r+1). nCr is built up one factor at a time, each step an exact whole-number division, using the smaller of r and n−r to keep it short. With repetition the tool uses n^r and C(n+r−1, r).

Worked example

Five cards from a standard 52-card deck:

  • Ordered hands: 52 × 51 × 50 × 49 × 48 = 311,875,200.
  • Unordered hands: 311,875,200 / 5! = 311,875,200 / 120 = 2,598,960.

With repetition, a 3-digit code from the digits 0–9 has 10³ = 1,000 possibilities.

Tips

  • Ask yourself whether swapping two chosen items gives a different outcome. If yes, use permutations.
  • A lock “combination” is really a permutation, because order matters.
  • The numbers grow fast: C(100, 50) already has 30 digits.

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation the order matters, so picking A then B differs from B then A. In a combination only the chosen set matters. Choosing 3 people from 10 for a ranked podium has 720 outcomes (permutations); choosing 3 for a committee has 120 (combinations).

What are the formulas for nPr and nCr?

nPr = n! / (n − r)! and nCr = n! / (r! (n − r)!). Every combination can be ordered in r! ways, which is why nCr = nPr / r!.

What changes when repetition is allowed?

Ordered choices with repetition number n^r, since each of the r positions can take any of the n items. Unordered choices with repetition, picking scoops from n flavors, number C(n + r − 1, r).

How are huge results handled?

The tool uses arbitrary-precision integers, so there is no rounding. Results over 24 digits are shown in scientific notation first and the exact digits follow. Copy gives every digit.

What do 0 and r = n give?

Choosing nothing or choosing everything can be done in exactly one way, so nCr is 1 for r = 0 and for r = n. nPn equals n!, and nP0 equals 1.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.