Calculateus

Factorial Calculator

Calculate the factorial of a non-negative integer.

Result

10!
3,628,800
nn!
01
11
22
36
424
5120
6720
75,040
840,320
9362,880
103,628,800

About the Factorial Calculator

Factorial - the product of every positive integer up to a given number - grows explosively fast and shows up constantly in probability, combinatorics, and statistics. Our Factorial Calculator finds it instantly for any non-negative integer.

How It Works

The calculator multiplies every integer from 1 up to your entered number together to find the factorial, with special handling for 0! (defined as 1 by mathematical convention) and validation to prevent inputs too large to compute reliably.

n! = n × (n−1) × (n−2) × ... × 2 × 1

Formula & Methodology

Factorial counts the number of ways to arrange n distinct items in order - the first position has n choices, the second has n−1 remaining choices, and so on down to exactly 1 choice for the last position, and multiplying all those choices together gives the total number of possible orderings. This is exactly why factorial appears throughout permutation and combination formulas: it's fundamentally a count of arrangements, which those formulas build on directly.

Step-by-Step: Calculating It By Hand

  1. 1Start with the target number n.
  2. 2Multiply n by (n−1), then by (n−2), continuing down to 1.
  3. 3The final product is n factorial.

Examples

Small factorial

5! = 5 × 4 × 3 × 2 × 1 = 120.

Explosive growth

10! already equals 3,628,800 - factorials grow so fast that even modest numbers produce enormous results very quickly.

Advantages

  • Handles factorial calculation instantly for any valid non-negative integer
  • Correctly defines 0! as 1, a common point of confusion
  • Formats large results with proper number separators for readability
  • Foundational tool for permutation, combination, and probability calculations

Common Mistakes

  • Forgetting 0! equals 1 by mathematical definition, not 0
  • Attempting negative or non-integer factorial inputs, which aren't defined by this basic formula
  • Underestimating how quickly factorials grow - by n=170, results exceed what standard floating-point numbers can represent precisely
  • Confusing factorial notation (n!) with other mathematical notations

Edge Cases to Watch For

  • 0! is defined as exactly 1 by mathematical convention, not 0 - this preserves consistency in formulas like permutations and combinations that rely on factorial.
  • Factorial is only defined for non-negative integers - negative numbers and non-integers don't have a standard factorial under this basic definition (though the related gamma function extends the concept).
  • Factorial values grow extremely fast - 10! is already over 3.6 million, and 20! exceeds 2.4 quintillion.
  • Very large factorials (roughly beyond 170!) exceed what standard floating-point numbers can represent with full precision.

Common Use Cases

  • Probability and combinatorics homework involving factorial calculations
  • Foundational calculations for permutations and combinations
  • Statistics coursework involving factorial-based formulas
  • Understanding how quickly factorial growth accelerates
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

Why is the limit 170?

170! is the largest factorial that fits in a standard double-precision floating point number without overflowing to Infinity - 171! and beyond exceed JavaScript's numeric range.

Conclusion

Factorials are the building block behind both permutations and combinations - our Permutation and Combination calculators apply this same underlying concept to count ordered and unordered arrangements respectively.