The FACTDOUBLE function will return the double factorial of any inputted number. A double factorial is usually notated as any number with two trailing exclamation marks such as "4!!".

## Contents:

## Syntax

`= FACTDOUBLE(`*number*)

*number *= the number you wish to calculate the double factorial of

### Explanation

The FACTDOUBLE function is part of the "Math and Trigonometry" group of functions within Excel.

This function takes any *positive* input number, and calculates the double factorial of the given number.

## What is a Double Factorial?

Unlike a standard factorial (like 3! = 1*2*3), a double factorial is notated as any number with a two trailing exclamation marks "!!", such as 2!! or 59!!.

A double factorial is similar to a normal factorial, but a double factorial only calculates the products of integers with the same parity (even or odd) as the original number.

As such, a double factorial is the product all positive integers from 1 to the *nth *number, that have the same parity as the input.

For example, a normal factorial 4! represents 1*2*3*4 = 24. But, the double factorial 4!! represents 2*4 = 8, as only the even numbers are considered.

The double factorial 9!! represents 9*7*5*3 = 945m as only the odd numbers are considered.

The FACTDOUBLE function uses the below formula to calculate the double factorial of any given number *n*:

*Notes:*

- If the input is not a number or contains any text elements, a #VALUE! error will be returned

- This function can only take the double factorial of positive numbers. Any negative number will return a #NUM! error

- If the number is a decimal, then the FACT function will truncate the number. (6.45 becomes 6, 8.94 becomes 8, and so on)

### Examples

## How to Calculate the Double Factorial of any Number

To calculate the double factorial of any given number, all you need to do is feed the number you wish to calculate into the FACTDOUBLE function. The FACTDOUBLE function will do the all of the math for you and return the correct result.

You can see in the example below that this function will only work with positive integers. Negative values will return a #NUM! error, and all decimals will be truncated.

The input number can either be a hardcoded value, or a reference to another cell.

`= FACTDOUBLE(12)`

`= FACTDOUBLE(B1)`