# Factorial

## Product of numbers from 1 to n / From Wikipedia, the free encyclopedia

#### Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Factorial?

Summarize this article for a 10 year old

In mathematics, the **factorial** of a non-negative integer $n$, denoted by $n!$, is the product of all positive integers less than or equal to $n$. The factorial of $n$ also equals the product of $n$ with the next smaller factorial:
${\begin{aligned}n!&=n\times (n-1)\times (n-2)\times (n-3)\times \cdots \times 3\times 2\times 1\\&=n\times (n-1)!\\\end{aligned}}$
For example,
$5!=5\times 4!=5\times 4\times 3\times 2\times 1=120.$
The value of 0! is 1, according to the convention for an empty product.^{[1]}

**More information**, ...

$n$ | $n!$ |
---|---|

0 | 1 |

1 | 1 |

2 | 2 |

3 | 6 |

4 | 24 |

5 | 120 |

6 | 720 |

7 | 5040 |

8 | 40320 |

9 | 362880 |

10 | 3628800 |

11 | 39916800 |

12 | 479001600 |

13 | 6227020800 |

14 | 87178291200 |

15 | 1307674368000 |

16 | 20922789888000 |

17 | 355687428096000 |

18 | 6402373705728000 |

19 | 121645100408832000 |

20 | 2432902008176640000 |

25 | 1.551121004×10^{25} |

50 | 3.041409320×10^{64} |

70 | 1.197857167×10^{100} |

100 | 9.332621544×10^{157} |

450 | 1.733368733×10^{1000} |

1000 | 4.023872601×10^{2567} |

3249 | 6.412337688×10^{10000} |

10000 | 2.846259681×10^{35659} |

25206 | 1.205703438×10^{100000} |

100000 | 2.824229408×10^{456573} |

205023 | 2.503898932×10^{1000004} |

1000000 | 8.263931688×10^{5565708} |

10^{100} | 10^{10101.9981097754820} |

Factorials have been discovered in several ancient cultures, notably in Indian mathematics in the canonical works of Jain literature, and by Jewish mystics in the Talmudic book *Sefer Yetzirah*. The factorial operation is encountered in many areas of mathematics, notably in combinatorics, where its most basic use counts the possible distinct sequences – the permutations – of $n$ distinct objects: there are $n!$. In mathematical analysis, factorials are used in power series for the exponential function and other functions, and they also have applications in algebra, number theory, probability theory, and computer science.

Much of the mathematics of the factorial function was developed beginning in the late 18th and early 19th centuries. Stirling's approximation provides an accurate approximation to the factorial of large numbers, showing that it grows more quickly than exponential growth. Legendre's formula describes the exponents of the prime numbers in a prime factorization of the factorials, and can be used to count the trailing zeros of the factorials. Daniel Bernoulli and Leonhard Euler interpolated the factorial function to a continuous function of complex numbers, except at the negative integers, the (offset) gamma function.

Many other notable functions and number sequences are closely related to the factorials, including the binomial coefficients, double factorials, falling factorials, primorials, and subfactorials. Implementations of the factorial function are commonly used as an example of different computer programming styles, and are included in scientific calculators and scientific computing software libraries. Although directly computing large factorials using the product formula or recurrence is not efficient, faster algorithms are known, matching to within a constant factor the time for fast multiplication algorithms for numbers with the same number of digits.