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
- Percentage calculator Work out a percentage of a number, what percent one number is of another, and percentage change.
- Loan and EMI calculator Monthly payment, total interest and total repaid for any loan amount, rate and term.
- BMI calculator Body mass index from height and weight, in metric or imperial, with what the number does and does not mean.
- Tip calculator Work out a tip and split the bill, with the per-person figure rounded sensibly.
- Age calculator Exact age in years, months and days from a date of birth, plus total days and the next birthday.
- Paint calculator How much paint a room needs, allowing for doors, windows and the number of coats.
- Compound interest calculator Growth of a lump sum plus regular contributions, with the interest shown separately.
- Calorie and BMR calculator Resting metabolic rate and daily calorie needs by activity level.
- Dog age calculator A dog's age in human years, using the research formula rather than multiplying by seven.
- Discount calculator Find the sale price and how much you save, including stacked discounts and tax.
Sources
- Calculated on this page — At One Place