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.

If you type a decimal such as 7.9, the fractional part is dropped and 7!! is calculated. Negative numbers and values above 150 give no result. 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 truncated to 7, not rounded to 8.
  • 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

  • Be the first to comment.

Popular calculators

All Calculators