All tools · Utilities

Combinations & Permutations

nCr and nPr for choosing from a set.

Free to use, no sign-up required. Combinations & Permutations is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Counts how many ways you can choose r items from n, both when order does not matter (combinations, nCr) and when it does (permutations, nPr).

How to use Combinations & Permutations

  1. Enter n (total), the size of the whole set.
  2. Enter r (chosen), how many you pick.
  3. Read Combinations (nCr) when order is ignored, and Permutations (nPr) when order matters.

How it works

nPr = n × (n − 1) × … × (n − r + 1), and nCr = nPr ÷ r!. Both are computed with exact whole-number arithmetic, so every digit is correct even for very large results. Inputs are rounded down to whole numbers, r must be between 0 and n, and n can be at most 170.

Example

Choosing 5 cards from a 52-card deck gives 52 × 51 × 50 × 49 × 48 = 311,875,200 ordered picks. Dividing by 5! = 120 gives 2,598,960 possible poker hands.

Questions about Combinations & Permutations

Is a lottery draw a combination or a permutation?

A combination, because the numbers on your ticket count as a match in any order. A race finishing order or a PIN is a permutation, because the same items in a different order are a different result.

Why is nCr always smaller than nPr?

Each group of r items can be arranged in r! orders. Permutations count every order separately, and combinations count the group once.

Use it from chat

You do not have to open Combinations & Permutations to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools