Home / Math / Factorial Calculator

Factorial Calculator

Calculate n! (n factorial) for any non-negative integer up to 170.

The Factorial Calculator computes n! (n factorial) for any non-negative integer. The factorial of n is the product of all positive integers from 1 to n: n! = n × (n-1) × (n-2) × ... × 2 × 1.

Special Cases

  • 0! = 1 (by definition)
  • 1! = 1
  • 5! = 120 (5 × 4 × 3 × 2 × 1)
  • 10! = 3,628,800

Where Factorials Are Used

Factorials appear frequently in combinatorics and probability. The number of ways to arrange n distinct objects is n!. Combinations and permutations both use factorials: C(n,r) = n!/(r!(n-r)!) and P(n,r) = n!/(n-r)!. Factorials also appear in Taylor series expansions and the definition of the exponential function.

The calculator supports values up to 170! since larger values exceed floating-point number limits. The result also shows the number of digits in the factorial.

Frequently Asked Questions

Why is 0! equal to 1?
By convention and mathematical consistency. There is exactly one way to arrange zero objects: do nothing. This also ensures formulas like C(n,0) = n!/0!n! = 1 work correctly.
Why is the maximum input 170?
171! exceeds the maximum value representable by a 64-bit floating-point number (approximately 1.7 × 10³⁰⁸), so 170 is the largest factorial that can be computed without overflow.
Can I compute factorials of decimals?
This calculator handles non-negative integers only. For non-integer values, you would use the Gamma function where Γ(n+1) = n!, which is beyond this tool.
Factorial Calculator
{{ error }}
Pricing

Pay only for what you use. No subscriptions, no hidden fees.

Action Credits Description
Calculate 0.001 Evaluate any calculator formula
List Calculators FREE Browse all available calculators
Calculator Info FREE Get formula definition and details
Search FREE Search across all calculators
Guest Usage (on site) FREE Up to 50 calculations/hour
Free to use on the website! Guest users get 50 free calculations per hour. Sign in for unlimited access.
135+ Calculators
16 Categories
30 Languages
Real-time Results
Educational Content
SEO-friendly URLs
API Access
No Expiry
Type to search 135+ calculators...