# Permutation & Combination Calculator

> Permutation and combination calculator: exact nPr and nCr (with or without repetition) for any n and r, with factorial formulas and steps.

Interactive calculator: https://calculatorsplatform.com/c/permutation-combination/
Category: Math & Statistics Calculators
Calculations run in the browser; inputs can be prefilled through URL parameters and shared with the Share button.

## Permutations vs combinations

Both count ways to choose r items from a set of n distinct items. The difference is whether **order matters**:

- A **permutation** is an ordered arrangement. Gold, silver and bronze for 3 of 10 runners is a permutation — Alice-Bob-Chen is different from Chen-Bob-Alice.
- A **combination** is an unordered selection. Picking 3 of 10 people for a committee is a combination — the same three people form the same committee in any order.

Because every group of r items can be ordered in r! ways, there are always r! times as many permutations as combinations.

## Formulas

> nPr = n! ÷ (n − r)!

> nCr = n! ÷ (r! × (n − r)!)

When items can be reused (repetition allowed):

> permutations with repetition = n^r

> combinations with repetition = (n + r − 1)! ÷ (r! × (n − 1)!)

Here n! (n factorial) is n × (n − 1) × … × 2 × 1, and 0! = 1. Factorials grow extremely fast — 20! is already 2.4 quintillion — so the calculator uses exact big-integer arithmetic instead of floating-point numbers, which lose precision after about 15 digits.

## Example: choosing 3 from 10

1. Permutations: 10P3 = 10 × 9 × 8 = **720** ordered podium results.
2. Each group of 3 can be ordered 3! = 6 ways.
3. Combinations: 10C3 = 720 ÷ 6 = **120** possible committees.

With repetition allowed, a 3-character code from 10 digits has 10³ = 1,000 possibilities, and choosing 3 scoops from 10 ice-cream flavors (repeats allowed, order irrelevant) gives C(12, 3) = 220 options. Other famous counts: a 5-card poker hand from 52 cards is 52C5 = 2,598,960, and a 6/49 lottery has 49C6 = 13,983,816 combinations.

## Which one should I use?

Ask: *if I swap two of the chosen items, is it a different outcome?* If yes (rankings, passwords, seating plans, race finishes), use permutations. If no (teams, hands of cards, pizza toppings, lottery numbers), use combinations. Then ask whether an item can be chosen more than once (digits in a PIN can repeat; people on a committee cannot). These counts are the building blocks of probability — see the [probability calculator](https://calculatorsplatform.com/c/probability/) to turn them into odds.

## Frequently asked questions

### What is the difference between nPr and nCr?

nPr counts ordered arrangements and nCr counts unordered selections. nPr = nCr × r!.

### Why is 0! equal to 1?

There is exactly one way to arrange zero items (do nothing), and defining 0! = 1 keeps formulas like nCn = 1 consistent.

### How many combinations does a 4-digit PIN have?

Digits can repeat and order matters, so it is 10⁴ = 10,000 permutations with repetition.

### Can r be larger than n?

Only when repetition is allowed. Without repetition you cannot pick more items than exist, so nPr and nCr are 0.

## Related calculators

- [Probability Calculator](https://calculatorsplatform.com/c/probability/index.md)
- [Random Number Generator](https://calculatorsplatform.com/c/random-number/index.md)
- [Scientific Calculator](https://calculatorsplatform.com/c/scientific/index.md)
- [Fraction Calculator](https://calculatorsplatform.com/c/fraction/index.md)
- [Exponent Calculator](https://calculatorsplatform.com/c/exponent/index.md)
- [Standard Deviation Calculator](https://calculatorsplatform.com/c/standard-deviation/index.md)

---
Source: CalculatorsPlatform (https://calculatorsplatform.com/c/permutation-combination/). Last reviewed 2026-11-25. Please link to the calculator page when citing.
