Contact

PERMUT in Calligra Sheets: Syntax, Examples and Compatibility

Statistics Beginner Calligra Sheets

Count ordered selections without repeats, and understand version-specific invalid-input errors.

Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked

Quick answer: count ordered selections without repetition

PERMUT counts the ways to fill distinct ordered positions with different items, without using an item more than once. With eight finalists and three podium positions—gold, silver and bronze—=PERMUT(8;3) has an independently calculated expected result of 336. Selecting Alice, Ben, Carol for gold–silver–bronze is different from selecting Carol, Ben, Alice. Those results are mathematical expectations, not observed outputs from an installed Calligra Sheets program. [E1, E3]

If the group matters but the order does not, use COMBIN instead: =COMBIN(8;3) would have expected result 56. If repetition is allowed in ordered positions, consider PERMUTATIONA instead. [E1, E3]

Syntax, arguments and Calligra 26.08.2 behavior

=PERMUT(total;permutated)

total is the required number of distinct objects available (n); permutated is the required number of ordered positions filled (k). The source XML declares both parameters integer, with PERMUT(total;permutated) as the official syntax. The C++ registry sets exactly two required parameters; no defaults or optional arguments exist. The return type in the official handbook is whole number. [E1, E2]

For normal reproducible uses, enter whole-number total > 0 and 0 <= permutated <= total. The pinned func_arrang implementation rejects total < permutated and permutated < 0 with Value::errorVALUE(), then delegates to the calculation of a falling factorial. This means the pinned Calligra error kind for PERMUT(2;3) differs from Excel’s documented #NUM!; an actual on-screen error has not been captured. Do not generalize the behavior of zero/negative total or fractional input coercion beyond those explicit tests in the code. [E2, E4]

The KDE handbook uses semicolons between arguments. =PERMUT(8;3) is written for the English documentation convention; installed locales may require other decimal or function separators. Input starts with = when entered in a spreadsheet cell. [E1]

Evidence scope: KDE’s release listing showed 26.08.2 (2026-10-08) when accessed 2026-10-12. The implementation at pinned commit 72123cc643f6625351139e7df294544255a1056f was reviewed on 2026-10-12. No native execution or specific OS-distribution-package check was carried out.

Understand the calculation

For n distinct items placed in k distinct positions without reuse:

P(n,k) = n × (n-1) × ... × (n-k+1) = n! / (n-k)!

Eight candidates and three different ranks give 8×7×6 = 336. This is six times the unordered team count 56, because each three-person group has 3! = 6 possible orders. The Calligra implementation calls calc->fact(n, n-m) after validating the argument relation. [E2, E3]

Reproducible worksheet: allocate different roles

Make a new sheet, enter A1=Candidates, B1=Ranked positions, C1=Possible arrangements. Fill A2:B5 as below. In C2, enter =PERMUT(A2;B2) and fill to C5.

Row A: Candidates B: Positions C: Formula copied down Expected ordered results
2 8 3 =PERMUT(A2;B2) 336
3 6 3 =PERMUT(A3;B3) 120
4 4 2 =PERMUT(A4;B4) 12
5 8 5 =PERMUT(A5;B5) 6720

For row 3, the sequence of three assignments has 6 options for the first position, 5 for the next, and 4 for the last: 6×5×4 = 120. For comparison, the official KDE handbook example PERMUT(8;5)=6720 matches row 5. All table values were independently computed; no results were observed in Calligra. [E1, E3]

Compare a team with a ranking

Set E2=8 and F2=2. In G2 enter =COMBIN(E2;F2) for 28 unordered pairs; in H2 enter =PERMUT(E2;F2) for 56 captain/deputy assignments. This helps identify a common mistake: changing the number of named positions changes the counting model, not just the column label. [E3]

Advanced application: short unique access codes

Suppose you are designing four-character codes from ten digits (0 through 9) and digits must not repeat. Counting leading zeros as valid, put 10 in E3 and 4 in F3, then enter =PERMUT(E3;F3) in G3. The expected total is 5,040 codes: 10×9×8×7.

Important: PERMUT counts possibilities only; it neither constructs the codes nor enforces uniqueness in a stored list. And if repeats are permitted, use PERMUTATIONA(10;4), mathematical expected 10,000. In a password-security context, do not assume every code is equally likely or that such a small keyspace is secure; this illustration is about combinatorics, not security advice. [E3]

Troubleshooting and limits

  • More positions than candidates (=PERMUT(2;3)): the examined pinned C++ routine returns errorVALUE() when n < k. This is source-inferred, not native-observed. [E2]
  • Negative positions (permutated < 0): the pinned code also returns errorVALUE(). Do not use negative positions. [E2]
  • Fractional inputs: XML declares integer parameters. Calligra’s conversion for 2.9 or text inputs was not executed; do not import Excel’s truncation rule as a Calligra guarantee.
  • Order does not matter: replace PERMUT with COMBIN or divide by k! only if the mathematical assumptions actually permit it.
  • Repetition is allowed: use PERMUTATIONA for independent, ordered choices with replacement.
  • Extra/missing separators: KDE’s example uses semicolons, while the Excel English help uses commas. Adapt only to the installed locale’s accepted formula syntax.
  • Very large n and k: output precision, overflow, formatting and computational limits weren’t benchmarked; approximate-looking results in large sheets may conceal rounding.
  • Bad references: a text heading such as Candidates must not be used in place of its numeric data cell.

Excel and Calc compatibility

The mathematical model matches Microsoft Excel’s PERMUT and LibreOffice Calc’s PERMUT for valid integer examples. Excel documents truncating numeric fractions and #NUM! for n < k; the pinned Calligra routine checks n < k and returns an errorVALUE internally. Thus, do not assume identical error display when importing workbooks. Different parameter separators and coercion rules may also matter. [E2, E4, E5]

For an unordered selection without repeats, use COMBIN; for unordered with repeats, COMBINA; and for ordered with repeats, PERMUTATIONA. All are separate functions in Calligra 26.08.2’s registry. The KDE Sheets function reference was accessible on 2026-10-12.

Evidence and validation status

[E1] KDE handbook — PERMUT, accessed 2026-10-12: argument names, types, syntax and 8-permute-5 result. [E2] Calligra 26.08.2 C++ PERMUT implementation and registration, plus pinned XML, inspected 2026-10-12. [E3] Independently computed exact integer permutations; the values shown above are expected, not observed. [E4] Excel PERMUT official help, checked 2026-10-12. [E5] LibreOffice PERMUT official help, checked 2026-10-12. Validation: Documentation and version-pinned source reviewed; examples independently calculated. Native Calligra execution was not performed.