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).
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.
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.
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.
Each group of r items can be arranged in r! orders. Permutations count every order separately, and combinations count the group once.
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.