Combinations and Permutations Calculator

Inputs

Results

Combinations, order doesn't matter C(n, r)
—
Permutations, order matters P(n, r)
—
Combinations with repetition
—
Permutations with repetition nʳ
—

How many lottery tickets are possible? How many ways can 3 runners finish on the podium out of 10? Enter n and r to count them all.

How to use it

  1. Enter n, the number of items to choose from.
  2. Enter r, how many you choose.
  3. Pick the line that matches your question: does order matter, and can an item be chosen more than once?

Examples:

Questions and answers

When does order matter?

Use permutations when the same items in a different order count as a different result, like race positions or a PIN. Use combinations when only the selection counts, like a lottery ticket or a team.

What are the formulas?

nCr = n! ÷ (r! (n − r)!) and nPr = n! ÷ (n − r)!. With repetition: C(n + r − 1, r) for combinations and nʳ for permutations.

Why are some answers so long?

These numbers grow extremely fast. The page shows the exact value, with a short scientific form first when it has more than 15 digits.

Link with pre-filled values

Add # and these parameters to the end of this page's address to open the tool with values already filled in.

ParameterWhat it sets
nTotal number of items (0–1000).
rNumber of items chosen (0–1000).

Example: https://toolabelle.com/combinations-calculator/#n=49&r=6

Related tools