How to Use GAMMA Function in Excel (With Example)

Get FREE Advanced Excel Exercises with Solutions!

The Gamma function is widely used in science, business, and engineering. It is useful for the variables which are always positive. For example, the GAMMA function in Excel can be very helpful to find the shear strength in engineering calculation.

The above image is an overview of the GAMMA function. From this article, I hope you will get the complete idea to use the GAMMA function in Excel.

Download Practice Workbook

You can download the free Excel template from here and practice on your own.

What Is the Gamma Function?

Actually, the Gamma function is the generalization of the factorial function for nonintegral values which was introduced by Leonhard Euler- a Swiss mathematician.

If n is a positive whole number then the factorial (n!) will be defined by-


For example, 4!=4×3×2×1=24. But this formula is invalid if n is not an integer.

The gamma function is defined for any real number z>0(whether or not z is a whole number) as follows.

The Gamma Function Formula

The table given below shows the Gamma value for the range 0.0083 ≤ n ≤ 5.

The following graph shows the Gamma Function value, Γ(n) for 0.0083 ≤ n ≤ 5.

What Is the Gamma Function?

Introduction to Excel GAMMA Function

The GAMMA function is categorized under the Statistical function in Excel.


The GAMMA function is used to find the Gamma function value.




Argument Required/Optional Explanation
x Required A positive real number.

Return Parameter:

The Gamma function returns a numeric value.

Available in:

It is new in Excel 2013 and so is not available in the earlier versions of Excel.

An Example of Excel GAMMA Function

Now we’ll see an example of how to use the GAMMA function in Excel. It’s quite simple.

For that, I have made a dataset of some random positive real numbers.

Example of the GAMMA Function


Activate Cell C5.

Then type the following formula in it-


Later, just press the Enter button.

Example of the GAMMA Function

And you will find output 1 for the value 2.

Example of the GAMMA Function

To copy the formula for the other cells just drag down the Fill Handle icon by using your mouse over the cells.

Here’s the all output for the values.

Errors While Using the GAMMA Function in Excel

You will get errors for some specific values. Because the GAMMA function can’t deal with that kind of value. To show that I have rearranged the dataset. I have inserted 0, negative integer, and non-numeric values in the dataset.

Errors of the GAMMA Function in Excel

At first, let’s find the output-


Write the following formula in Cell C5


Then press the Enter button and use the Fill Handle tool to get all the outputs.

Errors of the GAMMA Function in Excel

Then you will spot the output like the image below. Here you will notice that we’ll get #NUM error for 0 and negative integers and #VALUE error for non-numeric characters.

Things to Remember

The input number should be numeric and greater than 0. Otherwise, the GAMMA function will return #NUM! and #VALUE! error.


I hope all of the methods described above will be good enough to use the GAMMA function. Feel free to ask any question in the comment section and please give me feedback.

<< Go Back to Excel Functions | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Md. Sourov Hossain Mithun
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF