COMBINA Function (OpenOffice Calc)
Learn the COMBINA function in Apache OpenOffice Calc: Calculates the number of combinations of elements including repetition.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, 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.
COMBINA counts selections when order is irrelevant and repeated items are permitted. Choosing two objects from categories A, B and C gives AA, AB, AC, BB, BC and CC: six outcomes. This is an unlimited-repetition model, not a model of a finite stock in each category.
Syntax and arguments
=COMBINA(n; k)
Both arguments are required. n is the number of item categories and k is the selection size. For ordinary use, supply positive integer n and a nonnegative integer k. The 4.1.16 interpreter floors fractional counts approximately before calculation. Importantly, that pinned implementation also rejects k>n, despite repetition making such selections mathematically meaningful. Formulas here use English function names and semicolon argument separators.
Reproducible examples
| Formula | Expected result |
|---|---|
=COMBINA(3;2) |
6 |
=COMBINA(3;3) |
10 |
=COMBINA(5;2) |
15 |
=COMBINA(4;0) |
1 |
=COMBINA(1;1) |
1 |
=COMBINA(3.9;2.9) |
6 |
The first formula preserves the original worked example. Its older comparable LibreOffice 25.2 check was not execution in OpenOffice. These new results are independently calculated expectations; no fresh native or GUI test is claimed.
Practical worksheet: count unordered two-flavour selections
Enter 3, 4 and 5 in A2:A4 for the available flavours. Enter 2 in B2:B4 for the number of scoops. In C2 enter =COMBINA(A2;B2) and fill down. The expected counts are 6, 10 and 15. Two scoops of the same flavour are allowed, and top-versus-bottom order is deliberately ignored.
With three flavours A, B and C, the six outcomes listed above verify the first row. If a shop distinguishes AB from BA, order matters and this model is wrong. If a flavour has limited remaining stock, COMBINA does not enforce that limit; enumerate or model the constrained inventory separately.
Advanced applications
Use the binomial identity within a validated domain. For integer n>=1 and k>=0, the mathematical repeated-selection count is COMBIN(n+k-1;k). With n=3 and k=2, =COMBIN(3+2-1;2) returns 6. This identity avoids separate large factorial intermediates.
Handle the pinned k>n restriction explicitly. Selecting five items from two unlimited categories has six mathematical outcomes. The 4.1.16 ScKombin2 guard rejects =COMBINA(2;5). For this positive-integer model, =COMBIN(2+5-1;5) gives the intended count 6. This workaround follows the identity; it is not evidence that the rejected COMBINA call works in OpenOffice. Verify imported formulas that relied on a different product accepting it.
Compare no repetition. For n=3 and k=2, COMBIN gives 3 while COMBINA gives 6. The extra outcomes AA, BB and CC account for the difference.
Errors, edge cases and troubleshooting
Do not generalize the mathematical domain from the brief help description to every installed implementation. The versioned 4.1.16 source explicitly contains the k>n guard. This guide reports that source result, not a fresh native execution. Negative effective counts are invalid as well.
The n=0 boundary needs care. The pinned helper evaluates COMBINA(0;0) as 0; it is not the same empty-selection convention as COMBIN(0;0)=1. Keep n>=1 for the practical model and handle a no-category input explicitly rather than assuming a portable boundary. Fractional category or selection counts should be rejected by the data model, even though the implementation floors them.
The count can grow rapidly. Floating-point output may cease to be an exact integer for large inputs. A finite displayed answer is not proof of exactness, and separate factorial expressions can overflow sooner.
Related functions
Documentation and verification
See the Apache OpenOffice COMBINA reference, versioned mathematical-function help, and 4.1.16 implementation. The saved official source snapshots were re-read for this guide; their original retrieval records remain in the evidence package. Source inspection and independent arithmetic are not application execution. The lifecycle section identifies a supported release; the original introduction and final functioning release remain unestablished.