---
title: GAMMA – คำนวณค่า Gamma Function
url: https://www.thepexcel.com/functions/excel/statistical/gamma/
type: function-explainer
program: Excel
syntax: =GAMMA(number)
date: 2025-12-02
updated: 2025-12-24
scores:
  popularity: 5
  difficulty: 4
  usefulness: 6
---

# GAMMA – คำนวณค่า Gamma Function

> ส่งกลับค่า Gamma function Γ(x) ซึ่งเป็นฟังก์ชันคณิตศาสตร์ที่ขยายแนวคิดของแฟกทอเรียลไปยังจำนวนจริงและ

## คำอธิบาย

ส่งกลับค่า Gamma function Γ(x) ซึ่งเป็นฟังก์ชันคณิตศาสตร์ที่ขยายแนวคิดของแฟกทอเรียลไปยังจำนวนจริงและจำนวนเชิงซ้อน

## Syntax

```excel
=GAMMA(number)
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| number | Yes | Number |  | ค่าตัวเลขที่ต้องการคำนวณค่า Gamma function สำหรับจำนวนบวก (number > 0) |

## ตัวอย่าง

### 1. คำนวณ Gamma สำหรับจำนวนเต็มบวก

```excel
=GAMMA(5)
```

**ผลลัพธ์:** `24`

สำหรับจำนวนเต็มบวก n, GAMMA(n) = (n-1)! ดังนั้น GAMMA(5) = 4! = 4×3×2×1 = 24

### 2. Gamma สำหรับค่า 0.5

```excel
=GAMMA(0.5)
```

**ผลลัพธ์:** `1.77245385...`

GAMMA(0.5) = √π (รากที่สองของ pi) ≈ 1.7724538509 ซึ่งเป็นค่าพิเศษในคณิตศาสตร์

### 3. ใช้กับ Gamma Distribution

```excel
=GAMMA(2) * GAMMA(3) / GAMMA(5)
```

**ผลลัพธ์:** `0.01666...`

ใช้ในการคำนวณค่าสัมประสิทธิ์ของ Beta Distribution: B(a,b) = GAMMA(a)*GAMMA(b)/GAMMA(a+b)

### 4. Gamma สำหรับจำนวนทศนิยม

```excel
=GAMMA(2.5)
```

**ผลลัพธ์:** `1.32934...`

GAMMA(2.5) = 1.5 × GAMMA(1.5) = 1.5 × (√π/2) ≈ 1.3293403882

## หมายเหตุเพิ่มเติม

- ใช้ GAMMA สำหรับสถิติชั้นสูง เช่น Gamma Distribution, Beta Distribution

- ถ้าต้องการ factorial ของจำนวนเต็ม ใช้ FACT จะเร็วและง่ายกว่า

- ทำการ research ก่อนตัดสินใจใช้ GAMMA เพราะมันเหมาะสำหรับการแจกแจงทางสถิติเท่านั้น

- ใช้ GAMMALN แทน GAMMA เมื่อต้องการลด overflow risk ในการคำนวณ

- สำหรับจำนวนที่มีค่ามาก ให้ใช้ GAMMALN แล้ว EXP เพื่อหลีกเลี่ยงปัญหา overflow

## คำถามที่พบบ่อย

**Q: ต่างกันยังไง GAMMA กับ FACT?**

FACT(n) = n! แต่ GAMMA(n) = (n-1)! ดังนั้น GAMMA(5) = 24 ขณะที่ FACT(5) = 120 หรือ GAMMA(n) = FACT(n-1) นอกจากนี้ GAMMA รองรับจำนวนทศนิยม แต่ FACT ไม่ได้

**Q: input ต้องเป็นจำนวนบวกไหม?**

ใช่ GAMMA ต้องการ number > 0 ถ้ากำหนด 0 หรือจำนวนลบ จะได้ #NUM! error

**Q: ใช้ได้กับ Excel เวอร์ชันไหนบ้าง?**

GAMMA มีตั้งแต่ Excel 2010 เป็นต้นมา ใน Excel 365 ใช้ได้เต็มที่

**Q: เวลาใช้งาน GAMMA ต้องเตรียมอะไรบ้าง?**

อินพุต (number) ต้องเป็นจำนวนบวก > 0 เท่านั้น ถ้าเป็น 0 หรือลบ ให้ใช้ IFERROR เพื่อจัดการ error

## ฟังก์ชันที่เกี่ยวข้อง

- [GAMMA.INV – ค่าผกผันของการแจกแจงแบบ Gamma](https://www.thepexcel.com/functions/excel/statistical/gamma-inv/)
- [GAMMA.DIST – หาค่าการแจกแจงแบบ Gamma](https://www.thepexcel.com/functions/excel/statistical/gamma-dist/)
- [FACT – คำนวณค่าแฟกทอเรียล](https://www.thepexcel.com/functions/excel/math-and-trigonometry/fact/)
- [GAMMADIST – หาค่าความน่าจะเป็นจากการแจกแจง Gamma (Legacy)](https://www.thepexcel.com/functions/excel/compatibility/gammadist/)
- [GAMMAINV – ค้นหาค่าผกผันของการแจกแจงแกมมา (เก่า)](https://www.thepexcel.com/functions/excel/compatibility/gammainv/)

## แหล่งข้อมูลเพิ่มเติม

- [Microsoft Docs - GAMMA](https://support.microsoft.com/en-us/office/gamma-function-ce1702b1-cf55-471d-8307-f83be0fc5297) _(official)_
- [Microsoft Learn - WorksheetFunction.Gamma](https://learn.microsoft.com/en-us/office/vba/api/Excel.WorksheetFunction.Gamma) _(official)_

---

_Source: [https://www.thepexcel.com/functions/excel/statistical/gamma/](https://www.thepexcel.com/functions/excel/statistical/gamma/)_
