Formualizer Docs

FACT

Returns the factorial of a non-negative integer.

FACT truncates fractional inputs toward zero before computing the factorial.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=FACT(number)

Arguments

ArgumentTypeRequiredDefault
numbernumberRequired—

Error cases

  • Non-numeric values that cannot be coerced return #VALUE!.
  • Negative inputs return #NUM!.
  • Results above 170! overflow Excel-compatible limits and return #NUM!.

Examples

Evaluate the factorial product for a positive odd integer.

Formula =FACT(7)

Expected result 5040

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Pass a fractional value to see how the input is truncated.

Formula =FACT(6.9)

Expected result 720

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Evaluate the product at zero.

Formula =FACT(0)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A negative input is outside the supported domain.

Formula =FACT(-3)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Basic factorial

Formula =FACT(5)

Expected result 120

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Fractional input is truncated

Formula =FACT(5.9)

Expected result 120

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Negative input returns numeric error

Formula =FACT(-1)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why does FACT(171) return #NUM!?

Excel-compatible factorial support is capped at 170!; larger values overflow and return #NUM!.

Does FACT round fractional inputs?

No. It truncates toward zero before computing the factorial.

Implementation

Engine source

On this page