Skip to content
Statculator
Probability & Counting

Combination Calculator (nCr)

Combination calculator for n choose r: get nCr exactly, with or without repetition, see the formula worked out step by step and list every combination.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try

Tick for selections with replacement, such as choosing 3 scoops from 8 flavours where flavours may repeat.

Shows each selection when there are at most 1,000 of them.

Results

Combinations, C(49, 6)
13,983,816
8 digits
Scientific notation
1.39838 × 10⁷
Number of digits
8
Chance of one particular selection
1 in 13,983,816 = 7.1511 × 10⁻⁸
Permutations, P(49, 6) = C × r!
10,068,347,520
With repetition, C(n + r − 1, r)
25,827,165
log₁₀ of the count
7.1456

Interpretation: There are 13,983,816 ways to choose 6 items from 49 when order does not matter and each item can be used once.

Step-by-step solution

  1. 1

    Write the combination formula

    Order does not matter, so divide the ordered arrangements by the r! orders of each selection.

    C(n, r) = n! / (r! · (n − r)!)
    C(49, 6) = 49! / (6! × 43!)
  2. 2

    Cancel 43! from the top and bottom

    Only the top 6 factors of 49! survive, leaving 6 factors over 6!.

    C(49, 6) = (49 × 48 × 47 × 46 × 45 × 44) / 6!
    = 10,068,347,520 / 720
    = 13,983,816
  3. 3

    Relate to permutations

    Each unordered selection can be arranged in r! orders.

    P(49, 6) = C(49, 6) × 6! = 10,068,347,520

What is a Combination Calculator?

A combination calculator (nCr calculator) counts how many ways you can choose r items from n when the order of the chosen items does not matter. Without repetition it uses the combination formula C(n, r) = n! / (r!(n − r)!); with repetition it uses C(n + r − 1, r). For example, 10 choose 3 = 120. This calculator returns the exact whole number for n up to 10,000, shows the steps and can list every combination.

What the Combination Calculator does

Combinations answer “how many different groups?” questions: lottery tickets, poker hands, committees, handshakes, pizza toppings, test questions to answer. Two selections that contain the same items count once, however the items are listed. The result is also called the binomial coefficient, written nCr, ⁿCᵣ, C(n, r) or (n choose r), and read “n choose r”. That is why the same tool goes by many names: an nCr calculator (n C r calculator), an n choose r or n choose k calculator, a binomial coefficient calculator or a combinatorics calculator.

The calculator works with exact integer arithmetic, so even C(10000, 5000), a number with 3,009 digits, is computed without rounding. Small results are shown in full; for large ones you get scientific notation in the headline and the exact digits underneath. The step-by-step solution cancels the factorials the way you would by hand, a full row of Pascal’s triangle puts your answer in context for n ≤ 30, and ticking List every combination writes out each possible selection, using your own item names if you type them in.

How to use the Combination Calculator

  1. Enter the Total number of items, n: how many distinct things you can choose from.
  2. Enter the Number chosen, r: how many items are in each selection.
  3. Tick Allow repetition only if the same item can be picked more than once (selection with replacement).
  4. Tick List every combination to see each selection, and type the item names separated by commas if you want them in the list.
  5. Read the number of combinations, its digit count and scientific notation, and open the steps to see the factorials cancel.

Combination formula (nCr formula)

The nCr formula starts from permutations. There are n × (n − 1) × … × (n − r + 1) = n! / (n − r)! ordered ways to pick r items. Each unordered group of r items shows up r! times in that count, once for every order, so dividing by r! leaves the number of combinations.

Without repetition (n choose r)
C(n, r) = n! / (r! · (n − r)!)
Multiplicative form, quicker by hand
C(n, r) = [n · (n − 1) · … · (n − r + 1)] / r!
With repetition
C(n + r − 1, r) = (n + r − 1)! / (r! · (n − 1)!)
Symmetry
C(n, r) = C(n, n − r)
Pascal’s rule
C(n, r) = C(n − 1, r − 1) + C(n − 1, r)
Link to permutations
P(n, r) = C(n, r) · r!
Formula symbols
SymbolMeaning
nnumber of distinct items available
rnumber of items in each selection (some books use k)
n!n factorial, n × (n − 1) × … × 2 × 1, with 0! = 1
C(n, r)also written nCr, ⁿCᵣ, C(n, k) or (n choose r)

Without repetition r cannot exceed n, and C(n, r) = 0 when it does. With repetition r can be any size, because each item can be reused.

Definitions follow standard references: Binomial coefficient, Wolfram MathWorld and NIST Digital Library of Mathematical Functions, §26.3.

Worked example: lottery odds with 6 from 49

How many tickets in a 6-from-49 lottery?

Problem. A lottery draws 6 numbers from 1 to 49, and the order of the draw does not matter. How many different tickets are possible, and what is the chance that one ticket wins the jackpot?

  1. 01Order does not matter and numbers cannot repeat, so use C(49, 6) = 49! / (6! × 43!).
  2. 02Cancel 43!: C(49, 6) = (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1).
  3. 03Numerator: 10,068,347,520. Denominator: 720.
  4. 0410,068,347,520 / 720 = 13,983,816.

Answer. There are 13,983,816 possible tickets, so a single ticket has a 1 in 13,983,816 chance (about 7.1511 × 10⁻⁸) of matching all six numbers.

Why 0! = 1, and other special cases

The factorial of zero is defined as 0! = 1. It is not an arbitrary rule: there is exactly one way to arrange zero objects (do nothing), and the definition keeps the combination formula working at the edges. With 0! = 1, C(n, 0) = n! / (0! · n!) = 1 and C(n, n) = n! / (n! · 0!) = 1, which matches the counting: one way to choose nothing, one way to choose everything.

The symmetry property C(n, r) = C(n, n − r) says that picking r items to keep is the same as picking n − r items to leave out. It is why 10 choose 7 equals 10 choose 3 (both 120), and why the calculator always cancels the larger factorial and multiplies the shorter product.

CaseValueWhy
C(n, 0)1One way to choose nothing
C(n, n)1One way to choose every item
C(n, 1)nAny single item can be the one chosen
C(n, 2)n(n − 1) / 2Number of pairs, such as handshakes or matches
C(n, r) with r > n0Not enough distinct items to choose from
Sum of C(n, r) over all r2ⁿEvery subset of n items, of every size

Combination word problems

Handshake problem. Ten people meet and everyone shakes hands with everyone else once. A handshake is a pair of people, and the pair (Ann, Ben) is the same as (Ben, Ann), so the count is 10 choose 2 = (10 × 9) / 2 = 45 handshakes. In general, n people make n(n − 1) / 2 handshakes.

Committee problem. A club of 12 members must choose a committee of 4. The roles are the same, so order does not matter: C(12, 4) = (12 × 11 × 10 × 9) / 24 = 495 committees. If the club has 5 women and 7 men and the committee must have 2 of each, choose each part separately and multiply: C(5, 2) × C(7, 2) = 10 × 21 = 210 committees.

At least one condition. How many of those 495 committees include at least one woman? Count the complement, committees with men only, and subtract: C(7, 4) = 35, so 495 − 35 = 460. Subtracting the “none” case is usually faster than adding up every “at least one” case.

Sandwich or pizza options. A sandwich shop offers 8 toppings and you choose any 3 different ones: C(8, 3) = 56 sandwiches. If you may take double portions of a topping, repetition is allowed and the count becomes C(10, 3) = 120.

Combinations vs permutations

Ask whether rearranging the chosen items gives a different outcome. If it does not (a hand of cards, a committee), count combinations. If it does (a race finish, a PIN, president and treasurer), count permutations with the Permutation Calculator. Every combination of r items corresponds to r! permutations, so permutations are always at least as numerous.

QuestionOrder matters?CountValue for n = 10, r = 3
Pick 3 toppings from 10NoC(10, 3)120
Award gold, silver, bronze to 3 of 10 runnersYesP(10, 3)720
Pick 3 scoops from 10 flavours, repeats allowedNoC(12, 3)220
Set a 3-digit code using digits 0–9Yes, with repeats10³1,000

Combinations with repetition (stars and bars)

When items can repeat, picture each selection as a row of r stars (the chosen items) split into n groups by n − 1 bars (one group per item type). Choosing 3 scoops from 8 flavours is a row of 3 stars and 7 bars, so the count is the number of ways to place 3 stars among 10 positions: C(10, 3) = 120. That is why the formula becomes C(n + r − 1, r).

Common n choose r values

Values people look up most often. Enter any other pair above to get the exact answer with steps.

n choose rValuen choose rValue
2 choose 1212 choose 266
3 choose 1313 choose 3286
3 choose 2315 choose 41,365
3 choose 3120 choose 31,140
4 choose 1421 choose 2210
4 choose 2625 choose 553,130
5 choose 31026 choose 2325
5 choose 4530 choose 34,060
9 choose 38435 choose 12834,451,800
10 choose 24550 choose 319,600
10 choose 312052 choose 52,598,960
10 choose 4210100 choose 24,950
10 choose 5252339 choose 4540,597,876
12 choose 4495500 choose 2124,750

nCr on a calculator, in Excel and in code

The nCr key on a scientific calculator is the combination function, and nPr is the permutation function. On a TI-83 or TI-84, type n, press MATH, move right to PRB, choose nCr, type r and press ENTER. On most Casio models nCr sits above the division key and is reached with SHIFT.

ToolWithout repetitionWith repetition
Excel and Google Sheets=COMBIN(n, r)=COMBINA(n, r)
Pythonmath.comb(n, r)math.comb(n + r − 1, r)
Rchoose(n, r)choose(n + r − 1, r)
TI-84n nCr rn + r − 1 nCr r

Common use cases

  • Lotteries and games: the number of possible tickets or card hands, and so the probability of any one of them.
  • Probability problems: counting favourable and total outcomes, and the coefficients in the binomial distribution and the hypergeometric distribution.
  • Team and committee selection: how many different groups of a given size can be formed, and with the list option, which ones.
  • Experimental design and testing: the number of pairs or subsets to compare, such as C(k, 2) pairwise comparisons among k groups.
  • Menu and product options: bundles, toppings or features where the order of choice is irrelevant.

Assumptions and limitations

  • All n items are treated as distinct. If some items are identical (for example letters in a word with repeated letters), the count needs a multinomial formula instead.
  • The calculator accepts n and r up to 10,000. Results can have thousands of digits; beyond 300 digits only the first and last 60 are printed.
  • The list of combinations is shown only when there are at most 1,000 of them; the count itself has no such limit.
  • A count of outcomes becomes a probability only when every outcome is equally likely, as with a fair lottery draw.
  • If order matters, use the Permutation Calculator; for the factorials themselves, use the Factorial Calculator.

Frequently asked questions

What does nCr mean?

nCr, read “n choose r”, is the number of ways to choose r items from n distinct items when order does not matter and no item is used twice. It equals n! / (r!(n − r)!). For example, 5C2 = 10: there are ten different pairs you can make from five people.

What is the nCr formula?

The nCr formula is C(n, r) = n! / (r!(n − r)!). In practice you cancel (n − r)! and compute n × (n − 1) × … × (n − r + 1) / r!. For 10 choose 3 that is (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120.

How do I know whether to use a combination or a permutation?

Swap two of the chosen items and ask whether you have a different outcome. If not, as with a lottery ticket or a committee, use combinations. If yes, as with a race podium or a password, use permutations. Permutations equal combinations multiplied by r!.

What is 10 choose 2?

10 choose 2 is 45. Using the formula, C(10, 2) = (10 × 9) / 2 = 45, which is also the number of handshakes when 10 people each shake hands once.

What is 3 choose 3, and why is C(n, 0) equal to 1?

3 choose 3 is 1: there is only one way to take all three items. Likewise C(n, 0) = 1, because there is exactly one way to choose nothing. The formula agrees because n! / (0! · n!) = 1, using the convention 0! = 1.

What happens when r is larger than n?

Without repetition, n choose r is 0 when r > n, because there are not enough distinct items. For example, 2 choose 4 = 0. With repetition allowed the count is positive: choosing 4 from 2 types with repeats gives C(5, 4) = 5.

How many possible combinations are there, and can I see a list of them?

Enter n and r to get the number of possible combinations. To see the actual list, tick “List every combination” and, if you like, type your item names separated by commas; the calculator writes out every selection when there are at most 1,000.

How many 5-card poker hands are there?

There are C(52, 5) = 2,598,960 different five-card hands from a standard 52-card deck, because the order in which the cards are dealt does not change the hand. Select the “Poker hands” example above to see the working.

What is the formula for combinations with repetition?

When each item can be chosen more than once, the number of selections is C(n + r − 1, r) = (n + r − 1)! / (r!(n − 1)!). For 3 scoops of ice cream from 8 flavours with repeats allowed, that is C(10, 3) = 120.

Can this calculator handle very large numbers?

Yes. It uses exact integer arithmetic, so results are never rounded, for any n and r up to 10,000. C(10000, 5000) has 3,009 digits; the calculator shows it in scientific notation along with its first and last 60 digits.

Cite this page

Statculator. (2026, November 14). Combination Calculator. Retrieved November 14, 2026, from https://statculator.com/probability/combination-calculator/