SOLVETUTORMATH SOLVER

Instrument MI-01-244 · Mathematics

Gamma Function Calculator

The gamma function stretches the factorial into a smooth curve over every real and complex number; feed it a whole number and it returns the exact value Γ(n) = (n−1)!.

Instrument MI-01-244
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01244

Γ(n) = (n−1)!

24

Γ(n) = (n−1)!

The working Every figure verified twice
  1. result = fact(5 − 1) = 24
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The gamma function was built to answer a question the ordinary factorial cannot: what lies between 3! and 4!? Leonhard Euler posed exactly that in a 1729 letter to Christian Goldbach, looking for a single smooth curve passing through every point 0! = 1, 1! = 1, 2! = 2, 3! = 6, and so on. His answer, later written as Γ(z) = ∫₀^∞ t^(z−1) e^(−t) dt, is an integral that happens to equal (n−1)! whenever z is a positive integer n, while also producing a sensible, continuous value at 2.5 or −1.5 or any complex number away from a short list of exceptions.

The one-step offset in Γ(n) = (n−1)! is not a typo; it traces back to Adrien-Marie Legendre, who introduced the capital gamma notation in the early 1800s and shifted the argument by one so the function's poles would land on 0, −1, −2, and so on rather than one integer earlier. The shift survives in the function's defining recurrence, Γ(z+1) = z·Γ(z), which mirrors the ordinary factorial rule n! = n·(n−1)! one step over — apply it repeatedly from Γ(1) = 0! = 1 and every positive-integer value falls out in order.

Step off the integers and the curve keeps behaving: Γ(1/2) works out to √π, a genuinely surprising result that ties the gamma function to the Gaussian integral underneath the normal distribution, decades before either idea carried that name. The curve does have real edges, though — Γ(z) has no value at z = 0, −1, −2, … because the defining integral and its recurrence both break down there, which is why this instrument, built for the clean integer case, only accepts n = 1 through 170 and returns the exact (n−1)! at every one of them.

Γ(n)=(n1)!\Gamma(n) = (n-1)!Γ(z)=0tz1etdt\Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t}\, dtΓ(z+1)=zΓ(z)\Gamma(z+1) = z\,\Gamma(z)
n — the positive integer entered · z — the gamma function's general real or complex argument · Γ — gamma, the function itself, read Γ(n) as 'gamma of n' · e — Euler's number; the integral converges for every z with positive real part.
  • Enter a whole number from 1 to 170 into the n (positive integer) field — this sets which integer point on the gamma curve gets evaluated.
  • Read the answer in Γ(n) = (n−1)!, the field that reports the exact integer result.
  • Try n = 1 first: Γ(n) = (n−1)! returns exactly 1, matching Γ(1) = 0! = 1, the function's own starting point.
  • Raise n by one at a time and compare each new Γ(n) = (n−1)! reading against n times the previous one — that ratio is the functional equation Γ(z+1) = z·Γ(z) at work.
  • Keep the offset in mind: Γ(n) reports (n−1)!, one step behind n itself, so Γ(5) lands on 24, not 120.

Worked example — Γ(5) reduces to 4 factorial

Set n to 5 in the n (positive integer) field. Because this instrument uses the exact identity Γ(n) = (n−1)! for whole numbers, it computes 4! = 4 × 3 × 2 × 1 = 24, and Γ(n) = (n−1)! reports 24 on the nose — the golden case this whole calculator is built to get exactly right.

The offset is easy to trip over: Γ(5) is not 5! (which is 120) but one factorial step behind, at 4! (24). Nudge the input to n = 6 and the reading jumps to Γ(6) = 5! = 120 — the same 120 that 5! itself equals, a coincidence of the shift worth noticing once and then never forgetting.

Questions

Why does Γ(n) equal (n−1)! instead of n!?

Because Adrien-Marie Legendre, who introduced the Γ symbol in the early 1800s, shifted the argument one step from Euler's original integral so the function's poles line up with 0, −1, −2, and so on. The shift is baked into every table and formula that uses Γ today, so Γ(5) = 4! = 24, not 5! = 120 — a mismatch worth checking on every read.

What does the gamma function return for numbers that aren't whole, like Γ(1/2)?

It returns √π, about 1.7724589 — a result that looks unrelated to factorials until you notice √π is also the value of the Gaussian integral underneath the normal distribution. This instrument itself only accepts whole numbers from 1 to 170, since it is built around the exact (n−1)! identity rather than the general integral, but the half-integer case is where the gamma function's reach beyond factorials becomes obvious.

Where does the gamma function come from historically?

Leonhard Euler introduced it in a 1729 letter to Christian Goldbach while looking for a smooth curve running through every factorial value 0!, 1!, 2!, 3!, and so on, so a sensible number could be assigned between them. Adrien-Marie Legendre gave the function its capital-Γ name and its now-standard shifted argument roughly eighty years later, and both choices have stood unchanged since.

Why is the gamma function undefined at zero and the negative integers?

Its defining integral, ∫₀^∞ t^(z−1) e^(−t) dt, diverges at z = 0, −1, −2, … because t^(z−1) grows too fast near t = 0 for the integral to settle on a finite value. The functional equation Γ(z+1) = z·Γ(z) shows the same thing another way: solving it backwards for Γ(0) would require dividing by zero, so a pole sits there and at every non-positive integer beyond it.

What is the most common mistake people make reading a Γ(n) value?

Assuming Γ(n) equals n! rather than (n−1)! — an easy slip since the two differ by exactly one factorial step. Γ(5) is 4! = 24, and confusing it with 5! = 120 is the single error worth double-checking before this result feeds into a larger calculation, particularly in statistics formulas where a gamma term sits in a denominator.

References