Documentation/Calc Functions/FACT

From The Document Foundation Wiki
Jump to: navigation, search

Other languages:

Function name:

FACT

Category:

Mathematical

Summary:

Returns the factorial of a number.

Syntax:

FACT(Number)

Returns:

Returns a positive integer value which is Number!, the factorial of Number, calculated as 1*2*3*4* ... * Number.

Arguments:

Number is a non-negative integer or a reference to the cell containing that integer whose factorial value is to be calculated.

  • If the Number is negative, the function returns an error value.
  • If the Number is non-integer, its floor value is considered i.e. the number is truncated to integer.

Additional details:

Factorial of 0 returns 1 by definition.

The formula used for FACT function is:

Facte.png

Where F is the Number

Examples:

Formula Description Returns
=FACT(3) the factorial of 3 = 3*2*1 6
=FACT(0) the factorial of 0 is 1 by definition 1
=FACT(-3) returns an error value because Number is negative Err:502
=FACT(3.5) the function uses 3(floor value is considered) further the factorial of 3 = 3*2*1 6

Related LibreOffice functions:

GAMMA

ODF standard:

Section 6.16.32, part2

Equivalent Excel functions:

FACT