Tested tool guide
Tested browser tools
Checked August 16, 2026
What Permutation & Combination Calculator does, with a checked example
Given a set size n and a selection size r, this calculator returns the two counting numbers built on factorials: nPr, the ordered ways to choose r items, and nCr, the ways when order does not matter. The factorial expansion is written out for each, so the arithmetic can be checked line by line. The mistake most people make is computing the wrong one of the two: whether order matters is the entire difference, and nPr is always nCr times r!. Scale is the other surprise - 8P3 is 336, while 20P10 is past 670 billion, so a result that looks too large is often exactly right.
Worked example
A concrete input and expected output from the current implementation.
->
Expected output
nPr (permutations): 8P3 = 8! / (8 - 3)! = 40320 / 120 = 336
nCr (combinations): 8C3 = 8! / (3! x (8 - 3)!) = 40320 / (6 x 120) = 40320 / 720 = 56
Ordered picks fill 3 slots with 8, then 7, then 6 choices, giving 8 x 7 x 6 = 336. Combinations count the 3! = 6 orderings of the chosen trio as one result, so 336 / 6 = 56. The pair always differs by exactly r!.