Documentation/Calc Functions/COMBIN

    From The Document Foundation Wiki


    Function name:

    COMBIN

    Category:

    Mathematical

    Summary:

    Calculates the number of combinations when choosing a subset of k objects from a pool of n objects. with no repetition.

    Syntax:

    COMBIN(Number1; Number2)

    Returns:

    Returns a positive integer that is the number of combinations with no repetition for the given arguments.

    Arguments:

    Number1 is a non-negative integer, or a reference to a cell containing that number, that is the number of objects in the pool.

    Number2 is a non-negative integer, or a reference to a cell containing that number, that is the number of objects to be chosen from the pool.

    • If either Number1 or Number2 is non-numeric, then COMBIN reports a #VALUE! error.
    • If either Number1 or Number2 is a non-integer value, then COMBIN converts it to an integer by taking its floor value.
    • If either Number1 or Number2 is less than 0, then COMBIN reports an invalid argument error (Err:502).
    • If Number1 < Number2, then COMBIN reports an invalid argument error (Err:502).

    Additional details:

    • The formula specifying the number of possible combinations if selecting k items from a collection of n items (with no repetition and when order does not matter), with kn, is as follows:
      [math]\displaystyle{ \text{COMBIN}(n,k) ~=~\frac{n!}{k!(n-k)!} }[/math]
    • The resulting number of combinations is often referred to as "n choose k" and occurs in several areas of mathematics, including as a binomial coefficient. It also has several notations, including [math]\displaystyle{ C(n,k) }[/math], [math]\displaystyle{ _{n}C_{k} }[/math], and [math]\displaystyle{ \binom{n}{k} }[/math].
    • For more information, visit Wikipedia’s Combination page.

    Examples:

    Formula Description Returns
    =COMBIN(3; 2) From a pool of 3 items, 2 can be chosen in 3 ways. 3
    =COMBIN(7.6;3.3) Truncate both arguments, to 7 and 3 respectively. From a pool of 7 items, 3 can be chosen in 35 ways. 35
    =COMBIN(D1; D2)

    where cells D1 and D2 contain the values 52 and 13 respectively.

    From a standard deck of 52 playing cards, there are 635013559600 ways of dealing a bridge hand comprising 13 cards. 635013559600

    Related LibreOffice functions:

    COMBINA

    PERMUT

    PERMUTATIONA

    ODF standard:

    Section 6.16.16, part 2

    Related (or similar) Excel functions:

    COMBIN