At One Place

Permutations and combinations

nPr, nCr, factorials, and whether order matters.

How it works

Calculates permutations, combinations and factorials, with and without repetition.

The distinction is only ever about whether order matters. Permutations count arrangements, so ABC and CBA are different. Combinations count selections, so they are the same. That is why nCr is always the smaller number — it is nPr divided by r factorial, removing the orderings you decided not to distinguish.

A lottery is the everyday case: drawing 6 balls from 49 gives 13,983,816 combinations, because the order they emerge in does not affect the ticket. If order did matter it would be nearly ten billion.

Factorials grow faster than almost anything else. 20! is about 2.4 × 10¹⁸, and 171! overflows a double-precision float entirely, which is why this tool switches to logarithms above that point rather than reporting infinity.

This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected.

Common questions

What is the difference between a permutation and a combination?
Permutations count order as significant; combinations do not. nCr = nPr ÷ r!, which strips out the orderings.
How many lottery combinations are there for 6 from 49?
13,983,816. Order does not matter on a ticket, so it is a combination rather than a permutation.
Why does 0! equal 1?
Because there is exactly one way to arrange nothing, and because it is the value that makes the combination formula work at the boundaries.

Related pages

Sources

  1. Calculated on this page — At One Place

How these figures are compiled and checked