Factorial of a number N


Enter any non-negative number between 1 to 100 and press 'Calculate'.

Factorial Calculator



Result:

Factorial: 0



What is Factorial?

Factorial of a number is the product of all the numbers less than that number. In other words, the factorial function gives the product of a number with every number less than it. It is denoted by the exclamation point, “!”.

For example, 4! = 4 × 3 × 2 × 1 = 24. The factorial can only be calculated for positive integers.

For an arbitrary integer n, the n! = n × (n-1) × (n-2) × (n-3) × … 2 × 1. The factorial of 0 is 1.

Some examples are as follows.

Factorial examples - www.numeberbau.com


Properties of Factorial

Given below are some important properties of factorial.

Number – The number for which the factorial is to be calculated is always a positive integer.

Factorial – The factorial for the number is the product of all the numbers less than that number.

Double factorial – The double factorial for a number is the product of all the numbers less than that number, and having the same parity as that number. It is defined differently for even and odd numbers.

Factorial formula

For any positive integer n, the factorial is defined as

n! = n × (n-1) × (n-2) × (n-3) × … × 3 × 2 × 1.

For example, 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720.

The factorial representation using the product notation is $$ n! = \prod_{k=1}^n {k} $$

So, 6! can be written as: $$ 6! = \prod_{k=1}^6 {k} $$

The factorial for a number n can also be written in the form of a recurrence relation. This relation defines the factorial as the product of the number n with the factorial of the number less than n by one. This is written as n! = n × (n-1)! For example, 6! = 6 × (6-1)! = 6 × 5! = 6 × 120 = 720.

The double factorial formula is defined as follows.

If n is even and n > 0, n!! = n × (n-2) × (n-4) × (n-6) × … × 4 × 2.

If n is odd and n > 0, n!! = n × (n-2) × (n-4) × (n-6) × … × 3 × 1.

If n = 0, 0!! = 1.

For example, 6!! = 6 × (6-2) × (6-4) = 6 × 4 × 2 = 84, and 7!! = 7 × (7-2) × (7-4) × (7-6) = 7 × 5 × 3 × 1 = 105.

Characteristics of factorial

Given below are some characteristics of factorial.

  • The factorial is defined only for positive integers.
  • For any positive integer n, n! = n × (n-1)!, or $$ {n! \over n} = (n-1)! $$
  • The factorial of 0 is 1, that is 0! = 1.
  • The factorial of 1 is also 1. 1! = 1.
  • Double factorial is a kind of multiple factorial denoted by n!!. It is the factorial of all the numbers less than n and having the same parity as n. There are two different formulas for double factorial depending on whether n is even or odd.

  • Areas of application

    The factorial function has quite a few applications in mathematics as well as real-life.

    1) Factorials are immensely useful in permutations and combinations when we need to find the different orders of arrangement of a set of objects, or the various ways a set of objects can be combined.
    The factorial n! of a number n, shows how many different ways we can arrange n objects. For arranging the first object, we have n choices. For each n choice, we obtain n-1 choices for the second object. So, for arranging the first two objects in order, we have n(n-1) choices. Now, for the third object, we have n-2 choices. This continues till we are left with 1 choice for the nth object.
    Hence, n! = n × (n-1) × (n-2) × (n-3) × … × 3 × 2 × 1 illustrates how many ways we can arrange n objects in order. For example, if you have 3 books, there are 6 different ways to arrange them on a bookshelf. If you have 5 books, there are 120 different ways to arrange them.

    2) The factorial function is also used when we need to choose k objects from a set of n objects. This is the definition of combinations, given by n!/(k!(n-k)!), which is denoted as nCk. For example, if a college offers 5 courses, and a student is permitted to choose only 3 among them, the number of ways they can do so is, 5C3 = 5!/(3!2!) = 120/(6*2) = 120/12 = 10. Hence, the student can choose 3 courses out of 5 in 10 different ways.

    3) The factorial function is frequently seen in calculus. The Taylor’s theorem is one such example. $$ f(x) = \sum_{k=0}^{\infty} {{{f^{(n)}(x_0)} \over k!} (x-x_0)^k} $$

    4) It is also used to define trigonometric functions like sine and cosine, and also the exponential function.

    $$ e^x = 1+{x\over1!}+{x^2\over2!}+{x^3\over3!}+... \; -\infty < x < \infty $$

    $$ sin \; x = x - {x^3\over3!}+{x^5\over5!}-{x^7\over7!}+{x^9\over9!}-... \; -\infty < x < \infty $$

    $$ cos \; x = 1 - {x^2\over2!}+{x^4\over4!}-{x^6\over6!}+{x^8\over8!}-... \; -\infty < x < \infty $$

    5) Other than positive integers, factorials can also be calculated for real and complex numbers. This can be done using gamma functions.


    See also: