Factorial: Formulas, Properties, Tricks and Examples

Factorial is the product of all positive integers from 1 up to a given non-negative integer. It is written using the symbol !. This page covers factorial formulas, recursive rules, special values, simplification methods, trailing-zero calculations and common factorial questions with numerical examples.

On this page

What Is Factorial?

For a non-negative integer n, factorial n, written as n!, is the product of all positive integers from 1 to n. Thus, n! = n × (n − 1) × (n − 2) × ... × 2 × 1.

The factorial of zero is defined as 0! = 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorial is defined directly for non-negative integers in standard quantitative aptitude problems.

Factorial Formula & Tricks

Important Formulas

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

This gives the product of every positive integer from n down to 1, where n is a non-negative integer.

Recursive factorial formula
n! = n × (n − 1)! for n ≥ 1

A factorial can be calculated by multiplying n by the factorial of the preceding integer.

Zero factorial
0! = 1

This value maintains the recursive rule because 1! = 1 × 0! = 1.

Factorial ratio
n! / (n − r)! = n × (n − 1) × ... × (n − r + 1)

The common factorial terms cancel, leaving r consecutive factors.

Trailing zeros of n!
Zeros = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ...

Continue the sum while the powers of 5 are less than or equal to n. The result counts factors of 10 because factors of 2 are more abundant than factors of 5 in n!.

Quick Tricks

Cancel factorials before multiplying

When factorials appear in a fraction, expand only the unmatched factors instead of calculating the complete factorials.

Example: 8!/5! = (8 × 7 × 6 × 5!)/5! = 8 × 7 × 6 = 336.
Count trailing zeros using powers of 5

Count the factors of 5 in n!, including repeated factors such as 25 = 5² and 125 = 5³.

Example: The number of zeros in 100! is ⌊100/5⌋ + ⌊100/25⌋ = 20 + 4 = 24.
Use the recursive form for consecutive factorials

Replace a larger factorial with a smaller factorial multiplied by the intervening integer.

Example: 7! = 7 × 6!, so 7! + 6! = 7 × 6! + 6! = 8 × 6!.

Factorial Concepts

Evaluating Factorials

To evaluate n!, multiply all positive integers from n down to 1; for 0, use 0! = 1.

For example, 4! = 4 × 3 × 2 × 1 = 24. Similarly, 1! = 1 and 0! = 1. Factorial values grow rapidly as n increases.

Example: 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720.

Recursive and Consecutive Factorial Relations

The basic relation is n! = n × (n − 1)!, which connects consecutive factorials.

This relation allows expressions to be combined without fully evaluating the factorial. For example, 5! + 4! = 5 × 4! + 4! = 6 × 4! = 144.

Example: Since 4! = 24, 5! + 4! = 120 + 24 = 144.

Simplifying Factorial Fractions

In a factorial fraction, cancel the common factorial terms before performing multiplication or division.

If the numerator has the larger factorial, expand it only until the denominator factorial appears. For n ≥ r, n!/(n − r)! contains r factors: n, n − 1, ..., n − r + 1.

Example: 10!/7! = (10 × 9 × 8 × 7!)/7! = 10 × 9 × 8 = 720.

Factorial in Permutations and Combinations

Factorials express arrangements and selections through nPr = n!/(n − r)! and nCr = n!/[r!(n − r)!].

nPr counts ordered arrangements of r objects selected from n objects. nCr counts selections where order does not matter. Also, nCr = nC(n − r).

Example: 5P2 = 5!/3! = 5 × 4 = 20, while 5C2 = 5!/(2!3!) = 10.

Trailing Zeros in a Factorial

The number of trailing zeros in n! equals the number of pairs of factors 2 and 5, which is found by counting factors of 5.

Use ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ... . Terms are added until the denominator exceeds n. For 50!, the count is ⌊50/5⌋ + ⌊50/25⌋ = 10 + 2 = 12.

Example: 50! ends in 12 zeros.

Factorial Video Lessons

Watch short topic-wise lessons for quick revision.

14 Lessons
Lesson 1 of 14 Quick Revision

Factorials: Trailing Zeros and Prime Powers

Learn how to find trailing zeros in factorials and determine the highest power of a prime that divides a factorial using standard number system methods.

Continue with more lessons and practice in PrepShots.Watch More in App - Start ₹1 Trial →
More Factorial Lessons Scroll to explore →

Practice Factorial Questions

Practise published questions related to this topic.

Factorial Quick Quiz

Attempt 5 questions and check your score instantly.

Quick Revision Notes

Factorial Revision Points

Recall these definitions, formulas and calculation rules for factorial questions.

  • n! = n × (n − 1) × ... × 2 × 1 for n ≥ 1.
  • 0! = 1 and 1! = 1.
  • Use n! = n × (n − 1)! to relate consecutive factorials.
  • Cancel common factorial terms before multiplying a factorial fraction.
  • n!/(n − r)! = n × (n − 1) × ... × (n − r + 1).
  • nPr = n!/(n − r)! and nCr = n!/[r!(n − r)!].
  • The number of trailing zeros in n! is the sum of the integer parts of n/5, n/25, n/125 and so on.

Factorial FAQs

What is the value of 0!?

0! = 1. This definition makes the recurrence 1! = 1 × 0! valid.

How do you calculate 7! without a calculator?

Multiply the integers from 7 to 1: 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040.

How can 9!/6! be simplified?

Cancel 6!: 9!/6! = (9 × 8 × 7 × 6!)/6! = 9 × 8 × 7 = 504.

What is the formula for the number of trailing zeros in 100!?

Use ⌊100/5⌋ + ⌊100/25⌋ + ⌊100/125⌋ = 20 + 4 + 0 = 24. Therefore, 100! has 24 trailing zeros.

What is the difference between nPr and nCr factorial formulas?

nPr = n!/(n − r)! counts ordered arrangements, whereas nCr = n!/[r!(n − r)!] counts selections where order does not matter.

Is 5! + 4! equal to 9!?

No. 5! + 4! = 120 + 24 = 144, while 9! = 362,880.

Continue learning Factorial on PrepShots

Continue on PrepShots