COMBINA Function (LibreOffice Calc)
The COMBINA function in LibreOffice Calc returns the number of combinations with repetition allowed. It is essential for probability, combinatorics, and counting problems where items can be chosen more than once.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✖ |
| Wps | ✔ |
| Zoho | ✔ |
What the COMBINA Function Does ▾
- Computes combinations with repetition
- Order does not matter
- Uses the formula:
(n + k − 1)! / (k! × (n − 1)!) - Useful for probability, counting, and distribution problems
- Works with non-integer inputs (truncated)
It is designed to be precise, efficient, and universally compatible.
Syntax ▾
COMBINA(number; number_chosen)
Arguments
-
number:
Total number of item types (n). -
number_chosen:
Number of items to choose (k), with repetition allowed.
Both arguments must be non‑negative integers (or values that can be truncated to integers).
Basic Examples ▾
Choose 3 items from 5 types (with repetition)
=COMBINA(5; 3)
Returns 35.
Choose 2 items from 10 types (with repetition)
=COMBINA(10; 2)
Returns 55.
COMBINA with non-integer input
=COMBINA(6.9; 2.1)
Equivalent to COMBINA(6; 2) → returns 21.
COMBINA with cell references
=COMBINA(A1; B1)
Computes combinations with repetition using values in A1 and B1.
Advanced Examples ▾
Distributing identical items into distinct bins
=COMBINA(A1; B1)
Number of ways to distribute B1 identical items into A1 bins.
Stars and bars formula (manual)
=COMBIN(A1 + B1 - 1; B1)
Equivalent to COMBINA(A1; B1).
Number of multisets
=COMBINA(n; k)
Counts the number of k‑element multisets from n types.
Polynomial expansion coefficients (with repetition)
=COMBINA(n; k)
Used in multinomial expansions.
COMBINA for dice combinations (unordered, repeated)
=COMBINA(6; A1)
Number of unordered outcomes when rolling A1 dice.
COMBINA for partitioning problems
=COMBINA(A1; B1)
Counts ways to choose B1 items from A1 categories with repetition.
Relationship to COMBIN
=COMBINA(n; k) >= COMBIN(n; k)
Always true because repetition increases possibilities.
Common Errors and Fixes ▾
Err:502 — Invalid argument
Occurs when:
- number < 0
- number_chosen < 0
- arguments are text
- arguments cannot be coerced to integers
Err:503 — Overflow
Occurs when:
- factorial components exceed Calc’s numeric limit
- n and k are too large (e.g., COMBINA(500; 200))
COMBINA returns unexpected results
Cause:
- Non-integer values are truncated
Example:COMBINA(5.8; 2.9)→COMBINA(5; 2)→15.
Best Practices ▾
- Use COMBINA when repetition is allowed
- Use COMBIN when repetition is not allowed
- Use PERMUT and PERMUTATIONA when order matters
- Avoid large inputs (factorials grow extremely fast)
- Use FACT and FACTDOUBLE for manual combinatorics
Related Patterns and Alternatives ▾
- Use COMBIN for combinations without repetition
- Use PERMUT for permutations without repetition
- Use PERMUTATIONA for permutations with repetition
- Use FACT and FACTDOUBLE for factorial-based formulas
- Use COMBIN(n + k - 1; k) for manual combinations with repetition
By mastering COMBINA and its related combinatorics functions, you can build powerful probability, counting, and statistical models in LibreOffice Calc.