n factorial, denoted as n!, is the product of all positive integers from 1 to n. It is defined as:

n! = n × (n − 1) × (n − 2) × ... × 3 × 2 × 1

For example:

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

By convention, 0! = 1, which is known as the empty product and is consistent with combinatorial interpretations (e.g., there is exactly one way to arrange zero objects).

Key Properties and Applications

  • Recursive Definition: n! = n × (n − 1), with 0! = 1 as the base case.

  • Permutations: The number of ways to arrange n distinct objects in a sequence is n!.

  • Combinations: The binomial coefficient (n choose k) is calculated as n! / (k! × (n − k)!).

  • Mathematical Analysis: Factorials appear in Taylor series expansions, such as e^x = Σ (x^n / n!).

  • Growth Rate: n! grows faster than exponential functions. For large n, Stirling’s approximation provides an estimate: n! ≈ √(2πn) × (n/e)^n.

Historical and Symbolic Notes

  • The notation n! was introduced by Christian Kramp in 1808.

  • Factorials have ancient roots in Indian mathematics (Jain literature), Hebrew mysticism (Sefer Yetzirah), and Arab grammar.

  • The factorial function can be extended to non-integer and complex numbers using the gamma function: n! = Γ(n + 1), which is undefined for negative integers.

For quick computation, use a factorial calculator (e.g., CalculatorSoup or RapidTables).

product of all integers between 1 and the integral input of the function
FactorialReIm
In mathematics, the factorial of a non-negative integer ... {\displaystyle {\begin{aligned}n!&=n\times (n-1)\times (n-2)\times (n-3)\times \cdots \times 3\times 2\times 1\\&={\begin{cases}1,&{\text{if }}n=0\\n\times (n-1)!,&{\text{if }}n\geq 1.\end{cases}}\\\end{aligned}}} For example, ... ... … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › Factorial
Factorial - Wikipedia
1 week ago - In mathematics, the factorial of a non-negative integer ... {\displaystyle {\begin{aligned}n!&=n\times (n-1)\times (n-2)\times (n-3)\times \cdots \times 3\times 2\times 1\\&={\begin{cases}1,&{\text{if }}n=0\\n\times (n-1)!,&{\text{if }}n\geq 1.\end{cases}}\\\end{aligned}}} For example, ... ...
🌐
Purplemath
purplemath.com › modules › factorial.htm
What are factorials, and how do they work? | Purplemath
The factorial of a whole number n, denoted as n!, is the product of all the whole numbers between 1 and n: 1×2×3×…×(n−1)×n. So 3! would be 1×2×3 = 6.
Discussions

Factorials - Explain like im a two year old
The notation "1*2*...*(n-1)*n" simply means to multiply all the integers from 1 to n. If n = 1, then n-1 is not included since it is not between 1 and n. You may be more satisfied with a recursive definition: Define 0! = 1 Define n! = n*(n-1)! for any positive integer n. More on reddit.com
🌐 r/learnmath
25
63
May 12, 2019
why does n factorial work for determining the numebr of arranegemtns?
I think your tree diagram idea does ultimately rely on the fundamental counting principle -- that you multiply by a number of options at each stage. If you accept that, your reasoning about permutations is sound, and you get n! because at each level you have one fewer option to select from (no replacement). Did your textbook discuss fundamental counting principle before it began the tooic of permutations? More on reddit.com
🌐 r/learnmath
13
7
July 6, 2024
Anyone know how to make a factorial n! In flowgorithm?
What exactly is the problem? Giving you a pseudo code of this program does not make too much sense. It is too simple and you should be able to build it on your own, otherwise, you are going to have a lot of trouble with more complicated ones. Do you know, how to declare a variable and assign it a value? Do you know, how to sum two varaibles and store the result to some other variable? Do you know, how to increase a variable by one? Do you know, how a loop works? If so, you have all the tools, you need to solve the problem. More on reddit.com
🌐 r/Flowgorithm
3
3
November 16, 2020
How is log (n factorial) equal to omega (n log n)?
  log (n!) = log [n * (n - 1) * (n - 2) * ... * 1], n things are being multiplied.
              >= log [n * (n - 1) * ... * (n / 2)], n/2 things are being multiplied here, so I'm just dropping the second half.
              >= log [(n / 2)^(n / 2)], because each one is greater than or equal to n / 2.
              = n/2 log (n / 2).
More on reddit.com
🌐 r/algorithms
11
21
October 30, 2015
🌐
Reddit
reddit.com › r/explainlikeimfive › eli5: what is a factorial and how does it work
r/explainlikeimfive on Reddit: ELI5: What is a factorial and how does it work
December 31, 2024 - But ultimately this isn't so important and depends on what you take as the 'base' definition of n!. ... The Gamma function Γ extends the factorial function to non-integer and negative values (with several mathematically 'nice' properties that are out of scope) where Γ(n) = (n-1)!
🌐
CalculatorSoup
calculatorsoup.com › calculators › discretemathematics › factorials.php
Factorial Calculator n!
Factorial Calculator. Find the factorial n! of a number, including 0, up to 4 digits long. n! factorial calculator and examples. Free online factorial calculator.
🌐
RapidTables
rapidtables.com › math › algebra › Factorial.html
Factorial (n!) - RapidTables.com
The factorial of n is denoted by n! and calculated by the product of integer numbers from 1 to n.
🌐
Math is Fun
mathsisfun.com › numbers › factorial.html
Factorial Function !
Note: if we want to apply factorial twice we write (n!)!
Find elsewhere
🌐
Free
factorielle.free.fr › index_en.html
All about factorial notation n!
Factorials are also used extensively in probability theory. The numeric value of n! can be calculated by repeated multiplication if n is not too large. That is basically what pocket calculators do. The largest factorial that most calculators can handle is 69!, because 70!
🌐
Wolfram Language
reference.wolfram.com › language › ref › Factorial.html
Factorial: Factorial—Wolfram Documentation
For non‐integer n, the numerical value of n! is given by Gamma[1+n]. For integers and half integers, Factorial automatically evaluates to exact values.
🌐
Khan Academy
khanacademy.org › computing › computer-science › algorithms › recursive-algorithms › a › the-factorial-function
The factorial function (article)
We've partnered with Dartmouth college professors Tom Cormen and Devin Balkcom to teach introductory computer science algorithms, including searching, sorting, recursion, and graph theory. Learn with a combination of articles, visualizations, quizzes, and coding challenges.
🌐
Statlect
statlect.com › glossary › factorial
Factorial | Use in probability and statistics
The expression is read " factorial". This definition is extended to the number 0 by using the convention:
🌐
Quora
quora.com › What-does-N-factorial-mean-in-math
What does N factorial mean in math? - Quora
N! happens to be the number of ways of arranging N different things in a row. Thus, the three letters a, b, c can be arranged in 3!=6 ways: abc, cab, bac, bac, cab, cba. Factorials occur in the answer to all sorts of combinatorial questions, ...
🌐
GeeksforGeeks
geeksforgeeks.org › mathematics › factorial-formula
Factorial Formula - GeeksforGeeks
The factorial is one of the most ... the factorial of a non-negative integer n, denoted as n!, is the product of all positive integers less than or equal to n....
Published   July 23, 2025
🌐
BYJUS
byjus.com › maths › factorial
Factorial
In this article, let’s discuss the factorial definition, formula and examples. The multiplication of all positive integers, say “n”, that will be smaller than or equivalent to n is known as the factorial.
Published   October 6, 2021
Views   1K
🌐
Wolfram MathWorld
mathworld.wolfram.com › Factorial.html
Factorial -- from Wolfram MathWorld
September 13, 2025 - The factorial n! is defined for a positive integer n as n!=n(n-1)...2·1. (1) So, for example, 4!=4·3·2·1=24. The notation n! was introduced by Christian Kramp (Kramp 1808; Cajori 1993, p. 72).
🌐
UTSA Department of Mathematics
mathresearch.utsa.edu › wiki › index.php
Factorials - Department of Mathematics at UTSA
Its most basic use counts the possible distinct sequences – the permutations – of n distinct objects: there are n!. The factorial function can also be extended to non-integer arguments while retaining its most important properties by defining x!
🌐
Cuemath
cuemath.com › numbers › factorial
Factorial - Meaning, Formula | Factorial of Hundred & 0
The Factorial of a whole number 'n' is defined as the product of that number with every whole number less than or equal to 'n' till 1. For example, the factorial of 4 is 4 × 3 × 2 × 1, which is equal to 24. It is represented using the symbol '!' So, 24 is the value of 4!.
🌐
n!Biomachines
n-factorial.com › home
Fit-for-purpose biomachines - n!Biomachines
March 15, 2024 - Affordable, easy-to-operate bioreactor systems for bioprocesses from benchtop to industrial-scale. Designed in Germany - Manufactured in Canada.
🌐
Reddit
reddit.com › r/learnmath › why does n factorial work for determining the numebr of arranegemtns?
r/learnmath on Reddit: why does n factorial work for determining the numebr of arranegemtns?
July 6, 2024 -

we just started learning perms and combs at school, and we learnt that if there are n distinct objects, then the number of ways it can be arranged in a line is in 'n!' ways; i tried to understand why because our textbook never really explained the underlying reason for why this works and how this makes sense practically.

what i was thinking is that we visualise the scenario of items as a tree diagram; each stage represents the first item, and the number of branches represent the number of items that are available.

Say we has letters A, B and C (and we want to determine the number of arrangements of a word with these three letters); the first letter can either be A, B or C, so the first stage has three branches open; then we have two letters left. At each of the three branches they branch out further into two branches; and then branch out once more (only one branch). What I observed was that at the first stage of picking the first letter we had three branches, and then they branched out furhter into 2 each, so we obtain 3x2 = 6 combinations (in the process); then they branch out once more, so we get 3x2x1 = 6 combinations = 3!.

could someone explain if my understanding for why the n factorial works like this? I'd other appreciate any other ways that I can visualise this! thanks!

🌐
Wikipedia
en.wikipedia.org › wiki › Factorial_prime
Factorial prime - Wikipedia
November 25, 2025 - A factorial prime is a prime number that is one less or one more than a factorial (all factorials greater than 1 are even). The first 10 factorial primes (for n = 1, 2, 3, 4, 6, 7, 11, 12, 14) are (sequence A088054 in the OEIS): 2 (0! + 1 or 1! + 1), 3 (2! + 1), 5 (3! − 1), 7 (3! + 1), 23 ...