Math

Factorial Calculator

Calculate the factorial of a number, plus the number of trailing zeros in the result.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Factorial (approximate above 18!) 3,628,800
Results

About this calculator

For a nonnegative whole number n, n! multiplies every integer from 1 through n; 0! is 1. The numeric factorial output is exact through 18! and may be rounded by floating-point arithmetic above that. Digit and trailing-zero counts are computed separately.

Worked example

calculated with the default values below

Number 10 Factorial (approximate above 18!) 3,628,800 · Digits in result 7 · Trailing zeros 2

General background references

Disclaimer

These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

n! = Π_{i=1}^{k} i; D = floor(Σ_{i=1}^{k} log10 i) + 1; Z = Σ_{j: 5^j ≤ k} floor(k ÷ 5^j)

k
floor of n
n!
factorial
D
digit count
Z
trailing zeros

Input must be an integer 0–170. 0! = 1. Floating-point factorial values can round above 18!; digit count uses log10 sums and trailing zeros use powers of five.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Are large factorial values exact?

The digit and trailing-zero counts are computed separately, but the factorial itself uses floating-point arithmetic. Integer results are exact through 18!; larger displayed values may be rounded. The input accepts whole numbers from 0 to 170, and 0! equals 1.