Double Factorial Calculator

Find the double factorial of a number.

How it is calculated

Enter a whole number n from 0 to 150. The tool multiplies every integer from n down in steps of two until it reaches 2 or 1: n!! = n × (n−2) × (n−4) × … × (2 or 1). The last factor is 1 when n is odd and 2 when n is even, so the chain never mixes odd and even numbers. By convention 0!! = 1 and 1!! = 1, and the tool returns 1 for both.

Only whole numbers are accepted: a decimal such as 7.9, a negative number or a value above 150 gives no result. Every digit of the answer is exact, even for large n (41!! = 13,113,070,457,687,988,603,440,625), and large answers are shown with thousands separators.

Worked example

Take n = 9, which is odd, so the chain ends at 1: 9 × 7 = 63, then 63 × 5 = 315, then 315 × 3 = 945, then 945 × 1 = 945. The result is 945. For comparison, an even input of 8 gives 8 × 6 × 4 × 2 = 384.

Try this example →

Common mistakes

  • Reading n!! as (n!)!. Nine double factorial is 945, whereas (9!)! is an astronomically large number.
  • Multiplying every integer down to 1 instead of skipping every second one. That gives the ordinary factorial 9! = 362,880, not 945.
  • Mixing parities, for example computing 8!! as 8 × 7 × 5 × 3 × 1. An even n uses only even factors ending in 2.
  • Entering a decimal and expecting rounding. A value like 7.9 is not rounded to 8 or cut to 7; the tool gives no result because n must be a whole number.
  • Expecting 0!! to be 0. The empty product is 1.

About this calculator

The double factorial n!! is the product of integers from n down to 1 or 2, skipping every other one so only numbers of the same parity as n are multiplied. For odd n, n!! = n·(n−2)·(n−4)···3·1 (e.g. 7!! = 7·5·3·1 = 105); for even n, n!! = n·(n−2)···4·2 (e.g. 8!! = 8·6·4·2 = 384). It's a distinct operation from applying factorial twice, (n!)! — double factorial is its own well-defined sequence.

Double factorials appear naturally in combinatorics — for instance, (2n−1)!! counts the number of ways to pair up 2n objects (perfect matchings), which is why it shows up in graph theory and statistical mechanics. They also appear in closed-form solutions to integrals involving powers of sine and cosine (the Wallis formulas), in the Gaussian integral's moment expansions, and in the volume formulas for n-dimensional spheres. Students working through combinatorics, probability or calculus problems use this calculator to compute n!! quickly for any n.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    One place the odd case shows up is pairing: 7!! = 105 is the number of ways to split 8 players into 4 unordered pairs, and in general (2k minus 1)!! counts the pairings of 2k items. The tool prints every digit exactly up to n = 150, so 41!! comes out as 13,113,070,457,687,988,603,440,625 in full. What do you use double factorials for?

Popular calculators

All Calculators