Factorial Calculator
Find n! for an integer from 0 to 170, with a product expansion, digit count and scientific notation.
Enter a whole number from 0 to 170. (170! ≈ 7.26 × 10306)
Read n! as a descending product
The exclamation mark after a non-negative integer tells you to multiply that number by every positive integer below it. Thus 6! means 6 × 5 × 4 × 3 × 2 × 1, which equals 720. The factorial formula is n! = n × (n-1) × ... × 2 × 1. A recursive solution writes the same rule as n! = n × (n-1)!.
Two boundary values keep the rule useful: 1! = 1 and 0! = 1. The second value may look unusual because there is no descending product to write. In counting terms, however, there is exactly one arrangement of zero objects, the empty arrangement. It also allows the recursive rule and combination identities to continue without a special exception in the middle of a calculation.
Choose the output that fits the next step
The Factorial Calculator accepts integers from 0 through 170. After calculating, it reports the digit count and a five-significant-digit scientific approximation. For inputs up to 20, the expanded multiplication is shown in full. Longer results are shortened on screen so the result card remains readable, but the copy button places every digit of the exact BigInt value on the clipboard.
- Use the expanded product when checking a homework step or spotting a missing factor.
- Use the digit count to judge the size of an answer without reading hundreds of digits.
- Use the copied integer when another exact calculation follows.
Decimals and negative values are rejected because this page uses the finite whole-number definition. The Gamma function extends related ideas beyond that range, but it is not part of this tool. The calculation runs in your browser; the entered number is not sent to the server for evaluation.
Add finished factorials, not their inputs
A sum of factorials must be evaluated term by term. For example, 1! + 2! + 3! + 4! becomes 1 + 2 + 6 + 24, giving 33. It is not the same as (1 + 2 + 3 + 4)!, which first produces 10 and then evaluates 10!. Likewise, (a+b)! cannot generally be replaced with a!+b!.
Counting arrangements without listing each one
Factorials appear naturally when order matters. Five different books can fill five shelf positions in 5! = 120 ways. If only r items are taken from n, the ordered count is P(n,r) = n! / (n-r)!. When order is irrelevant, the combination formula removes the r! internal arrangements as well: C(n,r) = n! / (r!(n-r)!). Choosing three people from ten gives 120 teams; assigning first, second and third place among ten gives 720 ordered outcomes.
Growth is steep. While 2¹⁰ is 1,024, the value of 10! is 3,628,800. This is why an algorithm that tries every possible ordering can become impractical with a modest input. The notation O(n!) describes the number of cases such an algorithm explores. Computing one factorial by multiplying from 2 through n takes a sequence of roughly n multiplications, not n! multiplications.
Frequently Asked Questions About the Factorial Calculator
For a non-negative integer n, it is the product of positive integers from n down to 1 and is written n!. For example, 5! = 120.
There is one way to arrange zero objects: leave the arrangement empty. Setting 0! to 1 also keeps n! = n × (n-1)! and the standard combination formulas consistent.
Evaluate each term before adding. Thus 1! + 2! + 3! + 4! = 33. In general, (a+b)! is not equal to a!+b!.
No. This calculator evaluates n! only for integers from 0 through 170. Extending the idea to decimals or negative values requires the Gamma function, which is outside this tool’s scope.
Couldn't find the answer you were looking for?
Explore all our tools and get the fastest answer to your question.