Find the factorial of a number.
Every whole number from n down to 1 is multiplied together.
n!: n × (n−1) × (n−2) × ... × 1
The factorial of a whole number n, written n!, is the product of every whole number from n down to 1. So 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720. This calculator works out n! for any whole number from 0 to 170 and shows the multiplication chain.
Factorials answer a simple counting question: in how many different orders can n distinct things be lined up? Six books on a shelf can be arranged in 720 ways. That is why factorials sit at the heart of permutations, combinations, the binomial theorem and probability, all of which appear in the Class 11 syllabus and in JEE and CAT preparation. Factorials grow so quickly that even 13! is over six billion, so a calculator saves real effort and avoids slips.
1. Check that n is a whole number that is 0 or more. Factorials are not defined here for negatives or fractions.
2. If n is 0 or 1, the answer is 1.
3. Otherwise write the chain n × (n − 1) × (n − 2) × … × 2 × 1.
4. Multiply from the top down, keeping a running product, for example 7! = 7 × 6 = 42, × 5 = 210, × 4 = 840, × 3 = 2,520, × 2 = 5,040.
5. Use n! = n × (n − 1)! to save work if you already know the previous factorial.
6. When factorials appear in a fraction, cancel before multiplying, for example 10! ÷ 8! = 10 × 9 = 90.
Suppose you must fill n positions with n different objects. The first position can take any of the n objects. Once it is filled, n − 1 remain for the second, then n − 2 for the third, and so on until one object is left for the last place. By the multiplication principle, the total number of arrangements is n × (n − 1) × … × 1, which is exactly n!. This is the basic building block from which nPr and nCr are derived.
The rule n! = n × (n − 1)! gives 1! = 1 × 0!, and since 1! = 1, we need 0! = 1. There is also a counting reason: there is exactly one way to arrange nothing, which is to do nothing. Defining 0! as 1 makes formulas such as nCn = n! ÷ (n! × 0!) = 1 work without special cases, so the choice is forced by consistency rather than taste.
Each step multiplies by a larger number, so factorials outgrow any power such as 2^n or 10^n eventually. 10! is 36,28,800 and 20! already has 19 digits. Stirling's approximation, n! ≈ √(2πn) × (n/e)^n, describes this growth for large n. The calculator stops at 170 because 171! exceeds about 1.8 × 10^308, the largest value a standard double-precision number can hold. Beyond about 18!, the displayed value is also rounded, because doubles keep only around 15 to 17 significant digits.
Arjun is arranging 9 different trophies in a single row on the school's display shelf and wants to know how many different orders are possible.
Answer: n! 3,62,880
Thinking 0! is 0. It is 1, and using 0 breaks every combination formula that contains it.
Computing large factorials fully and then dividing, instead of cancelling first. 100! ÷ 98! is just 100 × 99.
Using n! when some objects are identical. Arranging the letters of APPLE needs 5! ÷ 2! because the two Ps are the same.
Assuming the digits shown for very large factorials are all exact. Beyond about 18!, trailing digits are rounded.
Entering a decimal such as 4.5. Ordinary factorials are defined only for whole numbers.
Counting seating plans, queue orders and arrangements of distinct objects.
Building nPr and nCr values for permutation and combination problems.
Writing binomial expansion coefficients and Taylor series terms in calculus.
Computing probabilities in card games, lotteries and sampling problems.
Estimating how many possible orderings a brute-force search would have to try.
What is 0!?
0! is defined as 1, by mathematical agreement. This keeps formulas like combinations and permutations working correctly at the edge cases.