Toolvito

Works on this device

Factorial Calculator

Find the factorial of a whole number, with every digit for n up to 10,000. You can also work out a double factorial, type an expression with factorials, divide or multiply large factorials, simplify factorials that hold the letter n, and find the factorial of a decimal number.

Enter your values

Multiplies all whole numbers from 1 to n. The result is exact for n up to 100,000.

Your values

A whole number from 0 to 1,000,000,000. Results are exact up to 100,000.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

How to use this calculator

  1. Choose what you want to work out, for example Factorial of a whole number (n!).
  2. Enter the number n and choose Calculate.
  3. Read the result, the number of digits and the number of zeros at the end. For a long result, all digits are in a box that you can copy.
  4. For an expression, choose Work out an expression with factorials and type it with the ! sign, for example 5! + 4! or 10! / (3! * 7!).
  5. For a quotient of very large factorials, choose Divide or multiply factorials and type the numbers on top and on the bottom, without the ! sign.

What a factorial is

  • n! is the product of all whole numbers from 1 to n. For example 5! = 5 × 4 × 3 × 2 × 1 = 120.
  • 0! is 1 by definition. This makes formulas for counting work for zero items.
  • n!!, the double factorial, multiplies every second number: 9!! = 9 × 7 × 5 × 3 × 1 = 945. It is not (n!)!.
  • A quotient of factorials cancels: 10! ÷ 7! = 10 × 9 × 8 = 720.
  • In an expression, factorials are worked out first: -3! is −6, 2^3! is 2^6 = 64, and 2 × 3! is 12. Use brackets for anything else: (2 × 3)! = 720.
  • With a letter: (n + 2)! ÷ n! = (n + 2) × (n + 1) = n^2 + 3n + 2.
  • For a number that is not whole, x! = Γ(x + 1), where Γ is the gamma function. For example 0.5! = √π ÷ 2.

Worked examples

A factorial. 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. It has 7 digits and 2 zeros at the end, because 10 ÷ 5 = 2.

A large factorial. 100! has 158 digits and 24 zeros at the end. It starts with 9332621544.

A quotient. 10! ÷ (7! × 3!) = 120. This is the number of ways to choose 3 things from 10.

An expression. 5! + 4! = 120 + 24 = 144, and 5! ÷ 7! = 1/42. With two signs, 7!! = 7 × 5 × 3 × 1 = 105, while (3!)! = 6! = 720.

A decimal number. 0.5! = 0.8862269255, which is √π ÷ 2.

Limits you should know

  • Factorials are exact for n up to 100,000. All digits are listed up to n = 10,000. From there to 100,000 you get the first 30 digits, the number of digits and the zeros at the end.
  • Above 100,000 (up to 1,000,000,000) the value is rounded and written as a power of ten. Fewer digits are shown for larger n.
  • Double factorials are exact up to n = 200,000, with all digits up to n = 20,000.
  • In a typed expression, a factorial can be of a number up to 10,000, and numbers can have up to about 150,000 digits. It works with whole numbers, fractions, powers and factorials only: letters, roots and other functions are refused.
  • In the mode that divides factorials, each number can be up to 100,000, and the factorials on one side can have up to 600,000 digits together.
  • The factorial of a decimal number is rounded to 10 significant digits. It is not defined for negative whole numbers.
  • Permutations and combinations have their own tool. This page does not factorise numbers or algebra.

Related tools