# Permutation and Combination Calculator

Count arrangements and selections of r items from n with exact results: permutations nPr, combinations nCr, permutations with repetition n^r and combinations with repetition C(n + r - 1, r). Enter whole numbers up to 1000 and get every count as an exact integer, with very long results also shown in scientific notation with their digit count. Useful for probability, lottery odds, passwords and combinatorics homework.

## Frequently asked questions

### What is the difference between a permutation and a combination?

A permutation counts ordered arrangements, so picking A then B differs from B then A. A combination counts unordered selections, where only the chosen set matters. That is why nPr is always at least as large as nCr, and nPr equals nCr times the factorial of r.

### What formulas are used?

nPr = factorial(n) / factorial(n - r), nCr = nPr / factorial(r), permutations with repetition are n^r and combinations with repetition are C(n + r - 1, r). The results are computed with exact integer arithmetic, never through floating point factorials. The formulas are listed below the results.

### When should I use repetition?

Use permutations with repetition when items can be reused and order matters, such as a 4 digit PIN from 10 digits, which has 10^4 = 10,000 possibilities. Use combinations with repetition when items can be reused but order does not matter, such as choosing 3 scoops from 5 ice cream flavors, which gives C(7, 3) = 35.

### What happens when r is greater than n?

Without repetition you cannot pick more items than exist, so nPr and nCr are 0. With repetition r may exceed n, and both counts with repetition are still calculated. For example 2 items chosen 5 times with repetition gives 2^5 = 32 ordered outcomes.

### How large can n and r be?

Both can be whole numbers from 0 to 1000. Results can still be enormous, since 1000^1000 has 3001 digits, so the tool computes them with arbitrary precision integers. Values longer than 100 digits are shown in scientific notation with the exact number of digits.

### How do I calculate lottery odds?

For a lottery that draws 6 numbers out of 49 where order does not matter, enter n = 49 and r = 6 and read nCr, which is 13,983,816. Your chance of matching all six with one ticket is 1 in that number. Add bonus balls by multiplying by their own combinations.

### What happens when zero items are chosen?

By convention the factorial of 0 is 1, and there is exactly one way to choose nothing, so nP0 = nC0 = 1 for any n. Also n^0 = 1, including 0^0, which is the standard convention in combinatorics. The tool follows these conventions.

### Why are nCr results symmetrical?

Choosing r items to take is the same as choosing n - r items to leave, so C(n, r) = C(n, n - r). For example C(10, 3) and C(10, 7) are both 120. The tool uses this symmetry to compute large combinations faster.

### Can I use decimals or negative numbers?

No, n and r must be whole numbers of zero or more, because they count items. Decimal or negative inputs are rejected with a message. For the gamma function and non-integer factorials, use the Scientific Calculator.

### How exact are the results?

Every count is exact to the last digit, because the tool multiplies and divides arbitrary precision integers. Results up to 100 digits are shown in full. Longer ones show the leading digits as a power of ten together with the total digit count.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad The agent-ready plugin suite for WordPress.](https://sleekwp.com/?ref=oneclickpro)
