Double Factorial Calculator
The double factorial of a non-negative integer n, denoted n!!, is the product of all positive integers from 1 (or 2) up to n that share the same parity as n. For odd n this gives n * (n-2) * ... * 3 * 1, and for even n this gives n * (n-2) * ... * 4 * 2. The double factorial should not be confused with applying the factorial function twice, (n!)!. It appears in combinatorics when counting the number of ways to partition a set into pairs, in the Wallis product formula for pi/2, and in the coefficients of certain orthogonal polynomials. Enter a non-negative integer n to compute n!! instantly.
Double factorial formula
n!! = n * (n-2) * (n-4) * ... down to 1 (odd n) or 2 (even n); 0!! = 1!! = 1
For odd n: n!! = n * (n-2) * ... * 3 * 1. For even n: n!! = n * (n-2) * ... * 4 * 2. The recursion is n!! = n * (n-2)!! with base cases 0!! = 1 and 1!! = 1.
Double factorial examples
- 1!! = 1
- 2!! = 2
- 5!! = 5 * 3 * 1 = 15
- 6!! = 6 * 4 * 2 = 48
- 9!! = 9 * 7 * 5 * 3 * 1 = 945
- 10!! = 10 * 8 * 6 * 4 * 2 = 3,840
Double factorial: frequently asked questions
What is a double factorial?
The double factorial of n, written n!!, is the product of all positive integers up to n that have the same parity (odd or even) as n. For odd n: n!! = n * (n-2) * ... * 3 * 1. For even n: n!! = n * (n-2) * ... * 4 * 2. By convention, 0!! = 1!! = 1.
How is n!! different from (n!)?
The single factorial n! multiplies all integers from 1 to n. The double factorial n!! skips every other integer, multiplying only those matching the parity of n. For example, 7! = 5040 but 7!! = 7 * 5 * 3 * 1 = 105.
What is the relationship between n!! and n!?
For odd n: n!! = n! / (2^((n-1)/2) * ((n-1)/2)!). For even n: n!! = 2^(n/2) * (n/2)!. These identities connect the double factorial to the single factorial and powers of 2.
Where does the double factorial appear in mathematics?
Double factorials appear in the Wallis product for pi, in the coefficients of Hermite polynomials, in the exact area under the standard normal curve for specific intervals, and in counting the number of perfect matchings in a complete graph.
What is 0!! by convention?
By convention, 0!! = 1. This is consistent with the empty product convention and ensures that recursive formulas such as n!! = n * (n-2)!! hold correctly down to the base cases 0!! = 1!! = 1.
Official sources
- NIST Digital Library of Mathematical Functions: dlmf.nist.gov.
- NIST, Mathematical topics: nist.gov/topics/mathematics.
Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.