Factorial Combination Calculator: nCr and nPr Made Easy

Factorial Combination Calculator

Count combinations C(n,r) and permutations P(n,r) built from factorials, with n! shown, a full breakdown of n! / (r! × (n−r)!), and options for repetition and order.

🎯Real Combination Presets

📝Set and Selection Inputs

Whole number from 0 to 170. This is the size of the pool you choose from.

Whole number. Without repetition r must satisfy 0 ≤ r ≤ n.

Changing this keeps the mode selector in sync for you.

Combinations nCr 0 order does not matter
Permutations nPr 0 order matters
Factorial n! 0 product 1 × 2 × ... × n
Selected mode value 0 from n! / (r!(n−r)!)

🔢Formula Symbols

nItems in set
rItems chosen
n!Factorial of n
r!Orderings of r

📊Pascal Triangle nCr Small Values

n \ rr=0r=1r=2r=3r=4r=5
n=111
n=2121
n=31331
n=414641
n=515101051
n=6161520156
n=71721353521

🗂Comparison Grid: nCr vs nPr

nrnCr (order out)nPr (order in)Ratio nPr/nCr = r!
5210202
63201206
83563366
1042105,04024
1351,287154,440120
2031,1406,8406
49613,983,81610,068,347,520720
5252,598,960311,875,200120

🎲Common Real-World Uses

Use CaseFormulan , rResult
5-card poker handsC(52,5)52 , 52,598,960
6/49 lottery drawC(49,6)49 , 613,983,816
Powerball 5 of 69C(69,5)69 , 511,238,513
Pick 3 race podiumP(8,3)8 , 3336
Arrange 5 booksP(5,5) = 5!5 , 5120
Committee from 12C(12,4)12 , 4495
Ice cream 3 of 8C(8+3−1,3)10 , 3120

🔁Repetition Formulas Reference

ScenarioOrderRepetitionFormula
CombinationIgnoredNon! / (r!(n−r)!)
PermutationMattersNon! / (n−r)!
Combination w/ repeatIgnoredYesC(n+r−1, r)
Permutation w/ repeatMattersYesn^r

Full Formula Breakdown

CombinationC(n,r) = n! / (r! × (n−r)!). It counts unordered selections, so {A,B} and {B,A} are the same choice.
PermutationP(n,r) = n! / (n−r)!. Order matters here, so {A,B} and {B,A} are two different arrangements.
LinkP(n,r) = C(n,r) × r!. Every combination expands into r! ordered permutations.
No overflownPr is computed as the product from (n−r+1) to n, then nCr = nPr / r!. This avoids huge intermediate factorials.
With repetitionCombinations with repetition use C(n+r−1, r). Permutations with repetition use n^r.
Valid rangeWithout repetition require 0 ≤ r ≤ n. Edge cases: C(n,0) = 1 and C(n,n) = 1.

📋Reference Values

ExpressionMeaningWorked ExampleValue
C(5,2)Choose 2 of 5120 / (2 × 6)10
P(5,2)Arrange 2 of 55 × 420
C(10,3)Choose 3 of 10720 / 6120
P(8,3)Podium of 88 × 7 × 6336
5!Order all 51×2×3×4×5120

💡Practical Counting Tips

Order tip: Ask "does the order of the picks matter?" If yes, use a permutation P(n,r); if the group is all that counts, use a combination C(n,r). Permutations are always larger by a factor of r!.
Overflow tip: Do not compute full factorials for large n. Use the multiplicative form nPr = (n−r+1) × ... × n and divide by r! for nCr. This keeps intermediate numbers small and accurate.

How many distinct poker hand are there? What are my chances of hitting a jackpot in the lottery? These all seem like difficult problems initially. In fact, they boil down to just one decision. Does the order matter?

For example, when picking a committee from your office, it doesn’t matter which person was selected first. It’s still the same set of people no matter what. That’s a combination. On the other hand, race results vary with order. When Alice win gold, silver and bronze aren’t the same thing as when she wins bronze, silver, gold. This distinction make all the difference for the math.

The Main Difference Between Combinations and Permutations

Understanding this can help you avoid mixing up two similar-looking number that represent something different. After that, all of the math happens behind the scenes using calculator. That’s where so many folks mess up, we don’t do text book examples in real life. To start, you’ll enter n, the size of your total pool. Then you input r, the number of items you’re going to select.

In most cases, each time you pull something out, there are fewer left. So if you draw cards and put them face down, you’ve got fewer choices available next time. Set it to not repeat item, and the calculator figures that into the math. But what if you is rolling dice or pulling numbers from a hat with replacement? No change, your pool hasn’t changed at all. Flip that switch on the tool and it flips the formula from Factorials to straight-up Exponents. It’s subtle but it keeps you from making a huge mistake in your calculations.

Order doesn’t matter in combinations. With the same inputs, combinations are always fewer then permutations. Say you want to select two flavors of ice cream out of ten total choices. Does it matter if you put strawberry or chocolate into bowl first? No… Both look like the exact same sundae. The combination formula strip out duplicates. It returns only one copy per unique arrangement.

Permutations retain each ordering as separate. Putting three book on a bookshelf is a permutation problem. The arrangement matters; each book’s location affect the way it appears. And this factor, r factorial, is always the gap separating these counts. That’s what makes permutations expand at such an accelerated rate compared to combinations: because permutations are simply the number of shuffles within your selection.

The factorials increases rapidly. For example, computers has to handle larger inputs in a special way. Only five factorial is 120. You could have wrote that down on a napkin. Fifty-two factorial is sixty-nine digits long. That is the number of different ways you could arrange a deck of cards. If you wrote it all out, it’d take up pages of just numbers.

Because factorials increase so quickly, the tool displays the big answers in scientific notation. It is hard to visualize numbers that large. But then you think about how each shuffled deck is probably unique across all of human history. It carries some weight.

The calculator doesn’t compute impossible intermediary steps because that wouldn’t work. Instead, it build the answer step by step.

It’s one thing to know about counting; it’s another to know about probability. They can both happen at once. We frequently mistake the two. Counting gives you the total number of outcomes. That figure is denominator of your probability fraction. For example, there are more than two million possible five card poker hands. Knowing this allow you to compute the chances of getting a royal flush. Otherwise, you lack any standard against which to gauge rarity. The breakdown section explain the relationship between the numerator and denominator. It takes the magic out of the solution. It spells out the math of the division.

You’ll notice that redundant orderings don’t matter. The r factorial term wipes those away. It’s not math for mathematicians. You don’t have to be a rocket scientist to use it. However, you do have to consider your situation ahead of time and type in what makes sense. Does moving one item around change anything? If so, you’re working on permutations. If not, then you’re working on combinations. Next, do you return items to the pile? When those answers pop up, it’s just arithmetic from there. It’s a precise number instead of a fuzzy feeling of odds.

Factorial Combination Calculator: nCr and nPr Made Easy