Math

Factorial Calculator

Calculate factorial (n!) of any number up to 170.

CALCULATOR

Enter your numbers

Instant results

THE NUMORIX GUIDE

How to use the Factorial Calculator

Last reviewed September 14, 2026

What this calculator does

For a nonnegative integer n, multiply every integer from 1 through n: n! = 1 * 2 * .

Formula and method

For a nonnegative integer n, multiply every integer from 1 through n: n! = 1 * 2 * ... * n, with 0! = 1. The engine uses BigInt for the exact product through 170.

Variables and inputs

n is an integer. The visible UI starts at n = 10 and labels the practical input range 0-170; negative values are rejected.

Worked example

For n = 5: 1 * 2 = 2, *3 = 6, *4 = 24, *5 = 120, so 5! = 120. The visible default n = 10 gives 10! = 3,628,800.

How to interpret the result

A factorial counts the orderings of n distinct items and is the building block for permutations and combinations.

Common mistakes to avoid

Do not treat 0! as zero; it equals one. Do not use factorial for a noninteger count without a gamma-function definition, which this calculator does not implement.

Assumptions and limitations

The UI handler allows values up to 1000 but the engine returns Infinity above 170 because JavaScript Number.MAX_VALUE is exceeded. Results beyond the supported range are not exact.

Practical use and checks

A factorial counts ordered arrangements of distinct items and multiplies every positive integer from 1 through n. Enter 5 as a check; the result should be 120 because 5 x 4 x 3 x 2 x 1 equals 120. Entering 0 should also return 1 under the standard empty-arrangement convention. This makes the calculator useful for checking permutation formulas, counting possible schedules, or finding the factorial term in a probability calculation, but only when the items are distinguishable and the count is a nonnegative integer. Use n! for an arrangement problem only after deciding whether order matters. For choosing a committee, a combination usually avoids the extra order count; for assigning five people to five seats, 5! is appropriate. The result grows very quickly: 10! is 3,628,800, while 20! is already far beyond ordinary hand arithmetic. The implementation relies on JavaScript Number behavior, so very large inputs can overflow or lose exact integer precision, and decimal or negative input is an edge case rather than a valid factorial request. The calculator does not account for repeated objects, restrictions, or indistinguishable arrangements. State the counting assumptions beside any result used in a report.

Sources and references

COMMON QUESTIONS

Frequently asked questions

Why is 0! equal to 1?

It is the empty product and makes counting identities such as n choose 0 work consistently.

How does factorial relate to arrangements?

There are n! ways to arrange n distinct objects when every object is used exactly once.