Skip to content
UniKit

Factorial calculator

Compute n! exactly with BigInt (n up to 10000), plus digit count, scientific-notation approximation, a factorial table and computation time.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Non-negative integer nRange 0 ≤ n ≤ 10000, exact value computed with BigInt
Result n!

Enter n to compute automatically

What this tool does

  • Work out combinatorics by hand: how many ways n people can queue up, or the factorial denominators inside a binomial coefficient.
  • Check large-number arithmetic exactly — ordinary calculators and double-based code overflow past 170!, while this uses BigInt.
  • Quote the scale of a result in docs: 100! has 158 digits and is roughly 9.3326215e+157, which is handy when sizing data structures.
  • Look up small values in the factorial table (0! through n!) or just watch how absurdly fast factorials grow.

Example

Input

100

Output

100! = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 (158 digits, about 9.3326215e+157)

The value is an exact BigInt with no floating-point error; the scientific-notation figure is a display approximation rounded to 8 significant digits.

Frequently asked questions

Why can my calculator not compute factorials above 170?

Most calculators use double-precision floats, whose maximum is about 1.8e+308 — and 170! is already 7.26e+306, so anything larger becomes Infinity. This tool multiplies integers with BigInt, so even 10000! gives you every exact digit.

What is the largest n, and why is there a limit?

n goes up to 10000. The limit comes from the result length: 10000! has about 35660 digits, and beyond that the string handling and table rendering in the browser slow down badly, so results over 100000 digits are refused outright.

Why are both 0! and 1! equal to 1?

It is the standard convention in combinatorics: 0! means "zero items have exactly one arrangement", which keeps the binomial formula C(n,0) = n!/(0!·n!) = 1 valid. So entering 0 returns 1 instead of an error.

Are the digit count and the scientific notation exact?

The digit count is exact — it is the length of the result string. The scientific notation is approximate: it keeps 8 significant digits and rounds, so with long results the trailing digits differ from the exact value.

Is my input uploaded anywhere?

No. Factorials are computed in your browser with BigInt, the page makes no network requests, and the number you enter is never recorded.

Keywords:factorial阶乘n!bigint大数阶乘scientific notation科学计数法阶乘表math

Related tools