Quick answer
n! = n × (n − 1) × … × 1, with 0! = 1. 5! = 120. The calculator handles n from 0 to 1000 and returns exact integers.
Enter n. The calculator returns n! in full.
Related tools: Random Number Generator: Random integers in a range, optionally repeatable with a seed. Scientific Calculator: Evaluate expressions with functions, constants, powers and factorials. Roman Numeral Converter: Convert between numbers and Roman numerals (1–3999).
How to use the Factorial Calculator
- Enter n (a whole number, between 0 and 1000).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| n | A whole number | ≥ 0, ≤ 1000 |
Formula and method
Formula
n! = n × (n−1) × … × 1, 0! = 1
IEEE-754 double precision; shown to at most 6 decimal places.
Exact BigInt multiplication.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: n = 5.
| Result | Value |
|---|---|
| n! | 120 |
Example 2
Inputs: n = 0.
| Result | Value |
|---|---|
| n! | 1 |
Example 3
Inputs: n = 20.
| Result | Value |
|---|---|
| n! | 2,432,902,008,176,640,000 |
The first line is the headline result (n!). IEEE-754 double precision; shown to at most 6 decimal places.
Growth
Factorials grow fast: 10! = 3,628,800, 20! = 2,432,902,008,176,640,000 and 70! is about 1.2 × 10¹⁰⁰. 1000! has 2,568 digits.
Why 0! = 1
There is exactly one way to arrange zero objects (do nothing), and defining 0! = 1 keeps formulas for permutations and combinations consistent, such as C(n, 0) = 1.
Counting arrangements
n! counts the ways to arrange n distinct items: 5 books can be arranged in 5! = 120 ways and 10 items in 10! = 3,628,800 ways. Factorials grow faster than exponentials.
0! = 1 by convention, because there is exactly one way to arrange nothing, and it keeps the formulas for permutations and combinations consistent.
How the result changes with n
Holding every other input at the first worked example, this table changes only n. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| n | n! |
|---|---|
| 3 | 6 |
| 5 | 120 |
| 10 | 3,628,800 |
| 20 | 2,432,902,008,176,640,000 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- n: entering "1001" shows "n must be at most 1000." beside that field and no result.
Choosing between the Factorial Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Random Number Generator](/math/random-number-generator/) | minimum, maximum and how many | Random numbers |
| [Scientific Calculator](/math/scientific-calculator/) | expression and angle mode | Result |
| [Roman Numeral Converter](/math/roman-numeral-converter/) | convert and value | Roman numeral |
| [Prime Number Calculator](/math/prime-number-calculator/) | number | Result |
| [Fibonacci Sequence Calculator](/math/fibonacci-sequence-calculator/) | position n | F(10) |
Assumptions and limitations
- n from 0 to 1000
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for n to confirm this.
Frequently asked questions
What is 6!?
6! is 720, which is 6 times 5! (120).
Can I take the factorial of a negative number?
Not for integers; the calculator rejects it.
Where are factorials used?
Counting arrangements, probability and series.
Why is 0! equal to 1?
There is one way to arrange zero items, and defining 0! = 1 keeps counting formulas working.
What is 10 factorial?
10! = 3,628,800.
What does the Factorial Calculator calculate?
n! computed exactly. It returns n!.
What formula does the Factorial Calculator use?
n! = n × (n−1) × … × 1, 0! = 1. Exact BigInt multiplication.
What do I need to enter in the factorial Calculator?
You enter n.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. n from 0 to 1000.
What is an example of a factorial result?
With n 5, the n! is 120.
Where does the method come from?
The method follows: OpenStax, Algebra and Trigonometry 2e (Rice University): factorials, permutations and combinations.
Related calculators
- Random Number Generator — Random integers in a range, optionally repeatable with a seed.
- Scientific Calculator — Evaluate expressions with functions, constants, powers and factorials.
- Roman Numeral Converter — Convert between numbers and Roman numerals (1–3999).
- Prime Number Calculator — Check whether a number is prime and find the next prime.
- Fibonacci Sequence Calculator — The nth Fibonacci number and the sequence leading to it.
- Complex Number Calculator — Add, subtract, multiply and divide complex numbers.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): factorials, permutations and combinations
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.