Math · Counting
Permutation, combination and factorial calculator.
Enter n and optionally r. Answers are exact big integers, with scientific notation for very large values and the full digits shown.
From n = 10 items choosing r = 3, there are P(10, 3) = 720 ordered arrangements and C(10, 3) = 120 unordered selections. A 5-card hand from 52 cards: C(52, 5) = 2,598,960.
Your numbers
Your result
Fill the form and press Calculate.
The formulas
The factorial n! = n × (n − 1) × ... × 1, with 0! defined as 1. Choosing r items from n when order matters gives permutations, P(n, r) = n! / (n − r)!. When order does not matter it gives combinations, C(n, r) = n! / (r!(n − r)!), so C(n, r) = P(n, r) / r!. If items can repeat, ordered arrangements number n^r and unordered selections number C(n + r − 1, r).
Worked example
n = 10, r = 3: P = 10 × 9 × 8 = 720, C = 720 / 3! = 120. With repetition allowed there are 10³ = 1,000 ordered arrangements and C(12, 3) = 220 unordered selections. A 52-card deck, 5-card hand: C(52, 5) = 2,598,960. 100! is about 9.33262 × 10^157 and has 158 digits.
Limits
n is limited to 5,000 so the page stays fast (5,000! has 16,326 digits). If r is larger than n, there are no ways to choose without repeats, so P and C are 0.
Sources, opened 15 October 2026: OpenStax, Algebra and Trigonometry 2e, 13.5 Counting Principles (permutation P(n, r) = n!/(n − r)! and combination C(n, r) = n!/(r!(n − r)!)); Wikipedia, Factorial (0! = 1).
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements and a combination counts unordered selections. Choosing 3 of 10 items gives 720 permutations but only 120 combinations.
How do you calculate nCr?
C(n, r) = n! / (r!(n − r)!). For C(52, 5) that is 2,598,960 possible five-card hands.
What is 0 factorial?
0! is defined as 1, so the empty arrangement counts as one way.
How large a factorial can it handle?
Up to 5,000!, which has 16,326 digits. The calculator uses exact big-integer arithmetic, so there is no rounding.
What changes when repetition is allowed?
Ordered arrangements become n^r and unordered selections become C(n + r − 1, r). For n = 10 and r = 3 that is 1,000 and 220.
Learning aid
Educational calculator with worked steps. Check answers and the required method against your own course or textbook. Nothing you type leaves your browser.