Factorial Calculator

Factorial Visualization
n!

Factorial Calculator

What is a Factorial?

In mathematics, the factorial of a non-negative integer \(n\), denoted by \(n!\), is the product of all positive integers less than or equal to \(n\). It's a fundamental concept in combinatorics and many areas of mathematics.

Formula and Its Meaning

The factorial of \(n\) is defined as:

\[n! = n \times (n-1) \times (n-2) \times ... \times 3 \times 2 \times 1\]

For example, 5! = 5 × 4 × 3 × 2 × 1 = 120

By definition, 0! is equal to 1.

Calculation Steps

  1. Start with the given number \(n\).
  2. Multiply \(n\) by \(n-1\).
  3. Continue multiplying by the next lower integer.
  4. Stop when you reach 1.
  5. The final product is \(n!\).

Example Calculation

Let's calculate 5!

  1. 5! = 5 × 4 × 3 × 2 × 1
  2. = 20 × 3 × 2 × 1
  3. = 60 × 2 × 1
  4. = 120 × 1
  5. = 120

Visual Representation

5! 5 × 4 × 3 × 2 × 1 = 120

This diagram illustrates the factorial of 5, showing the multiplication of all integers from 1 to 5.