Excel factorial function

Anonymous
2018-10-07T04:34:06+00:00

Im trying to use the factorial function on both numbers 200 and 195 but i get the #¡NUM! Error 

Any ideas on hot to fix this issue????

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2018-10-07T05:02:22+00:00

    The largest positive number which Excel can show is 9.99999999999999E+307. This limit gets exceeded on number 171 for factorial. Hence, largest factorial which you get is for 170.

    =FACT(170) = 7.257415615308E+306

    FACT(171) will exceed 9.99999999999999E+307 and will give #NUM error. Hence, you can not use any number greater than 170. Hence, you can not use 200 and 195 while calculating factorial.

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2018-10-07T06:23:22+00:00

    Vijay wrote:

    The largest positive number which Excel can show is 9.99999999999999E+307.

    No, that is the largest value that Excel permits us to enter.

    The largest value that Excel can "show" (calculate) is about 1.79769313486232E+308, which we can calculate with the following formula:

    =10*1.79769313486231E+307 + "5.79E+293"

    Vijay wrote:

    largest factorial which you get is for 170.

    =FACT(170) = 7.257415615308E+306        

    But we might also note that Excel cannot represent such large factorials accurately.

    FACT(22) is the largest factorial that Excel can represent accurately, although it is displayed inaccurately because Excel formats only up to 15 significant digit (rounded).

    And with VBA type Decimal, we can calculate only up to factorial 27 exactly.  But if that value were stored as a number into an Excel cell, it would be stored with an approximate type Double value.

    If you do a google search, you might find an Excel add-in that will permit you to calculate large factorials accurately.  But again, those values must be stored as strings, not numbers, in Excel.

    It has been suggested by others that if you need to work with such large numbers, perhaps Excel is not the right product for you to use.

    3 people found this answer helpful.
    0 comments No comments
  3. Andreas Killer 144K Reputation points Volunteer Moderator
    2018-10-07T10:18:03+00:00

    Download and install this AddIn

    http://www.thetropicalevents.com/Xnumbers60.htm

    Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    Then use

    A1: =xFact(195,400)

    A2: =xFact(200,400)

    to calculate the numbers.

    Andreas.

    0 comments No comments
  4. Anonymous
    2018-10-07T22:58:44+00:00

    > ...  the factorial function on both numbers 200 and 195

    Hi.  Those seem like strange numbers to be using in a calculation.

    I'll just throw this out as a wild guess.

    200! / 195!

    =PERMUT(200, 200-195)

     304,278,004,800

    2 people found this answer helpful.
    0 comments No comments