COMBIN Function (LibreOffice Calc)

Math Intermediate LibreOffice Calc Introduced in LibreOffice 3.0
math combinatorics combinations probability counting number-theory

The COMBIN function in LibreOffice Calc returns the number of combinations of a given size from a larger set, without repetition and without regard to order. It is essential for probability, statistics, and combinatorics.

Compatibility

What the COMBIN Function Does

  • Computes combinations without repetition
  • Order does not matter
  • Uses the formula:
    n! / (k! × (n − k)!)
  • Useful for probability, statistics, and counting problems
  • Works with non-integer inputs (truncated)

It is designed to be precise, efficient, and universally compatible.

Syntax

COMBIN(number; number_chosen)

Arguments

  • number:
    Total number of items (n).

  • number_chosen:
    Number of items to choose (k).

Both arguments must be non‑negative integers (or values that can be truncated to integers).

Basic Examples

Choose 3 items from 5

=COMBIN(5; 3)

Returns 10.

Choose 2 items from 10

=COMBIN(10; 2)

Returns 45.

COMBIN with non-integer input

=COMBIN(6.9; 2.1)

Equivalent to COMBIN(6; 2) → returns 15.

COMBIN with cell references

=COMBIN(A1; B1)

Computes combinations using values in A1 and B1.

Advanced Examples

Probability of drawing a specific hand size

=COMBIN(52; 5)

Number of 5‑card hands from a standard deck.

Hypergeometric distribution components

=COMBIN(A1; B1) * COMBIN(A2; B2) / COMBIN(A1 + A2; B1 + B2)

Used in probability and statistics.

Combinations for lottery odds

=COMBIN(49; 6)

Classic 6‑number lottery odds.

Combinations for binomial coefficients

=COMBIN(n; k)

Equivalent to “n choose k”.

Relationship to factorials

=FACT(A1) / (FACT(B1) * FACT(A1 - B1))

Equivalent to COMBIN(A1; B1).

COMBIN for subset counting

=SUM(COMBIN(A1; ROW(INDIRECT("1:" & A1))))

Counts all possible subset sizes.

COMBIN for polynomial expansion coefficients

=COMBIN(n; k)

Used in binomial theorem expansions.

Common Errors and Fixes

Err:502 — Invalid argument

Occurs when:

  • number < 0
  • number_chosen < 0
  • number_chosen > number
  • arguments are text
  • arguments cannot be coerced to integers

Err:503 — Overflow

Occurs when:

  • factorial components exceed Calc’s numeric limit
  • n is too large (e.g., COMBIN(2000; 1000))

COMBIN returns unexpected results

Cause:

  • Non-integer values are truncated
    Example: COMBIN(5.8; 2.9)COMBIN(5; 2)10.

Best Practices

  • Use COMBIN for combinations without repetition
  • Use COMBINA for combinations with repetition
  • Use PERMUT when order matters
  • Avoid large inputs (factorials grow extremely fast)
  • Use FACT and FACTDOUBLE for manual combinatorics
COMBIN is the backbone of probability and combinatorics — perfect for counting selections, computing odds, and building statistical models.

Related Patterns and Alternatives

  • Use COMBINA for combinations with repetition
  • Use PERMUT for permutations without repetition
  • Use PERMUTATIONA for permutations with repetition
  • Use FACT and FACTDOUBLE for factorial-based formulas
  • Use n! / (k! × (n − k)!) for manual combinations

By mastering COMBIN and its related combinatorics functions, you can build powerful probability, counting, and statistical models in LibreOffice Calc.

Copyright 2026. All rights reserved.