## Factorial (n!)

The factorial of n is denoted by n! and calculated by the product of integer numbers from 1 to n.

For n>0,

*n*! = 1×2×3×4×...×*n*

For n=0,

0! = 1

### Factorial definition formula

#### Examples:

1! = 1

2! = 1×2 = 2

3! = 1×2×3 = 6

4! = 1×2×3×4 = 24

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

### Recursive factorial formula

*n*! = *n*×(*n*-1)!

#### Example:

5! = 5×(5-1)! = 5×4! = 5×24 = 120

### Stirling's approximation

#### Example:

5! ≈ √2π5⋅5^{5}⋅*e*^{-5
}= 118.019

## Factorial table

Numbern |
Factorialn! |
---|---|

0 | 1 |

1 | 1 |

2 | 2 |

3 | 6 |

4 | 24 |

5 | 120 |

6 | 720 |

7 | 5040 |

8 | 40320 |

9 | 362880 |

10 | 3628800 |

11 | 3.991680x10^{7} |

12 | 4.790016x10^{8} |

13 | 6.227021x10^{9} |

14 | 8.717829x10^{10} |

15 | 1.307674x10^{12} |

16 | 2.092279x10^{13} |

17 | 3.556874x10^{14} |

18 | 6.402374x10^{15} |

19 | 1.216451x10^{17} |

20 | 2.432902x10^{18} |

## C program for factorial calculation

double factorial(unsigned int n)
{

double fact=1.0;

if( n > 1 )

for(unsigned int k=2; k<=n; k++)

fact = fact*k;

return fact;

}

Currently, we have around 929 calculators and conversion tables to help you "do the math" quickly in areas such as:

- Free online calculators and tools
- Free online units conversion tools
- Free online web design tools
- Free online electricity & electronics tools
- Mathematics
- Online tool
- Text tool
- PDF tool
- Code
- Ecology
- Numbers
- Algebra
- Trigonometry
- Probability & Statistics
- Calculus & analysis
- Mathematical symbols
- Factorial
- Logarithm
- Logarithm rules
- Logarithm of zero
- Logarithm of one
- Logarithm of Infinity
- Logarithm of negative number
- Logarithm change of base rule
- Derivative of logarithm
- Natural logarithm
- Quadratic equation

And we are still developing more. Our goal is to become the one-stop, go-to site for people who need to make quick calculations or who need to find quick answer for basic conversions.

Additionally, we believe the internet should be a source of free information. Therefore, all of our tools and services are completely free, with no registration required. We coded and developed each calculator individually and put each one through strict, comprehensive testing. However, please inform us if you notice even the slightest error – your input is extremely valuable to us. While most calculators on Justfreetools.com are designed to be universally applicable for worldwide usage, some are for specific countries only.