Combinations and Permutations Calculator
Enter n items and r chosen, up to 1,000 each, and get the number of combinations (order does not matter) and permutations (order matters), with and without repetition, plus n factorial. Everything is computed exactly with arbitrary-size integers, so there is no rounding, and the formula for each result is shown. A lottery section turns a pool of n numbers and k picks into odds of 1 in N, the chance for a number of tickets, and the odds of one exact ordered draw. Very large results are shown in scientific notation with their number of digits, and the full number can be copied.
Combinations nCr (order does not matter)
n! ÷ (r! × (n − r)!)
120
3 digits
Permutations nPr (order matters)
n! ÷ (n − r)!
720
3 digits
Combinations with repetition
(n + r − 1)! ÷ (r! × (n − 1)!)
220
3 digits
Permutations with repetition
n^r
1,000
4 digits
Factorial n! (n = 10)
n! = 1 × 2 × … × n, and 0! = 1
3,628,800
7 digits · 3.6288 × 10⁶
Lottery odds
Odds of matching all 6 numbers with one ticket
1 in 13,983,816
Jackpot arithmetic only: bonus balls, smaller prizes and the rules of a particular lottery are not modelled. No ticket is more likely to win than another.
How it works
- Type n, the number of items to choose from, and r, the number you choose (0 to 1,000).
- Read the combinations and permutations, with and without repetition, and the formula under each.
- For a lottery, type the size of the pool, how many numbers are drawn and how many tickets you hold.
- For a very long result, use Copy full number to get every digit.
What people use it for
Counting arrangements
How many 3-person committees from 12 people, or how many podiums from 8 runners.
Lottery and card odds
6 numbers from 49 give 13,983,816 combinations; 5 cards from 52 give 2,598,960 hands.
Checking homework
Verify a textbook answer with exact digits, including factorials far larger than a calculator can show.
Questions
- What are the formulas?
- Combinations without repetition: nCr = n! ÷ (r! × (n − r)!). Permutations without repetition: nPr = n! ÷ (n − r)!. Combinations with repetition: C(n + r − 1, r). Permutations with repetition: n^r. The factorial n! is 1 × 2 × … × n, with 0! = 1. Without repetition r cannot exceed n and the result is shown as 0 when it does. With n = 0, the only count is 1 (for r = 0).
- Why is there a limit of 1,000?
- n and r are limited to whole numbers from 0 to 1,000 so the page stays fast: 1,000! has 2,568 digits and 1,000^1,000 has 3,001. Negative numbers, decimals and letters are refused with a message, since these counts are only defined for whole numbers.
- How are huge numbers displayed?
- Up to 30 digits the number is shown in full with thousands separators. Above that the page shows its first 20 digits, the total number of digits and the value in scientific notation rounded to 6 significant digits, so the display never grows with the number. The Copy full number button copies every digit.
- How do the lottery odds work?
- Picking k numbers out of a pool of n, with no repeats and no order, gives C(n, k) equally likely tickets, so the odds of matching them all with one ticket are 1 in C(n, k). With t different tickets the chance is t ÷ C(n, k). If the order of the draw also had to match, the odds would be 1 in P(n, k) = n! ÷ (n − k)!. This is the jackpot arithmetic only: it ignores bonus balls, partial prizes and anything about a particular lottery, and it does not make any ticket more likely to win.