Skip to main content

Factorial Calculator

Calculate n! (n factorial) for a non-negative integer.

Reviewed for accuracy by the Math Ora X team Last updated

Result

What is a factorial?

A factorial, written with an exclamation mark like 5!, means you multiply together every whole number from 1 up to that number. So 5! is 5 × 4 × 3 × 2 × 1, which comes to 120. Factorials answer the question "how many ways can I arrange these items in order," which is why they sit at the heart of permutations, combinations, and probability.

$$n! = n \times (n-1) \times \cdots \times 2 \times 1$$

One quirk worth remembering: 0! is defined as 1, not 0. That is a convention, but a useful one, because it keeps the combination and permutation formulas working correctly.

How to use this calculator

  1. Enter a non-negative whole number, such as 5 or 10.
  2. Click calculate to get the factorial value.
  3. Read the result, which shows \(n!\).
  4. If needed, compare the step-by-step multiplication to check your work.

The formula explained

The formula \(n! = n \times (n-1) \times \cdots \times 2 \times 1\) computes the product of all positive integers from \(n\) down to 1. By definition, \(0! = 1\).

  • n = a non-negative integer input
  • n! = the factorial of n, the product of all positive integers from n down to 1

Step by step method

  1. Start with the number you want, for example 5.
  2. Multiply it by the next smaller whole number until you reach 1.
  3. Write the final product as the factorial value.

Worked example

Problem. Find \(6!\).

  1. Write out the product: \(6! = 6 \times 5 \times 4 \times 3 \times 2 \times 1\).
  2. Multiply in order: \(6 \times 5 = 30\), \(30 \times 4 = 120\), \(120 \times 3 = 360\), \(360 \times 2 = 720\), \(720 \times 1 = 720\).
  3. So \(6! = 720\).

Answer. \(6! = 720\)

Tips and common mistakes

  • Factorial only works for non-negative integers, so \(3.5!\) is not defined in this calculator.
  • Remember that \(0! = 1\), not 0.

Frequently asked questions

Why is 0! equal to 1?+

There is exactly one way to arrange nothing: do nothing. Defining 0! as 1 reflects that, and it also keeps formulas like the combination formula from breaking when you divide by 0!.

Can you take the factorial of a negative number or a decimal?+

Not with the ordinary definition, which only works for non-negative whole numbers. There is an advanced extension called the gamma function that handles decimals and more, but the everyday factorial stays with whole numbers.

Why do factorials grow so fast?+

Each step multiplies by a larger number, so the total compounds quickly. By the time you reach 10! you are already past three million, and 20! has nineteen digits. This rapid growth is why factorials dominate counting problems.

More Mathematics Tools

Explore related calculators in this category

You Might Also Like

Popular tools from other categories

Can't Find the Right Calculator?

Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.

Try AI Solver

Browse All Categories

Home Mathematics Current Tool
Facebook Twitter WhatsApp