Factorial

Factorial multiplies all positive integers up to n to find permutations. Use it to count the number of ways to arrange distinct objects in order.

n!=n(n1)(n2)1,0!=1n! = n(n-1)(n-2)\cdots 1, \quad 0! = 1

Solve a problem with Factorial

Type the problem. The solver will use Factorial where Factorial is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Factorial takes
nn
Factorial
SymbolMeaning
nnThe count of items you are arranging; it must be a non-negative integer (0, 1, 2, 3, …). If you misread nn as the items themselves rather than their count, you will calculate the wrong result.

When to use it

You should use factorial when you need to count the number of different ways to arrange a fixed set of distinct items in order.

Level

Usually taught in: Algebra II

Worked examples

1. Calculate 5 factorial

Problem

Find 5!5!
  1. 5!=5×4×3×2×15! = 5 \times 4 \times 3 \times 2 \times 1

    Write the definition of factorial: multiply all positive integers from 5 down to 1.

  2. 5×4=205 \times 4 = 20

    Multiply the first two numbers.

  3. 20×3=6020 \times 3 = 60

    Multiply the result by the next integer.

  4. 60×2=12060 \times 2 = 120

    Continue multiplying by each remaining integer.

  5. 120×1=120120 \times 1 = 120

    Multiply by 1, which does not change the result.

Answer: 5!=1205! = 120

This is a straightforward application of the factorial definition. We multiply together all positive integers from 5 down to 1 in sequence.

2. Simplify a ratio of factorials

Problem

Evaluate 7!5!\frac{7!}{5!}
  1. 7!=7×6×5!7! = 7 \times 6 \times 5!

    Recognize that 7!7! can be rewritten as 77 times 66 times 5!5! using the definition of factorial.

  2. 7!5!=7×6×5!5!\frac{7!}{5!} = \frac{7 \times 6 \times 5!}{5!}

    Substitute the expanded form into the fraction so the smaller factorial appears in both numerator and denominator.

  3. 7×6=427 \times 6 = 42

    The 5!5! cancels from numerator and denominator, leaving only 7×67 \times 6 to multiply.

Answer: 7!5!=42\frac{7!}{5!} = 42

Dividing one factorial by another is a common pattern in permutation problems. By recognizing that 7!=7×6×5!7! = 7 \times 6 \times 5!, you can cancel the smaller factorial and avoid computing huge numbers.

3. Arrange concert tickets by price tier

Problem

You just sold 4 premium concert tickets and 3 standard concert tickets. For a promotional display, you need to arrange all 7 tickets in a row, with all premium tickets grouped first and all standard tickets grouped last. How many different orders are possible?
  1. 4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24

    There are 4 premium tickets to arrange within their section, which gives 4!4! possible orders.

  2. 3!=3×2×1=63! = 3 \times 2 \times 1 = 6

    There are 3 standard tickets to arrange within their section, which gives 3!3! possible orders.

  3. 4!×3!=24×6=1444! \times 3! = 24 \times 6 = 144

    By the multiplication principle, each arrangement of premium tickets can be paired with any arrangement of standard tickets, so we multiply the counts.

Answer: 144 different orders144 \text{ different orders}

This problem uses the multiplication principle together with factorials. Since the 4 premium tickets can be arranged in 4!4! ways and the 3 standard tickets in 3!3! ways independently, the total number of arrangements is their product.

Common mistakes

Where Factorial usually goes wrong
Answer came out wrong
Computing 5!=5+4+3+2+1=155! = 5 + 4 + 3 + 2 + 1 = 15
5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120
Stopping early, such as writing 5!=5×4×3=605! = 5 \times 4 \times 3 = 60
5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120
Writing 0!=00! = 0
0!=10! = 1 (by definition)
The mistakeWhy it is wrongThe fix
Computing 5!=5+4+3+2+1=155! = 5 + 4 + 3 + 2 + 1 = 15Factorial uses multiplication to combine the integers, not addition.5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120
Stopping early, such as writing 5!=5×4×3=605! = 5 \times 4 \times 3 = 60The definition of factorial requires multiplying all positive integers from nn down to 1, not just some of them.5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120
Writing 0!=00! = 0Zero factorial is defined to equal 1 by convention, even though this may seem counterintuitive.0!=10! = 1 (by definition)

Tips and when to use something else

  • Factorials grow extremely fast; simplify using division before computing: 10!8!=10×9=90\frac{10!}{8!} = 10 \times 9 = 90 is much easier than computing both factorials separately.
  • When a permutation problem asks you to choose and arrange kk items from nn items, use the permutation formula P(n,k)=n!(nk)!P(n,k) = \frac{n!}{(n-k)!} instead of computing full factorials manually.
  • Factorial is only defined for non-negative integers: expressions like (5)!(-5)! or (2.5)!(2.5)! have no meaning in elementary algebra.
  • For small factorials, write out the multiplication such as 5!=5×4×3×2×15! = 5 \times 4 \times 3 \times 2 \times 1 to check your arithmetic rather than relying on a calculator alone.

Frequently asked questions

Why is 0! = 1?
Zero factorial is defined as 1 by convention. While it might seem strange, this definition makes permutation and combination formulas work correctly. For instance, there is exactly one way to arrange zero objects (by doing nothing), which aligns with the definition 0!=10! = 1.
What is the fastest way to calculate a large factorial?
Instead of multiplying all the numbers, look for opportunities to cancel. For example, 10!8!=10×9\frac{10!}{8!} = 10 \times 9 rather than computing the full factorials. For factorials larger than about 12!12!, a calculator or computer is the practical choice since the results exceed millions.
Can you use factorial on negative numbers or decimals?
No; in elementary algebra, factorial is only defined for non-negative integers (0, 1, 2, 3, …). Expressions like (3)!(-3)! or (2.5)!(2.5)! have no meaning in this context. Advanced mathematics does define factorial for other values, but that is beyond Algebra II.
When do I need to use factorial in real life?
Factorials appear whenever you count arrangements or orderings: seating arrangements for events, scheduling tasks, arranging objects in a display, and many probability and statistics problems. Any time you ask 'how many different orders are possible?', factorial is likely the tool you need.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18