Inside The Web
    Facebook Twitter Instagram
    Inside The Web
    • Office
      • Excel
      • Ms Word
      • OneDrive
      • Google Docs
      • Google Sheets
      • Google Drive
    • Email
      • Gmail
      • Outlook
      • Emal Etiquette
    • Office Etiquette
    • Productivity
    Inside The Web
    Home»Office»Excel»How to do Factorial in Excel

    How to do Factorial in Excel

    Asmi DhakalBy Asmi DhakalJune 29, 2023 Excel 4 Mins Read

    Excel has two functions, FACT and FACTDOUBLE to calculate two different types of factorials. Both, FACT and FACTDOUBLE fall under the Math & Trig functions and are used mostly to generate permutations and combinations.

    The FACT function computes the standard factorial (n!) of a number, while the FACTDOUBLE function calculates the double factorial of a number. While using these functions is relatively simple, you may sometimes encounter the #NUM! Excel error.

    In this article, we will be covering everything about the application of these functions, including how you can avoid the #NUM! error.

    What are Factorials and Double Factorials?

    Most of us must be familiar with factorials than double factorials. Factorials are the product of all whole numbers from 1 to the set value.

    Mathematically, a factorial is denoted by the exclamation mark (!). For example, 5! = 1x2x3x4x5 which results in 120.

    Double Factorials on the other hand are the product of a number from its lowest parity to the set number. In simple terms, the double factorial of an odd number begins with 1 while the double factorial of an even number begins with 2. A double factorial is represented by double exclamation marks (!!). 

    For example, 9!! = 1x3x5x9 which is 945. Similarly, 8!! = 2x4x6x8 which is 384.

    Calculating Factorial in Excel

    A single factorial, or an n!, is calculated using the FACT function in Excel. The FACT function requires only one argument, which is the number you wish to calculate the factorial of. The FACT function is written in the following format when constructing a formula:

    =FACT(number)

    Here’s a table showing what argument returns what value using the FACT function in Excel.

    FACT function in Excel
    NumberFormulaResultDescription
    5=FACT(5)120The factorial of 5 is 120.
    0=FACT(0)1The factorial of 0 is 1.
    -5=FACT(-5)#NUM!You can only calculate the factorials of numbers greater than 0.

    Calculating Double Factorial in Excel

    Excel also has a dedicated function, FACTDOUBLE to calculate the double factorial of a number. Similar to the FACT function, the FACTDOUBLE function also requires only one argument, which is the number you wish to generate the double factorial value for.

    The FACTDOUBLE function is constructed in the following way when writing a formula:

    =FACTDOUBLE(number)

    Check out this table to see what argument returns what value when using the FACTDOUBLE function in Excel.

    FACTDOUBLE function in Excel
    NumberFormulaResultDescription
    11=FACTDOUBLE(11)10395The product of 1x3x5x6x7x9x11 is equal to 10395.
    14=FACTDOUBLE(14)645120When you multiply 2x4x6x8x10x12x14, you will get 645120.
    -8=FACTDOUBLE(-8)#NUM!You cannot calculate the double factorial of a negative number.

    What is a #NUM! Error in Excel?

    NUM Error in Excel

    In both of our examples using the FACT and FACTDOUBLE functions, you may have noticed that passing a negative number as an argument results in the #NUM! Error. Most of us already know that it is not possible to calculate the factorial or the double factorial of a negative number. However, you might be wondering what exactly is the #NUM! error code in Excel.

    Well, the #NUM! error code is Excel’s way of alerting you that the numeric value you entered in your argument does not result in a valid result. As a negative number is an invalid argument, Excel triggered the #NUM! error. 

    Use IFERROR to Avoid #NUM!

    If you’re not a fan of seeing error codes in Excel, you can nest your functions inside the IFERROR function. Especially if you’re a teacher, you can nest every function inside the IFERROR function so if someone enters a number that results in an error, you can display a custom message instead of the error.

    IFERROR Excel

    For example, =IFERROR(FACTDOUBLE(-8), "Use a Positive Number") returns “Use a Positive Number” instead of the #NUM! Error. You can also use the IFERROR function while creating templates to fill in numbers later.

    Formula
    Asmi Dhakal

      Asmi is a content writer specializing in MS Office. She loves writing Excel-related content to assist other users to learn their way around the program. She started using Excel when she first entered the industry as a marketing intern. Soon, she realized that learning the often-overlooked spreadsheet program was no piece of cake. In her articles, she attempts to brief out complex topics to help beginner to intermediate-level Excel users. Asmi uses Excel for everything, including creating a grocery list to managing her personal finance. She’s a bit dramatic when it comes to the Flash Fill feature; so much so that could write a eulogy out of it. When she’s not working, you’ll find her learning a new recipe, or cleaning up her mess (out of the failed recipe).

      Related Posts

      Excel By Nisha Gurung

      How to Compare Two Columns in Excel Using VLOOKUP

      Excel By Nisha Gurung

      How to Share Excel Files with Multiple Users

      Excel By Nisha Gurung

      How to Filter Based on a List in Excel

      Add A Comment
      Table of ContentsToggle Table of ContentToggle
      • What are Factorials and Double Factorials?
      • Calculating Factorial in Excel
      • Calculating Double Factorial in Excel
      • What is a #NUM! Error in Excel?
        • Use IFERROR to Avoid #NUM!
      • Home
      • About Us
      • Privacy Policy
      © 2025 Inside The Web

      Type above and press Enter to search. Press Esc to cancel.