Factorial Calculator n! – Free Online Calculator
Factorial

Table of Contents
How to Use Factorial Calculator
For your convenience, say, Calculate 6!
Steps:
- Input ‘n’: = 6
- Click CALCULATE.
Observe the result: 6! = 720
Tips Tricks to Use Factorial Calculator
In order that you could not face any problem while using the factorial calculator, follow the tips and tricks:
- Don’t use negative number.
- Don’t use mixed number.
- Don’t use decimals.
- Don’t use “!” in the box.
Well, probably you are in a fix how it becomes 720? To meet your curiosity, here is the detail.
What is a Factorial?
Factorial might sound complicated, but it’s actually a simple concept. The factorial of a non-negative number, written as n! is just the result of multiplying all positive whole numbers up to n. For instance, the factorial of 5 (5!) is calculated as 5 x 4 x 3 x 2 x 1, which equals 120. Mathematically, it is expressed as n!=n×n-1n-2×… ×3×2×1.
Factorial Formula:
A. Standard Formula: n!=n×n-1!
B. Base Case: 0!=1.
- 1! = 1.
- 2! = 2.
Sub Factorial of a Number
The sub factorial, also known as the derangement number or !n (pronounced “sub factorial n“), represents the number of permutations of a set where none of the elements appear in their original position. It is denoted as !n.
For example, if you have the set {1, 2, 3}, the permutations include {2, 3, 1}, {3, 1, 2}, and so on. A derangement occurs when none of the elements are in their original positions.
The formula for the sub factorial is:
\[ !n = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!} \]
For example:
- For n = 3; 3! = 6
Sub factorial: !3 = 2 because there are two derangements:
{2, 3, 1} and {3, 1, 2}.
- For n = 4; 4! = 24
Sub factorial: !4 = 9 because there are nine derangements:
{2, 1, 4, 3},
{2, 3, 4, 1},
{2, 4, 1, 3},
{3, 4, 1, 2},
{4, 1, 2, 3},
{4, 3, 1, 2},
{1, 4, 2, 3},
{3, 1, 4, 2}, and
{1, 3, 4, 2}.
Factorial in Calculator n choose k
To calculate \( \binom{n}{k} \) where ‘n‘ is the total number of elements and ‘k’ is the number of elements to be chosen. The formula involves factorials:
\[ \binom{n}{k} = \frac{n!}{k!(n-k)!} \]
\(\text{Example: Calculate } \binom{5}{2} \)
\(\binom{5}{2} = \frac{5!}{2!(5-2)!}\)
\(= \frac{5 \times 4 \times 3 \times 2 \times 1}{2 \times 1 \times (3 \times 2 \times 1)}\)
\(= \frac{5 \times 4}{2 \times 1}\)
\(= 10\)
Factorial Calculator n and r
- For n! Calculating 4! \[ 4! = 4 \times 3 \times 2 \times 1 = 24 \]
- For n! and r! calculating \( \frac{8!}{3!} \) \[ \frac{8!}{3!} = \frac{40320}{6} = 6720 \]