MULTINOMIAL Function in ONLYOFFICE: Counting Arrangements of Repeated Groups
Use ONLYOFFICE MULTINOMIAL to count arrangements with duplicate categories, understand its factorial formula and 255-value limit.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
Verification: Formula outputs are independently calculated mathematical expectations. Native ONLYOFFICE execution was not performed.
Quick answer: Returns factorial(sum of group sizes) divided by product of the group factorials. The official syntax is MULTINOMIAL(number1, [number2], ...) (ONLYOFFICE official function reference); this short unversioned reference does not establish the first-supported Desktop/web release.
Purpose: arrangements when some objects are identical
Suppose letters are arranged in a row. If all letters were distinct, the number of orders would be the factorial of the number of letters. If categories repeat, swapping two identical letters does not create a new arrangement. The ONLYOFFICE MULTINOMIAL reference defines MULTINOMIAL as the ratio of factorial of the sum of argument values to the product of individual factorials.
For nonnegative integer category counts a, b, c, …, the mathematical value is:
(a+b+c+...)! / (a! × b! × c! × ...)
Example: the letters AAB have group sizes (2,1). The distinct arrangements are AAB, ABA and BAA: =MULTINOMIAL(2,1) has independently calculated expected value 3. The function counts arrangements of a fixed multiset, not combinations for selecting some objects out of a set.
Exact official syntax, argument types and documented defaults
=MULTINOMIAL(number1, [number2], ...)
| Parameter | Required? | Meaning per vendor |
|---|---|---|
number1 |
Yes | First numeric value / first group size for multinomial calculation. |
number2, … |
No | Additional numeric values; vendor says up to 255 numeric values total. |
Square brackets in ONLYOFFICE help indicate optional arguments; do not literally type the brackets in the formula. The vendor does not specify a default value for missing optional arguments. A single numeric argument is syntactically present, but a first argument’s observed behavior for edge inputs remains untested. Use integer counts in the examples; do not assume fractions or negative numbers are accepted just because the help says numeric.
Reproducible worksheet: repeated-letter anagrams
- Open a blank sheet and label A1
A count, B1B count, C1C count, D1Formula, E1Independently expected. - Fill rows 2–7 with the following data. For each row, type the formula in D exactly as provided. For the two-category example use only two arguments.
- Place the independent expected answer in E, and compare it against observed output after native testing. For variable-length groups, a direct literal formula avoids accidentally counting blank cells.
| Row | A: first count | B: second count | C: third count | Formula in D | Independent E |
|---|---|---|---|---|---|
| 2 | 2 | 1 | (leave empty) | =MULTINOMIAL(A2,B2) |
3 |
| 3 | 2 | 2 | 1 | =MULTINOMIAL(A3,B3,C3) |
30 |
| 4 | 3 | 2 | 1 | =MULTINOMIAL(A4,B4,C4) |
60 |
| 5 | 4 | 1 | 1 | =MULTINOMIAL(A5,B5,C5) |
30 |
| 6 | 0 | 2 | 1 | =MULTINOMIAL(A6,B6,C6) |
3 |
| 7 | 1 | 1 | 1 | =MULTINOMIAL(A7,B7,C7) |
6 |
Additional independent test cases: =MULTINOMIAL(2,2,2) expects 90; =MULTINOMIAL(3,3,2) expects 560. A missing third value in the two-argument row is simply omitted from the formula rather than explicitly passed as blank.
Validation labeling: these values were computed using Python standard-library integer arithmetic and represent expected mathematical results. No screenshot, formula execution, locale trial, or native error observation was produced.
Advanced example: arrangements of BALLOON
The word BALLOON has seven letters with category counts: B=1, A=1, L=2, O=2, N=1. Distinct letter sequences number:
7! / (1! × 1! × 2! × 2! × 1!) = 5040 / 4 = 1260
The worksheet formula is =MULTINOMIAL(1,1,2,2,1), expected 1260. This uses category frequencies, not the numeric Unicode codes for the letters. A useful cross-check is to choose the two L positions from seven, choose two O positions from the five remaining, then place B/A/N in the other three: COMBIN(7,2)×COMBIN(5,2)×FACT(3)=21×10×6=1260. This mathematical identity uses separately documented ONLYOFFICE functions, but the observed workbook result still needs native validation.
Compare multinomial against related functions
Given counts (2,2,1), the total is 5 items, with A repeated twice and B repeated twice. =MULTINOMIAL(2,2,1) has expected 30. By sequential choices of category positions: =COMBIN(5,2)*COMBIN(3,2) also has mathematical expected 10×3=30. =FACT(5) instead predicts 120 labelled arrangements and overcounts the arrangements of repeated letters by 2!×2!=4. Official COMBIN, official FACT.
A zero-count category makes no difference to the mathematical factorial quotient because 0!=1; for instance (0,2,1) has expectation 3. This is a mathematical consequence, not an independently observed vendor edge case.
Errors, practical limits, and troubleshooting
- Confusing counts with values: arguments are the numbers of objects in each indistinguishable group, not the elements themselves. For AAB enter 2,1 rather than 1,1,2 as individual character codes.
- Treating identical objects as distinct: using
FACT(total)overcounts arrangements whenever a group repeats. - Input domain: the vendor article doesn’t explicitly describe acceptance or rejection of negative or fractional numbers. Use nonnegative integers for modeled group counts and separately test coercions and exact errors.
- Too many arguments: official help documents up to 255 numeric values; keep the calculation within that documented limit; do not assume a range bypasses it.
- Reference blanks and text: exact evaluation of mixed-type ranges/empty cells is unverified; don’t state an error string without a native test.
- Large factorials: the mathematical count may exceed the exact range of floating-point spreadsheet numbers. For compliance work use an independent arbitrary-precision integer and record any rounding.
- Cross-product confusion:
PRODUCTmultiplies numeric entries; it does not apply the special factorial ratio automatically. Use MULTINOMIAL for the arrangements count.
Related official ONLYOFFICE function pages
Evidence for claims (accessed 2026-10-13 UTC)
- Definition, function category and exact published argument spelling/order: ONLYOFFICE MULTINOMIAL page.
- Function picker and manually typed syntax with commas: official Insert Functions instructions.
- Configurable formula language and region: official Advanced Settings.
- Different version histories: Docs changelog and Desktop changelog. Neither is cited as proof of a first-supported release.
- Numerical expectations and special cases: independent integer mathematics, not vendor runtime verification. Known uncertainty: Vendor short help does not state the full input domain or first-supported version; restrict examples to nonnegative integers and mark coercions, specific native errors and release boundaries untested.
Entering the formula in ONLYOFFICE
Open an editable worksheet, select the output cell, and enter the formula beginning with =. The official formula entry instructions also support Formula → Function (or the Insert Function dialog) with a name search and argument wizard; manually entered English examples on that page use commas between arguments. Press Enter to calculate. For spreadsheet software and build versions not yet tested, treat the numerical answers below as expected, not observed.
Locale, release and testing scope
This guide writes English function names and comma-separated arguments, matching the official English entry help (checked 2026-10-13). ONLYOFFICE also lets users change the Formula Language and regional number-format settings via File → Advanced Settings (vendor instructions); do not assume the localized function spelling, argument punctuation, decimal mark, or workbook behavior is identical without checking the installed language configuration. The documented regional choices include separate decimal and thousands separator controls, which are not a license to guess a local formula argument delimiter.
These short vendor function references are not versioned. See the independent ONLYOFFICE Docs changelog and Desktop Editors changelog; neither a first-support version nor identical behavior in all historical web, desktop, mobile or third-party spreadsheet engines has been established by this review. The examples are based on documented syntax and independently computed integer mathematics. **Native ONLYOFFICE web/desktop execution: not performed. Localized testing: not performed. Exact native error strings: not observed. **
Verification limitations
Native Desktop/web execution, localized formula parsing, error outcomes and undocumented boundary behavior were not tested. Verify these cases in the target version before relying on them.