COMBIN Function (LibreOffice Calc)
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.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Availability and version history
- Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
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
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.
Reproducible example (tested in LibreOffice Calc)
This standalone example was calculated in LibreOffice Calc 25.2.3.2 and matched the expected value. It is a practical cross-check of one usage, not proof that every example elsewhere on this page is correct.
=COMBIN(5;2)
Expected result: 10.
Count two-item combinations drawn from five items.
If the result differs, check the referenced cells, argument separators and number formatting. For more information, consult the LibreOffice Calc official help.