About Factorial
Factorial multiplies together every integer from one up to the number you supply, the operation written with an exclamation mark. It underpins permutations and combinations, and it is the reason those two calculators can answer questions about arrangements without you having to construct them.
The input is floored before the calculation, so a value such as 7.9 is evaluated as 7. That matches the mathematical definition, which applies only to non-negative integers: there is no standard meaning for the factorial of a fraction outside the gamma function extension. Zero is handled by convention and returns one.
There is a hard ceiling worth knowing about. The largest factorial that fits in a double-precision floating-point number is 170, and the tool returns infinity for anything above that rather than silently switching to an approximate value. Results also begin to lose their trailing digits before that point, so for exact answers on large inputs a dedicated arbitrary-precision library for big integers is the right tool instead.
How to use Factorial
- 1 Enter a non-negative whole number.
- 2 Click calculate.
- 3 Read the factorial as a full integer, or as Infinity if the input exceeds 170.
Frequently asked questions
Does zero factorial really equal one?
Yes, by standard convention. It keeps the recurrence relation n! = n x (n-1)! valid at n = 1, and it matches the combinatorial reading, where there is exactly one way to arrange nothing.
Why does it return Infinity above 170?
Because 171! exceeds the largest value a double-precision floating-point number can represent, which is about 1.8 followed by 308 zeros. Beyond that the arithmetic overflows, so the tool reports the overflow rather than a number that would be wrong.
Can I calculate the factorial of a decimal number?
Not meaningfully here: the input is floored, so 7.5 behaves as 7. The continuous extension of the factorial is the gamma function, which is a different calculation and is not what this tool implements.
Are large results still exact?
Up to 22! the result is exact, since it fits within the range of integers a double can hold precisely. Beyond that the displayed digits become approximations of the true value, which is fine for comparing magnitudes but not for modular arithmetic.
Free, online, and private
Free to use
Factorial is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How Factorial behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Accepted input | 0 – 170, default 10 — the only field in this category that declares both a min and a max |
| Over the ceiling | anything above 170 is answered with the JavaScript value Infinity, not with an error message |
| How it is computed | a loop multiplying 2 × 3 × … × n inside a JavaScript double, not a big-integer library |
| Decimals | the input is floored before the loop, so 10.9 is evaluated as 10 |
| Zero | 0! is 1, produced by the loop running zero times |
| Formatting | a plain number-to-string cast — full digits up to 21, then JavaScript exponential form (22! prints as 1.1240007277776077e+21) |
Compiled from the implementation of this tool and checked against it by itoolnet.
What Factorial does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- The running product is a 64-bit float. Up to 18! every digit is exact because the value stays under 2^53, but beyond that the printed digits are the nearest double to the true value, and nothing in the output marks the point where they stopped being reliable.
- The only bound the calculation itself enforces is the upper one. A negative input is not rejected by the multiplication — the loop simply never runs and the answer comes back as 1 — so a value that gets past the form field produces "-5! = 1" rather than a complaint.
- There is no gamma-function extension. Because the input is floored rather than rounded, only whole numbers can be asked about, so 0.5! and 7.5! are out of reach even though both are perfectly well defined mathematically.
Tested and documented by itoolnet, the team that builds and maintains this site.