Calcoid

Combinations and Permutations Calculator

Calculate combinations (nCr) and permutations (nPr) with or without repetition. Switch modes in one click, see the formula, and get exact BigInt results for huge n and r.

Enter your values

Result

13,983,816

Combinations without repetition (order does not matter, each item used at most once)

Formula

n!/(r!(n-r)!) = 49!/(6!(49-6)!) = 13983816

Combinations and Permutations Comparison

SelectionNo RepetitionWith RepetitionOrder Matters?
Choose 2 from 55C2 = 10C(6, 2) = 15No
Arrange 2 from 55P2 = 205² = 25Yes
Choose 3 from 44C3 = 4C(6, 3) = 20No
Arrange 3 from 44P3 = 244³ = 64Yes
Choose 5 from 1010C5 = 252C(14, 5) = 2,002No

Frequently Asked Questions about the Combinations and Permutations Calculator

What is the difference between a combination and a permutation?
Order. A permutation is an ordered arrangement: A-B-C and C-B-A are two distinct permutations of {A, B, C}. A combination is an unordered selection: {A, B, C} is one combination no matter how you list it. The same n and r always give nPr greater than or equal to nCr, because every combination of size r can be re-ordered r! ways, so nPr = nCr * r!. Pick the mode in this calculator that matches your scenario: if shuffling the chosen items changes the answer (race rankings, PIN sequences, seat assignments), it is a permutation; if it does not (a hand of cards, a committee, a pizza topping selection), it is a combination.
When should I allow repetition?
Allow repetition when the same item can be picked more than once. A 4-digit PIN can be 0000 (the digit 0 used four times), so it is a permutation with repetition: 10^4 = 10,000 codes. A scoop-of-ice-cream selection where you can take two scoops of chocolate is a combination with repetition: with 3 flavors and 2 scoops, C(4, 2) = 6 multisets. Without repetition, each item is used at most once: nPr or nCr in the classical sense. The formulas differ: n^r and C(n+r-1, r) are the two with-repetition cases, n!/(n-r)! and n!/(r!(n-r)!) are the two without.
Where does the formula nPr = n!/(n-r)! come from?
Imagine placing r distinct items into r ordered slots, drawing from a pool of n items without replacement. The first slot has n choices, the second has n-1 (one item is already used), the third has n-2, and so on, down to n-r+1 for the last slot. Multiplying these gives n * (n-1) * ... * (n-r+1), which is exactly n!/(n-r)! once you write out both factorials and cancel the (n-r)! tail. So the formula is just the product rule applied r times. The calculator uses the product form directly, not the factorial ratio, which keeps the intermediate values small and exact even when n is large.
What are real-world uses of combinations and permutations?
Combinations dominate when grouping matters more than ordering. Poker uses C(52, 5) = 2,598,960 to count five-card hands. Lotteries use C(49, 6) = 13,983,816 for the odds of a six-from-49 jackpot. Sports drafts pick a team of k from a pool of n. Permutations show up when sequence matters. A password using 8 distinct lowercase letters has 26P8 = 62,990,928,000 arrangements. A 4-digit PIN with repetition allows 10^4 = 10,000 codes. Race-finishing orders, lineup orders, and lock-code sequences all use nPr or n^r.
Why does this calculator use BigInt instead of regular numbers?
JavaScript Number can represent every integer exactly only through Number.MAX_SAFE_INTEGER, 2^53 - 1. Above that boundary, some integers remain representable but consecutive integers no longer are, so ordinary arithmetic can round a count. Combinatorial values exceed the boundary quickly. BigInt lets this calculator preserve exact integer results for supported inputs up to n = 1,000.

Related Calculators

More calculators in "Math"

See all 202 calculators in "Math"