Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Upper Incomplete Gamma

    Upper Incomplete Gamma: Incomplete Gamma Function Calculator

    Upper incomplete gamma; complement of lower with respect to the complete gamma.

Advertisement

Results

Lower incomplete gamma γ(a,x)
0.8646647168
1st kind, integral from 0 to x
Upper incomplete gamma Γ(a,x) 0.1353352832
Complete gamma Γ(a) 1
Identity check γ + Γ 0.86466471676338730.1353352832

What is the incomplete gamma function?

The incomplete gamma function generalizes the ordinary (complete) gamma function by stopping the integral at a finite point instead of integrating all the way to infinity. The lower incomplete gamma function \(\gamma(a,x)\) integrates \(t^{a-1} e^{-t}\) from 0 up to \(x\), while the upper incomplete gamma function \(\Gamma(a,x)\) integrates from \(x\) out to infinity. Both depend on a shape parameter \(a\) and an argument \(x\), and both are pure dimensionless real numbers. They appear constantly in statistics (the chi-square and gamma distribution CDFs), physics, reliability engineering and queueing theory.

Area under the t^(a-1)e^(-t) curve split into lower and upper regions at x
The lower gamma is the area from 0 to x; the upper gamma is the tail from x to infinity; together they sum to the complete gamma.

How to use this calculator

Enter the shape parameter a (must be positive, \(a > 0\)) and the argument x (must be non-negative, \(x \ge 0\)). The calculator returns \(\gamma(a,x)\), \(\Gamma(a,x)\), and the complete gamma function \(\Gamma(a)\) so you can confirm the identity $$\gamma(a,x) + \Gamma(a,x) = \Gamma(a)$$ At \(x = 0\) the lower function is 0 and the upper equals \(\Gamma(a)\); as \(x\) grows large the lower function approaches \(\Gamma(a)\) and the upper approaches 0.

The formula and algorithm

The defining integrals are $$\gamma(a,x) = \int_{0}^{x} t^{a-1} e^{-t}\, dt$$ and $$\Gamma(a,x) = \int_{x}^{\infty} t^{a-1} e^{-t}\, dt$$ of the same integrand. To evaluate them stably, this tool uses the regularized forms \(P(a,x) = \gamma(a,x)/\Gamma(a)\) and \(Q(a,x) = \Gamma(a,x)/\Gamma(a)\). When \(x < a+1\) a rapidly converging power series gives \(P\); otherwise a Lentz continued fraction gives \(Q\). The complete gamma \(\Gamma(a)\) is obtained from a Lanczos approximation of \(\ln \Gamma(a)\). This is the classic Numerical Recipes gammp/gammq split, accurate to roughly 15 significant digits in double precision.

Advertisement
Algorithm selection: series expansion for small x, continued fraction for large x
The calculator picks a series expansion when x is small relative to a, and a continued fraction otherwise, for fast convergence.

Worked example

Take \(a = 1\) and \(x = 2\). Because \(t^{a-1} = t^0 = 1\), the lower function is the integral of \(e^{-t}\) from 0 to 2 $$= 1 - e^{-2} = 1 - 0.13533528 = 0.86466472$$ The upper function is \(e^{-2} = 0.13533528\), and \(\Gamma(1) = 1\). The identity check $$0.86466472 + 0.13533528 = 1.0$$ confirms the result.

FAQ

Why must a be positive? The convergent definitions and the Lanczos ln-gamma evaluation require \(a > 0\); at non-positive integers \(\Gamma(a)\) has poles.

What if x is 0? \(\gamma(a,0) = 0\) and \(\Gamma(a,0) = \Gamma(a)\), so the upper function equals the complete gamma function.

How accurate is the result? Double-precision arithmetic and the series/continued-fraction split deliver about 15 significant figures across the valid domain.

Last updated: