# Combinations and permutations calculator

> Combinations count ways to choose k items from n when order doesn't matter. Permutations count arrangements when order does matter.

Calculate C(n,k) combinations (order doesn't matter) and P(n,k) permutations (order matters) from n items taken k at a time.

**Interactive version:** https://onlinecalculator.me/math/combinations/
**Category:** Math

## Formulas

```
Combinations: C(n, k) = n! / (k! × (n − k)!)
Permutations: P(n, k) = n! / (n − k)!
```

## Examples

| n | k | C(n,k) | P(n,k) |
|---|---|--------|--------|
| 5 | 2 | 10 | 20 |
| 10 | 3 | 120 | 720 |
| 52 | 5 | 2,598,960 | 311,875,200 |

The 52-choose-5 example is the number of 5-card poker hands from a standard deck (combinations) versus the number of distinct ordered 5-card deals (permutations).

## Frequently asked questions

### What is the difference between combinations and permutations?

Combinations: the order of selection doesn't matter (choosing a committee of 3 from 10 people). Permutations: the order matters (awarding gold, silver, and bronze to 3 from 10 people). C(10,3) = 120; P(10,3) = 720.

### What is the formula for combinations?

C(n,k) = n! / (k! × (n−k)!). This equals P(n,k) / k! because combinations divide out the k! ways to arrange the chosen items.

### What is the formula for permutations?

P(n,k) = n! / (n−k)!. For k = n, this is simply n!.

### What does C(n,0) equal?

C(n,0) = 1 for any n ≥ 0 — there is exactly one way to choose nothing.

### How do I share my calculation?

Click "Share with my numbers" to copy a URL that saves your n and k values.

## Sources

- [Combination (binomial coefficient n!/(k!(n−k)!))](https://en.wikipedia.org/wiki/Combination) — Wikipedia
- [Permutation (ordered selections, n!/(n−k)!)](https://en.wikipedia.org/wiki/Permutation) — Wikipedia

## Related calculators

- [Factorial calculator](https://onlinecalculator.me/math/factorial/) — n! for any non-negative integer.
- [GCD and LCM calculator](https://onlinecalculator.me/math/gcd-lcm/) — Greatest common divisor and least common multiple.
- [Quadratic formula calculator](https://onlinecalculator.me/math/quadratic/) — Roots of ax squared plus bx plus c.
- [Standard deviation calculator](https://onlinecalculator.me/math/standard-deviation/) — Sample and population standard deviation.

---

Part of [onlinecalculator.me](https://onlinecalculator.me/) — free calculators that run entirely in your browser.
Machine-readable index: https://onlinecalculator.me/llms.txt
