Combination Calculator (nCr Calculator) (2023)

Use this nCr calculator to easily calculate the number of combinations given a set of objects (types) and the number you need to draw from the set. N choose K calculator online to calculate how many combinations with N numbers are possible.

Quick navigation:

  1. What is a combination?
  2. How to calculate combinations?
  • Combination formula without repetition
  • Formula for possible combinations with repetition
  • Combinations with repetition
  • N choose K problems with solutions
  • N choose K table
  • Combinations vs permutations
  • What is a combination?

    A combination is a way to select a part of a collection, or a set of things in which the order does not matter and it is exactly these cases in which our combination calculator can help you. For example, if you want a new laptop, a new smartphone and a new suit, but you can only afford two of them, there are three possible combinations to choose from: laptop + smartphone, smartphone + suit, and laptop + suit. The order in which you combine them doesn't matter, as you will buy the two you selected anyways. Combinations come up a lot when you need to estimate the number of possible connections or groupings between things or people.

    Calculating combinations is useful in games of chance like lottery, poker, bingo, and other types of gambling or games in which you need to know your chance of success or failure (odds), which is usually expressed as a ratio between the number of combinations in play that will result in you winning divided by the number of possible combinations that will result in your losing.

    For example, the odds of winning the US Powerball lottery jackpot are about 1 in 292 million (1/292,201,338) where 292,201,338 is total number of possible combinations. The order in most lottery draws does not matter. If we examine the poker example further: a poker hand can be described as a 5-combination of cards from a 52-card deck. The 5 cards of the hand are all distinct, and the order of cards in the hand does not matter so it is a combinatorial problem. Using our combination calculator, you can calculate that there are 2,598,960 such combinations possible, therefore the chance of drawing a particular hand is 1 / 2,598,960.

    Here is a more visual example of how combinations work. Say you have to choose two out of three activities (a 3 choose 2 problem): cycling, baseball and tennis, the possible combinations would look like so:

    Combination Calculator (nCr Calculator) (1)

    Combination calculations play a part in statistics, problem solving and decision-making algorithms, and others.

    How to calculate combinations?

    There are two formulas for calculating the number of possible combinations in an "n choose k" a.k.a. "n choose r" scenario, depending on whether repetition of the chosen elements is allowed or not. In both equations "!" denotes the factorial operation: multiplying the sequence of integers from 1 up to that number. For example, a factorial of 4 is 4! = 4 x 3 x 2 x 1 = 24.

    Combination formula without repetition

    To calculate the number of possible combinations of r non-repeating elements from a set of n types of elements, the formula is:

    Combination Calculator (nCr Calculator) (2)

    The above equation therefore expresses the number of ways for picking r unique unordered outcomes from n possibile entities and is often referred to as the nCr formula.

    Formula for possible combinations with repetition

    If the elements can repeat in the combination, the respective equation is:

    Combination Calculator (nCr Calculator) (3)

    The result is the number of all possible ways of choosing r non-unique elements from a set of n elements. In some versions of the above formulas r is replaced by k with no change in their outcome or interpretation.

    Combinations with repetition

    In some cases, repetition of the same element is desired in the combinations. For example, if you are trying to come up with ways to arrange teams from a set of 20 people repetition is impossible since everyone is unique, however if you are trying to select 2 fruits from a set of 3 types of fruit, and you can select more than one from each type, then it is a problem with repetition. The formula for its solution is provided above, but in general it is more convenient to just flip the "with repetition" checkbox in our combination calculator and let us do the work for you.

    N choose K problems with solutions

    Often encountered problems in combinatorics involve choosing k elements from a set of n, or the so-called "n choose k" problems, also known as "n choose r". Here we will examine a few and work through their solutions. These can all be verified using our ncr formula calculator above.

    How many combinations with N numbers?

    In the simplest version of these problems N equals K (or R) in which it is often implied that repetition is allowed, otherwise the answer is always one. If repetition is allowed, the answer is can be obtained by solving the equation (2 · n - 1)! / (n! · (n - 1)!). For example, if the task is to find how many combinations are possible with 4 numbers, compute (2 · 4 - 1)! = 7! = 7 · 6 · 5 · 4 · 3 · 2 · 1 = 5040 / (24 · 6) = 5040 / 144 = 35.

    3 choose 2

    What if one is asked to determine how many unique combinations of two numbers are possible if one is choosing from a total of three? The answer, using the ncr formula without repetition above is simply: 3! / (2! · (3 - 2)!) = 3! / (2! · 1!) = 3 · 2 · 1 / (2 · 1 · 1) = 6 / 2 = 3. With 3 choose 2 there are just 3 possible combinations.

    4 choose 2

    What if we are choosing 2 out of 4 items, no repetition allowed? Using the same formula and replacing N and R, we get the answer 4! / (2! · (4 - 2)!) = 24 / (2! · 2!) = 24 / 4 = 6 ways to choose two unique elements out of a total of four.

    4 choose 3

    To calculate how many combinations of three out of four items can be chosen without repeating an item, use the ncr formula and replace to get 4! / (3! · (4 - 3)!) = 24 / (3! · 1!) = 24 / 6 = 4. Note that this is less than if you were choosing two out of four as in the previous example.

    N choose K table

    Here is a table with solutions to commonly encountered combination problems known as n choose k or n choose r, depending on the notation used. Solutions are provided both with and without repetition.

    n choose k table
    CombinationCombinations without repetitionCombinations with repetition
    2 choose 122
    2 choose 213
    3 choose 133
    3 choose 236
    3 choose 3110
    4 choose 144
    4 choose 2610
    4 choose 3420
    4 choose 4135
    5 choose 155
    5 choose 21015
    5 choose 31035
    5 choose 4570
    5 choose 51126
    6 choose 166
    6 choose 21521
    6 choose 32056
    6 choose 415126
    6 choose 56252
    6 choose 61462
    7 choose 177
    7 choose 22128
    7 choose 33584
    7 choose 435210
    7 choose 521462
    7 choose 67924
    7 choose 711,716
    8 choose 470330
    10 choose 4210715

    For other solutions, simply use the nCr calculator above.

    Examining the table, three general rules can be inferred:

    • Rule #1: For combinations without repetition, the highest number of possibilities exists when r = n / 2 (k = n/2 if using that notation). For example, if choosing out of six items, one has the most possible combinations when r = 6 / 2 = 3 (k = 3 if using k instead of r).
    • Rule #2: with repetition, the number of possible combinations increases the closer r is to n (or k is to n in that notation).
    • Rule #3: without repetition, if n = r (or n = k), there is just a single possible draw.

    Combinations vs permutations

    The difference between combinations and permutations is that while when counting combinations we do not care about the order of the things we combine with permutations the order matters. Permutations are for ordered lists, while combinations are for unordered groups. For example, if you are thinking of the number of combinations that open a safe or a briefcase, then these are in fact, permutations, since changing the order of the numbers or letters would result in an invalid code. If, however, you are thinking of the number of ways to combine your dresses with your shoes or your ties with your suits, then order doesn't matter, since the end result of choosing the tie first and the suit second is the same as choosing the suit first and the tie second.

    A lot of times in common usage people call permutations"combinations" incorrectly. For example, a lock combination is in fact a permutation. In another example - if you want to estimate how many computing hours you need to brute force a hashed password you calculate the number of permutations, not the number of combinations.

    Top Articles
    Latest Posts
    Article information

    Author: Laurine Ryan

    Last Updated: 28/09/2023

    Views: 6404

    Rating: 4.7 / 5 (77 voted)

    Reviews: 84% of readers found this page helpful

    Author information

    Name: Laurine Ryan

    Birthday: 1994-12-23

    Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

    Phone: +2366831109631

    Job: Sales Producer

    Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

    Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.