PrecisionCalc
xl
Precision
Get Your Numbers Right

 

xlpFACT

Returns the factorial of a number, with up to 32,767 significant digits of precision. Same as Excel's built-in FACT function, but with high precision.

The factorial of a number is equal to 1*2*3*...* number.

Syntax

xlpFACT(num,format_negative,format_thousands,format_currency,exponential_notation,maximum_significant_digits)

num Required. The number for which the factorial will be returned.
format_negative Optional. Determines whether negatives are formatted with a leading hyphen ("-"), or parentheses ("()"). Set to 1 to format negatives with a leading hyphen. Set to 2 for parentheses. 1 by default.

You can also format negatives with a red font.

format_thousands Optional. Determines whether thousands separators are included. Set to TRUE to include thousands separators. FALSE by default.
format_currency Optional. Determines whether currency symbol is included. Set to TRUE to include currency symbol. The currency symbol will be added either to the beginning or to the end of the result, whichever is appropriate for the locale. FALSE by default.
exponential_notation Optional. Determines whether result is formatted in exponential notation. Set to TRUE to format in exponential notation. FALSE by default.
maximum_significant_digits Optional. Determines the maximum number of significant digits to be returned. Default is 100, or the user's custom maximum set in the About box, or the maximum number allowed by the edition of xlPrecision, whichever is less.

Remarks

Examples

Formula Description Result
=xlpFACT(4) 1 x 2 x 3 x 4 24
=xlpFACT(5.1) 1 x 2 x 3 x 4 x 5 120
=xlpFACT(5.9) 1 x 2 x 3 x 4 x 5 120
=xlpFACT(-4) Negative num is invalid #NUM!
=xlpFACT(9999) Num over 9,273 is invalid #NUM!

See Also

xlpFACTDOUBLE