Factorial Calculator (n!)

Exact factorials of any non-negative whole number from 0 to 1000, using big-integer arithmetic.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026

5!

120

What is a factorial?

The factorial of a non-negative whole number n, written n!, is the product of every whole number from 1 up to n. So 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1. Factorials count how many ways a set of things can be arranged in order, which makes them central to permutations, combinations and probability.

How it's calculated

Multiply all the whole numbers from 1 to n together: n! = n × (n − 1) × (n − 2) × ... × 2 × 1. Each factorial builds on the one before it, since n! = n × (n − 1)!. The values grow extremely fast, so exact results for larger inputs need big-integer arithmetic.

Example

To find 5!, multiply 5 × 4 × 3 × 2 × 1. Working left to right: 5 × 4 = 20, then × 3 = 60, then × 2 = 120, then × 1 = 120. So 5! = 120.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Enter a non-negative whole number n. The calculator multiplies every whole number from 1 to n, using big-integer arithmetic so even large results are exact.

Results above 170! exceed standard floating-point precision — that is why this tool uses BigInt under the hood.

Frequently asked questions

Why does 0! equal 1?+

There is exactly one way to arrange zero items (the empty arrangement), and it keeps the rule n! = n × (n − 1)! consistent at n = 1.

Can you take the factorial of a negative or decimal number?+

Not with the ordinary definition; factorials are defined for non-negative whole numbers. (The gamma function extends the idea, but that is beyond this tool.)

How are factorials used in permutations and combinations?+

Permutations use nPr = n! / (n − r)! and combinations use nCr = n! / (r! (n − r)!). See our Permutation & Combination Calculator.

Why do factorials get so big?+

Each step multiplies by a larger number, so they grow faster than any exponential; 20! already has 19 digits.

What is the largest factorial this tool shows?+

It computes exact values up to 1000! using big-integer arithmetic.