Factorial Calculator

Enter any non-negative integer n into the Factorial Calculator and get back n! — the product of all positive integers from 1 up to n. You'll see the full integer result, its scientific notation, and a step-by-step breakdown of the multiplication sequence. Works for values from 0! = 1 up to large numbers.

Enter a non-negative integer. For very large values (n > 170), the result will be shown in scientific notation.

Results

n! Result

--

Scientific Notation

--

Number of Digits

--

Calculation Sequence

--

Results Table

Frequently Asked Questions

What is a factorial?

A factorial is the product of all positive integers from 1 up to a given number n, written as n!. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials are widely used in combinatorics, probability, and algebra to count permutations and combinations.

What is the factorial formula?

The factorial formula is n! = n × (n − 1) × (n − 2) × … × 2 × 1. For example, 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720. By definition, 0! = 1.

Why does 0! equal 1?

By mathematical convention, 0! is defined as 1. This definition is consistent with the combinatorial interpretation: there is exactly one way to arrange zero objects (doing nothing), and it also ensures that recursive formulas like n! = n × (n−1)! work correctly when n = 1.

What is the largest factorial I can calculate?

Standard floating-point arithmetic can handle exact values up to about 170! before exceeding the maximum representable number. Beyond that, results are expressed in scientific notation. This calculator supports inputs up to 10,000, displaying scientific notation for large values.

What are factorials used for?

Factorials appear in many areas of mathematics and science. They are used to calculate permutations (n! ways to arrange n objects), combinations (n! / k!(n−k)!), Taylor series expansions, and probability distributions such as the Poisson and binomial distributions.

How many digits does a large factorial have?

The number of digits in n! grows rapidly. For example, 10! has 7 digits, 100! has 158 digits, and 1000! has 2,568 digits. You can use Stirling's approximation — log₁₀(n!) ≈ n·log₁₀(n) − n·log₁₀(e) — to estimate the digit count for very large n.

What is the difference between a permutation and a factorial?

A factorial n! counts the total number of ways to arrange all n distinct objects in a sequence. A permutation P(n, k) = n! / (n−k)! counts the ways to choose and arrange k objects out of n. Factorials are the building block for both permutations and combinations.

Can factorials be calculated for negative numbers or decimals?

Standard factorials are only defined for non-negative integers. However, the Gamma function Γ(n) extends the concept to real and complex numbers, where Γ(n) = (n−1)! for positive integers. This calculator works with non-negative integers only.

More Math Tools