Factorial calculator

Exact n! for whole numbers up to 170.

Inputs

Factorial calculator

1 field

The limit of 170 is a page rule, not a mathematical limit of factorials or BigInt. The main result is exact. The scientific form retains the first seven digits without rounding the last; single-digit results use one digit. The value of 170! has 307 digits. Fractional, negative, blank or invalid input is rejected.

Fill in the fields and the result will appear here automatically.

Calculates n! as an exact integer for n from 0 to 170. BigInt retains every product digit, with the digit count and a compact scientific form alongside. Already 20! exceeds the general safe-integer limit of the ordinary number type, although 20! itself is still exactly representable; that does not mean all larger factorials begin rounding at the same step.

FAQ
4 questions
Freshness
formula-based

How it works

Formula and logic

n! is the product of every whole number from 1 to n, and 0! is defined as 1.

Example

10! is 3 628 800, and 20! is already 2 432 902 008 176 640 000.

Fields and units

  • Number n — unitless

How to use

  • — Enter a whole number from 0 to 170.
  • — Read the exact value.
  • — Check the digit count for very large results.

Method and limitations

Calculation method
Formula and logic
Limitation
The limit of 170 is a page rule, not a mathematical limit of factorials or BigInt. The main result is exact. The scientific form retains the first seven digits without rounding the last; single-digit results use one digit. The value of 170! has 307 digits. Fractional, negative, blank or invalid input is rejected.

FAQ

Why stop at 170?

That is a limit of this page, not of the arithmetic. 170! already runs to 307 digits, and beyond it the answer stops being something you can read.

Is the result exact?

Yes, the main value retains every digit using BigInt. Exceeding 2⁵³ − 1 removes the ordinary number type’s general exact-integer guarantee, rather than forcing an error specifically at 20!. The compact scientific row does not replace the full value.

Why is 0! equal to one?

It is the empty product: multiplying nothing together leaves the multiplicative identity, and the definition keeps the combinatorial formulas consistent.

Can I use a fraction?

No, this page accepts integers from 0 to 170 only. The extension uses Γ(n + 1), not Γ(n), and requires a separate calculation with its own domain.