The GAMMA function in Excel is a powerful mathematical tool that calculates the Gamma function for a given number. This mathematical function is an extension of the factorial function for non-integer values and is widely used in complex calculations, including statistical and probability analyses. By providing the GAMMA function a specific argument, users can easily derive values needed for advanced mathematical operations without needing to reference additional tools or tables.
Syntax
=GAMMA(number)
- number: A numeric value for which you want to calculate the Gamma function. This can be a positive number, but the function will also work with certain negative numbers as well.
Example #1
=GAMMA(5)
This function call calculates the Gamma function for the number 5, which is equivalent to (5-1)! or 24. Result: 24.
Example #2
=GAMMA(2.5)
This calculates the Gamma function for 2.5, a non-integer value. The result is approximately 1.329, providing a non-integral equivalent to a factorial value.
Example #3
=GAMMA(-1)
This function computes the Gamma function for -1. Since the Gamma function is undefined for negative integers, it returns a NUM! error. Result: NUM!
Error handling
- NUM! This error occurs when the input number is a non-positive integer (e.g., -1, -2). The Gamma function is undefined for these values.
- VALUE! This error indicates that the input is not a valid number (e.g., text strings). Ensure that the argument is a numeric value.