# Combination & Permutation Calculator

Free combination and permutation calculator. Calculate nCr (combinations) and nPr (permutations) with step-by-step formulas.

## What this calculates

Calculate the number of combinations (nCr) and permutations (nPr) for choosing r items from a set of n items. Combinations ignore order; permutations consider order.

## Inputs

- **n (total items)** — min 0, max 170 — The total number of items in the set. Maximum 170 to avoid overflow.
- **r (items chosen)** — min 0 — The number of items to select from the set.

## Outputs

- **Combinations nCr** — Number of ways to choose r items from n (order does not matter).
- **Permutations nPr** — Number of ways to arrange r items from n (order matters).
- **Combination Formula** — formatted as text — The combination formula and calculation.
- **Permutation Formula** — formatted as text — The permutation formula and calculation.
- **n!** — formatted as text — The factorial of n.

## Details

Combinations and permutations are fundamental concepts in counting and probability.

Permutations (order matters)

nPr = n! / (n-r)!

A permutation counts the number of ways to arrange r items selected from n items. The order of selection matters: ABC is different from BCA.

Combinations (order does not matter)

nCr = n! / (r! × (n-r)!)

A combination counts the number of ways to choose r items from n items without regard to order: {A,B,C} is the same as {B,C,A}.

Key Relationship

nPr = nCr × r!

Because each combination of r items can be arranged in r! different orders.

Examples

- Lottery (6 from 49, order irrelevant): C(49,6) = 13,983,816

- Podium finishes (3 from 10 runners): P(10,3) = 720

- Choosing a committee of 4 from 20 people: C(20,4) = 4,845

- Arranging 5 books on a shelf from 8: P(8,5) = 6,720

## Frequently Asked Questions

**Q: What is the difference between a combination and a permutation?**

A: A permutation cares about order (ABC is different from BAC), while a combination does not (ABC is the same as BAC). Use permutations when arrangement matters (like race placements). Use combinations when only selection matters (like lottery numbers or committee members).

**Q: What is a factorial?**

A: A factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. Factorials grow extremely fast: 10! = 3,628,800 and 20! = 2,432,902,008,176,640,000.

**Q: Why is 0! equal to 1?**

A: By convention, 0! = 1. This makes the combination and permutation formulas work correctly for edge cases. For example, C(n,0) = n! / (0! × n!) = 1, which correctly states there is exactly one way to choose nothing from a set. It also follows from the recursive definition: n! = n × (n-1)!, so 1! = 1 × 0!, meaning 0! = 1.

**Q: How many combinations are in a standard lottery?**

A: It depends on the lottery format. For Powerball (5 from 69, plus 1 from 26): C(69,5) × 26 = 292,201,338. For a simple 6-from-49 lottery: C(49,6) = 13,983,816. These large numbers show why winning the lottery is extremely unlikely.

---

Source: https://vastcalc.com/calculators/statistics/combination-permutation
Category: Statistics
Last updated: 2026-04-21
