FACT in Calligra Sheets: Factorials and Arrangements
Calculate factorials for permutations and combinations, with release-pinned integer-input rules, examples, and Excel differences.
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: Use =FACT(5) to calculate the factorial 5 Ć 4 Ć 3 Ć 2 Ć 1 = 120. For =FACT(10) the official KDE reference reports 3,628,800, and it reports =FACT(0) as 1. FACT is useful for counting possible ordered arrangements, not for summing a column.
Evidence and scope. This guide describes the function registered in the Calligra 26.08.2 tagged source (2026-10-12 access); it combines KDE’s official handbook, shipped XML help, C++ registration and independent mathematical calculations. All worksheet values are expected results, not observed Calligra output. No Calligra runtime was executed.
What FACT calculates
The factorial of a non-negative whole number n is n! = n Ć (nā1) Ć ... Ć 1, and 0! = 1 by mathematical convention. A factorial counts order-sensitive arrangements: how many different ways can five distinct books be placed in a row? 5! = 120. Do not confuse FACT with the ordinary multiplication function PRODUCT or the step-two FACTDOUBLE: for the same n those perform different computations. The KDE FACT handbook gives the basic definition, and the version-pinned C++ body selects calc->fact() only after checking the argument’s integer value/type and non-negativity.
Exact syntax, argument types, defaults, and locale
=FACT(number)
| Parameter | Position | Required? | Shipped help type | Verified source constraint | Default |
|---|---|---|---|---|---|
number |
1 | Yes | Floating-point argument | Non-negative integer-typed value checked by isInteger() and asInteger() >= 0 |
None |
KDE’s HTML reference and shipped math.xml help call the XML parameter a floating-point value. Important difference: the pinned implementation in func_fact explicitly rejects values that fail its integer-type or non-negative check, returning the internal numeric error value. Do not treat the handbook’s generic floating point label as permission to input a fractional number. Exact interpretation of a cell/formula’s stored number type needs native checking; integer literals are the safest examples.
The English documentation uses FACT(number) and has one mandatory argument, no options/default, and no registered alternate name. This unary syntax has no argument separator. In other Calligra functions, the English KDE reference uses semicolons (;) to separate multiple parameters. Decimal marks, numeric storage types and display conventions may vary with locale; do not interpret formatted text such as "4" as guaranteed numeric input without testing conversion.
Follow-along worksheet: arrange products on a shelf
Create a new worksheet. Put numeric values in A2:A6 and type =FACT(A2) into B2; then fill down. Calculate the independent expected outputs below before comparing with your version of Sheets.
| Row | A: Number of distinct products | B: Formula | Expected B (arrangements) |
|---|---|---|---|
| 2 | 0 | =FACT(A2) |
1 |
| 3 | 1 | =FACT(A3) |
1 |
| 4 | 3 | =FACT(A4) |
6 |
| 5 | 5 | =FACT(A5) |
120 |
| 6 | 7 | =FACT(A6) |
5040 |
The 0 and 10 test cases match KDE’s printed reference; the other results follow independent integer multiplication. If the workbook displays large results in scientific notation or loses trailing digits, distinguish number formatting and precision from whether the formula has mathematically the same result.
Copyable quick-reference formulas
| Enter this formula | Independently expected result | Reason |
|---|---|---|
=FACT(0) |
1 | Empty product convention, documented by KDE |
=FACT(1) |
1 | Single arrangement |
=FACT(4) |
24 | 4 Ć 3 Ć 2 Ć 1 |
=FACT(6) |
720 | 6 Ć 5 Ć 4 Ć 3 Ć 2 Ć 1 |
=FACT(10) |
3628800 | Official KDE example; 10! |
=FACT(12) |
479001600 | 12! |
Advanced applications
Count order-sensitive selections: Suppose cell A2 contains the total distinct items n = 6 and B2 contains the number selected r = 3. Enter =FACT(A2)/FACT(A2-B2). This counts ordered choices: independently, 6!/3! = 720/6 = 120. The formula assumes whole numbers with 0 ⤠r ⤠n; otherwise negative factorial arguments are invalid. This uses FACT rather than an undocumented PERMUT implementation.
Count selections where order does not matter: With n = 6 in A2 and k = 2 in B2, enter =FACT(A2)/(FACT(B2)*FACT(A2-B2)). Mathematical expectation: 720/(2 Ć 24) = 15 pairs. At larger n, intermediate factorials can overflow or lose precision before the ratio is formed, so do not use this naively for extremely large probability models.
Compare factorial and double factorial: =FACT(7) has mathematical value 5040, while =FACTDOUBLE(7) has 105. If both input domains are respected, =FACTDOUBLE(7)*FACTDOUBLE(6) mathematically equals 5040 because the odd and even factors partition the full product. This identity is independently checked, but native display has not been observed.
Errors, limits, and troubleshooting
- Fractional input such as
=FACT(1.9)is not safe to assume supported. The Calligra 26.08.2 C++ check requiresisInteger(); the path for other stored types yieldsValue::errorNUM(). Some other spreadsheet products truncate fractions instead; imported formulas should be checked. - Negative inputs: the same C++ guard rejects
=FACT(-1); it uses a numeric error path. The rendered error spelling and precise engine propagation were not natively tested. - Non-numeric text or an empty cell: do not assume uniform coercion. The implementation’s type guard is only one layer; the formula engine may convert values before
func_factreceives them. Validate actual cell type. - Large factorials: factorial growth is extraordinarily fast (
20!already exceeds 2Ć10^18). Storage precision and overflow depend on the underlying value engine. KDE’s supplied function description does not establish a published maximum input, so this guide does not invent one. - Wrong count in a selection problem: determine whether ordering matters. For unordered choices, divide by
FACT(k)as well as byFACT(n-k). - Locale/import problems: only one argument is used; don’t introduce comma/semicolon variants for this unary function. Confirm that the input is stored as a number, not text.
- Values don’t match this table: confirm the installed Calligra version and formula text, then run a native test. A source-derived result is not a native test record.
Cross-software compatibility, with caveats
Microsoft documents Excel FACT as truncating noninteger arguments. Do not transfer that rule to Calligra 26.08.2: the pinned Calligra function requires an integer-typed argument. For positive whole numbers such as 5 and 10, the mathematical result is shared. A LibreOffice/Gnumeric comparison needs direct version- and type-specific checking before claiming identical coercion or exact error strings. Mathematical factorial and spreadsheet storage/rounding are separate questions.
Related functions and review links
For the step-two product, see the KDE FACTDOUBLE reference. For the gamma function, see KDE GAMMA; for generic multiplication, see KDE PRODUCT.
Claim-level official references (2026-10-12 access)
- KDE FACT handbook ā semantics,
FACT(number), 0!, andFACT(10)example. - Shipped Calligra 26.08.2 XML help ā one documented parameter; help uses generic float type.
- Tagged C++ registration ā canonical name; no explicit FACT alias.
- Tagged
func_factimplementation ā nonnegative integer test and numeric error branch. - KDE Gear 26.08.2 release (2026-10-12 source check) ā version and official release context; annotated
v26.08.2tag points to commit72123cc643f6625351139e7df294544255a1056f.