Excel: FACT() and Functions Using Factorials Return #NUM!

Last reviewed: March 27, 1997
Article ID: Q115796
2.x 3.00 4.00 4.00a 5.00 5.00c 7.00 7.00a | 2.x 3.00 | 2.20 3.00 4.00 5.00 5.00a
WINDOWS                  | OS/2     | MACINTOSH


The information in this article applies to:
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0, 5.0c
  • Microsoft Excel for OS/2, versions 2.x, 3.0
  • Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0, 5.0, 5.0a

SUMMARY

In Microsoft Excel, you will receive a #NUM! error if you do either of the following:

- Use the FACT() function with an argument that exceeds 170

  -or-

- Use any function that computes the factorial of a number that exceeds
  170

MORE INFORMATION

The factorial of a number is equal to the value of this sequence:

   factorial = 1 * 2 * 3 * 4 * .... * number

The number must be an integer greater than or equal to zero.

The error occurs because the maximum number that can be computed by Microsoft Excel is 9.9999E+307. The factorial of 170 is 7.2574E+306: this number can be properly computed by Microsoft Excel.

However, the factorial of 171 is greater than the maximum number that Microsoft Excel can compute; therefore, if you attempt to compute the factorial of 171, you will receive a #NUM! error value.

Also, any function that computes a factorial as part of its computations will likewise result in a #NUM! error if the number whose factorial is being taken exceeds 170.

Functions in Microsoft Excel that use a factorial include (but are not limited to) the following:

   Function        Argument(s) for which factorial is computed
   ---------------------------------------------------------------
   COMBIN()        number, number_chosen, number - number_chosen
   FACT()          number
   FACTDOUBLE()    number (limit is 300: 301 or more causes #NUM!)
   MULTINOMIAL()   a + b + c, a, b, c
   PERMUT()        number, number - number_chosen
   POISSON()       x

In the above functions,if the argument (or combination of arguments) shown exceeds 170, the function will return a #NUM! error. Any calculations or formulas that reference the function in question will also return a #NUM! error.

For example, this formula will return a #NUM! error

   =MULTINOMIAL(2,3,166)

because the factorial of the sum of a, b, and c (2 + 3 + 166 = 171) cannot be computed.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.00 3.00a 4.00 4.00a 5.00 5.00a 5.00c 7.00
7.00a
Keywords : kbusage
Version : 2.x 3.00 4.00 4.00a 5.00 5.00c 7
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.