Microsoft KB Archive/131457

= Microsoft Knowledge Base =

XL: CHIINV/GAMMAINV Function Returns #NUM! Error Value
Last reviewed: March 27, 1997

Article ID: Q131457

4.00 5.00 | 4.00 5.00

WINDOWS  | MACINTOSH kbother

The information in this article applies to:


 * Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0, 5.0c
 * Microsoft Excel for the Macintosh, versions 4.0, 5.0, 5.0a

SYMPTOMS
In Microsoft Excel, when you use the CHIINV function or the GAMMAINV function on your worksheet, the function may return the #NUM! error value, even if the function argument values are valid.

CHIINV
The CHIINV function [Syntax: CHIINV(probability,degrees_freedom)] returns the #NUM error value if any of the following are true:


 * probability is less than zero
 * probability is greater than one
 * degrees_freedom is less than 1
 * degrees_freedom is greater than 10^10

This behavior is by design and is documented in Macro Function Help (version 5.0) and the "Function Reference" (version 4.0). However, the CHIINV function also returns the #NUM! error value with certain combinations of the probability and degrees_freedom arguments. For example, the CHIINV function returns the #NUM! error value with a probability value of 0.2 if degrees_freedom is within the following ranges of numbers:

928-949  956-1000   1038-1081   1120-1168   1182- approx. 227770 Note that degrees_freedom values such as 927 or 1119 will return the expected result.

GAMMAINV
The GAMMAINV function [Syntax: GAMMAINV(probability,alpha,beta)] returns the #NUM! error value if any of the following are true:


 * probability is less than zero
 * probability is greater than one
 * alpha is less than or equal to zero
 * beta is less than or equal to zero

This behavior is by design and is documented in the Macro Function Help (version 5.0) and the "Function Reference" (version 4.0). However, the GAMMAINV function also returns the #NUM! error value, for example, with the following values of alpha and beta:

=GAMMAINV(0.8,458,2)

MORE INFORMATION
The CHIINV function returns the inverse of the one-tailed probability of the chi-squared distribution. The GAMMAINV function returns the inverse of the gamma cumulative distribution.