Permutation and Combination Calculator
Calculate permutations (nPr), combinations (nCr) and factorials, with or without repeats, with exact results for very large numbers.
Reviewed 23 November 2026 · Free · No account needed
How to use
- Enter n, the number of items to choose from, and r, the number you choose.
- Turn on Allow repeats if an item can be chosen more than once, such as the digits of a PIN.
- Read the permutations (order matters) and combinations (order does not matter).
- Copy a result to get every digit, even when the number is very long.
Example
Input: Choose 5 cards from a deck of 52
Output: 2,598,960 combinations and 311,875,200 permutations
How it works
The calculator uses exact big-integer arithmetic. Permutations count ordered selections and combinations count unordered ones. Combinations are built up one step at a time so that every intermediate value is a whole number and no huge factorial has to be divided.
nPr = n! ÷ (n − r)!. nCr = n! ÷ (r! × (n − r)!). With repeats: permutations = n^r and combinations = C(n + r − 1, r).
Choosing 5 cards from 52: nPr = 52 × 51 × 50 × 49 × 48 = 311,875,200 ordered hands, and nCr = 311,875,200 ÷ 5! = 311,875,200 ÷ 120 = 2,598,960 hands where order does not matter.
Limits and edge cases
- n and r must be whole numbers up to 1,000. Without repeats, r cannot be larger than n.
- Very long numbers are shortened on screen. The copy button copies every digit.
- Permutations of a set with identical items and circular arrangements are not covered.
- Results are exact. There is no rounding or floating point error.
- 0! is 1, and choosing 0 items from any n gives exactly 1 way.
- nCr equals n choose (n − r), so choosing 3 from 10 and choosing 7 from 10 are the same number.
- With repeats and n equal to 0, there is 1 way only if r is also 0.
- 100! has 158 digits and 1,000! has 2,568. They are shown as the first and last digits, with the length.
Privacy
Everything is calculated in this browser tab. The numbers and dates you enter are never sent to a server or stored.
About this page
Written and reviewed by Toolnexo on 23 November 2026. The limits above describe the published tool, not an idealised version of it. If a result looks wrong or the page is unclear, email [email protected] with the tool URL and what you entered. Corrections are published here.
Related tools
Questions about Permutation and Combination Calculator
What is the difference between a permutation and a combination?
A permutation counts selections where order matters, such as a race finishing order or a PIN. A combination counts selections where order does not matter, such as a hand of cards or a lottery ticket.
How many ways can I choose 5 cards from 52?
There are 2,598,960 different 5-card hands, since order does not matter. If order did matter, there would be 311,875,200 ordered ways to deal them.
What does allow repeats mean?
It means an item can be chosen more than once. A 4-digit PIN allows repeated digits, so there are 10^4 = 10,000 PINs. Without repeats, each item can be used once at most.
What is 0 factorial?
0! is defined as 1. That makes the formulas work, including choosing 0 items from a set, which can be done in exactly one way.
How can it handle very large numbers?
It uses exact big-integer arithmetic, so there is no rounding. 100! has 158 digits and 1,000! has 2,568, and both are calculated exactly. On screen long numbers are shortened, and the copy button copies every digit.