From what I know, the factorial function is defined as follows:

$$n! = n(n-1)(n-2) \cdots(3)(2)(1)$$

And $0! = 1$. However, this page seems to be saying that you can take the factorial of a fraction, like, for instance, $\frac{1}{2}!$, which they claim is equal to $\frac{1}{2}\sqrt\pi$ due to something called the gamma function. Moreover, they start getting the factorial of negative numbers, like $-\frac{1}{2}! = \sqrt{\pi}$

How is this possible? What is the definition of the factorial of a fraction? What about negative numbers?

I tried researching it on Wikipedia and such, but there doesn't seem to be a clear-cut answer.

  • 3
    $\begingroup$ Gamma functions is sort of an extension of the concept of factorials to fractions. $\endgroup$
    – user67773
    Commented May 20, 2013 at 3:12
  • $\begingroup$ I wrote an answer to this on a similar question. (P.S. If anyone thinks they can explain that better, please write it up as an answer!) EDIT: Did not realize that this question was from 2013. Whoops. $\endgroup$ Commented Feb 23, 2015 at 7:36
  • $\begingroup$ It is most likely of interest that you would want to check this link](arxiv.org/pdf/math/0403510v1.pdf) out, as it provides the exact values for $\Gamma(a/b)$ whenever $b$ divides into $120$ as well as the methods required to generalize this into closed form. $\endgroup$ Commented Nov 29, 2016 at 0:14

7 Answers 7


The gamma function is defined by the following integral, which converges for real $s>0$: $$\Gamma(s)=\int_0^\infty t^{s-1}e^{-t}dt.$$

The function can also be extended into the complex plane, if you're familiar with that subject. I'll assume not and just let $s$ be real.

This function is like the factorial in the when $s$ is a positive integer, say $s=n$, it satisfies $\Gamma(n)=(n-1)!$. It generalizes the factorial in the sense that it is the factorial for positive integer arguments, and is also well-defined for positive rational (and even real) numbers. This is what it means to take a "rational factorial," but I would hesitate to call it that. Many functions have those two properties, and $\Gamma$ is chosen out of all of them because it is the most useful in other applications. Rather than the notation used in that article you refer to, it would be more accurate for you to say that "the gamma function takes these values for these arguments." Gamma is not a function that intends to generalize factorials; rather, generalizing factorials came along as something of an accident following the definition. Its true purpose is deeper.

As for why $\Gamma(1/2)=\sqrt{\pi}$, this comes out of an interesting property of the $\Gamma$ function: some of them are here http://en.wikipedia.org/wiki/Gamma_function#Properties. The property you are interested in is the reflection formula: $$\Gamma(1-z)\Gamma(z)=\frac{\pi}{\sin(\pi z)}.$$ Set $z=1/2$ in the formula to get the desired identity.

If you want to learn more about the gamma function, the hard way is to learn a lot more math, in particular real and complex analysis. An easier way is to read this excellent set of notes: http://www.sosmath.com/calculus/improper/gamma/gamma.html.

  • 3
    $\begingroup$ The gamma function is also really nice amongst the family of generalizations of the factorial because it is logarithmically convex. I believe you can show that it is the unique such generalization that is logarithmically convex. $\endgroup$ Commented May 20, 2013 at 5:31
  • $\begingroup$ @CameronWilliams this is in fact a theorem due to Bohr and Mollerup: en.wikipedia.org/wiki/Bohr%E2%80%93Mollerup_theorem $\endgroup$ Commented May 20, 2013 at 7:54
  • $\begingroup$ @kigen It is a fairly simple question that doesn't really warrant a new question. $\Gamma(n)=(n-1)!$. Why wasn't it defined as $\Gamma(n)=n!$ $\endgroup$ Commented Nov 13, 2013 at 10:54
  • 3
    $\begingroup$ @JpMcCarthy You'd get a better and more detailed response if you posted this as a new question. The best answer I can give you right now is that, like I've mentioned in my answer, $\Gamma$ was not defined to generalize factorials. If you're still not satisfied, you can define $\Delta(x) = \Gamma(x+1)$, and then $\Delta$ will satisfy $\Delta(n) = n!$. But I don't see that there's any value to $\Delta$ over $\Gamma$, especially since the analytic continuation of $\Gamma$ is aesthetically nicer (cuts off at real part $0$ nicely). $\endgroup$ Commented Nov 13, 2013 at 11:23

The gamma function, shown with a Greek capital gamma $\Gamma$, is a function that extends the factorial function to all real numbers, except to the negative integers and zero, for which it is not defined. $\Gamma(x)$ is related to the factorial in that it is equal to $(x-1)!$. The function is defined as

$$\Gamma(z) = \frac{1}{z} \prod_{n=1}^\infty \frac{\left(1+\frac{1}{n}\right)^z}{1+\frac{z}{n}}$$

Simply use this to compute factorials for any number. A handy way of calculating for real fractions with even denominators is:

$$\Gamma(\tfrac12 + n) = {(2n)! \over 4^n n!} \sqrt{\pi}$$

Where n is an integer. But keep in mind that the gamma function is actually the factorial of 1 less than the number than it evaluates, so if you want $\frac{3}{2}!$ use n = 2 instead of 1.

Or, you could just put the fraction into Google Calculator, which uses the gamma function to evaluate factorials of any number.

For some more examples of the gamma function's values, see here.

(If you don't understand this, don't worry, because I don't either, and the Wikipedia article on the function seems to lack a clear-cut definition of it or how it relates to $\sqrt{\pi}$.)

  • 2
    $\begingroup$ It would be nice to know why the infinite product is equal to the factorial for natural numbers, and why $\Gamma(n) = (n-1)\Gamma(n-1)$ for all values. The formula you gave works for real fractions with denominator $2$, not any even number. If you can't say anything about how to evaluate infinite products, about where that product comes from, the poles of the Gamma function, the relationship with $\sin$ or the product expression for $\pi$, it's not clear why you bothered to try and answer. $\endgroup$
    – jwg
    Commented May 20, 2013 at 8:24

While the answer unquestionably being Euler's $\Gamma$, I still wondered what could be a further intuitive explnation of why it is so.

I think, it is somehow more understandable for the closely related Beta function and in view of the sine-involving formula mentioned in the answer by neuguy above.

Look at $\sin(\pi z)$. Its zeros are precisely all integers. That's why it is periodic - it has to return to zero at each integer, and exactly in the same way as at any other integer.

In fact there is a formula (I think by Euler)$$\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})z(1-\frac z1)(1-\frac z2)(1-\frac z3)\cdots=\frac1\pi\sin(\pi z)$$reflecting precisely that.

Now suppose we want to find out what will happen if we will exclude $0$, $1$, ..., $n$ from the set of zeros. The resulting function will remain zero at all other integers, while in the interval $-1<z<n+1$ it will "bump up" to the extent we have freed it from being zero. And it turns out that the precise measure of this "bump" is given by the binomial coefficients.

Namely, let$$F_n(z):=\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})(1-\frac z{n+1})(1-\frac z{n+2})(1-\frac z{n+3})\cdots=\frac{\frac1\pi\sin(\pi z)}{z(1-\frac z1)(1-\frac z2)\cdots(1-\frac zn)},$$then it turns out that $F_n(z)=\binom nz$.

For example:

\begin{array}{rcl} z & F_4(z) & \textrm{(numerically)}\\ \vdots&\vdots&\vdots\\ -2 & 0 & 0. \\ -1.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ -1.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ -1.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ -1 & 0 & 0. \\ -0.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ -0.5 & \frac{256}{315 \pi } & 0.25869 \\ -0.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 0 & 1 & 1. \\ 0.25 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 0.5 & \frac{256}{35 \pi } & 2.32821 \\ 0.75 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 1 & 4 & 4. \\ 1.25 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 1.5 & \frac{256}{15 \pi } & 5.43249 \\ 1.75 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2 & 6 & 6. \\ 2.25 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2.5 & \frac{256}{15 \pi } & 5.43249 \\ 2.75 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 3 & 4 & 4. \\ 3.25 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 3.5 & \frac{256}{35 \pi } & 2.32821 \\ 3.75 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 4 & 1 & 1. \\ 4.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 4.5 & \frac{256}{315 \pi } & 0.25869 \\ 4.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ 5 & 0 & 0. \\ 5.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ 5.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ 5.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ 6 & 0 & 0. \\ 6.25 & \frac{4096 \sqrt{2}}{348075 \pi } & 0.00529727 \\ 6.5 & \frac{256}{15015 \pi } & 0.00542706 \\ 6.75 & \frac{4096 \sqrt{2}}{648945 \pi } & 0.0028413 \\ 7 & 0 & 0. \\ \vdots & \vdots & \vdots \end{array}

The way all this relates to factorials and $\Gamma$ should be clear - one has$$\binom nz=\frac{n!}{z!(n-z)!},\ \Gamma(x)=\frac{x!}x$$and$$\mathrm B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}.$$In other words, $1/\Gamma(z)$ has zeros precisely at nonpositive integers, so $1/\Gamma(k-z)$ has zeros precisely at $k$, $k+1$, $k+2$, ..., so if we want to combine these for a function with zeros at all integers except $0$, $1$, ..., $n$ we should take $\frac1{\Gamma(1+z)\Gamma(n+1-z)}$ which turns out to be $\frac1{n!}\binom nz$.

  • 2
    $\begingroup$ Nice! I've never seen this before! (By the way, I should mention that this question was asked in 2013.) $\endgroup$ Commented Feb 23, 2015 at 7:44
  • $\begingroup$ I also attempted a more basic explanation here, by the way. $\endgroup$ Commented Feb 23, 2015 at 7:45
  • $\begingroup$ In your formula, that you think is by Euler... does that kind of infinite product have a name? It's almost like the multiplicative version of a Laurent series. $\endgroup$
    – nomen
    Commented Jun 7, 2022 at 21:06
  • 1
    $\begingroup$ @nomen This is an instance of what is usually called Weierstrass product $\endgroup$ Commented Jun 7, 2022 at 21:20

A first idea that comes to mind to define the factorial of a fractional number is interpolation: knowing the values at two successive integers, the values between these should be intermediate (looking at the "curve", you see that it is growing - very fast - but smoothly).

For instance, you could estimate that $3.1! = 3! + 0.1\times(4!-3!)=7.8$.

enter image description here

This does not look very accurate. By considering at the values of $\ln n!$, you see a trend much closer to a straight line.

enter image description here

So for better "accuracy", you can imagine that the curve is a exponential and do the interpolation on the logarithms: $\ln 3.1!=\ln 3!+0.1(\ln 4!-\ln 3!)\implies 3.1!=6.8921\cdots$

You can also increase the number of points use for interpolation, with the Lagrangian formula that computes a polynomial of a higher degree.

Anyway, this is quite empirical and does not lead to a satisfactory definition with interesting properties. Mathematicians have solved this differently: they found identities (such as the evaluation of integral $\int_0^\infty x^ne^{-x}dx=n!$) that can be shown to equal $n!$ when $n$ is an integer, and keep making sense when $n$ is not.

So they started using this as a definition of the factorial

$$n!=\int_0^\infty x^ne^{-x}dx.$$

With this formula, you get $3.1!=6.812622863\cdots$

Extension to negative values is yet a different story. If you consider the recursive definition of the factorial, $(n+1)!=(n+1)n!$, which allows to compute larger and larger values, you can reverse it as $(n-1)!=\dfrac{n!}n$. Going backwards, you get to the negatives. Then, you will have a surprise for negative integers...


I derived a form of the gamma function (see here) using some calculus and neat little tricks.

Anyways, define the factorial with two conditions:

  1. $n!=n(n-1)!$

  2. $1!=1$

From this, you can get the factorial for any integer value, but it does nothing to show you fractional values, at least not yet.

Define a function $f(x):=\ln(x!)$ and manipulate as follows:



Differentiate both sides (since the equation holds true for all $x$)


If you put $x-1$ into $(2)$, we get $f'(x-1)=f'(x-2)+\frac1{x-1}$, and repeat this process over and over...



Note that $(3)$ only holds true for integer $x$, just like the factorial, but it is much easier to generalize.

Recall the geometric sum:


Integrate both sides with respect to $r$ from $0$ to $1$,

$$\begin{align} \int_0^1\frac{1-r^n}{1-r}dr & =\int_0^11+r+r^2+\dots+r^{n-1}dr\\ & =\left.\frac11r+\frac12r^2+\frac13r^3+\dots+\frac1nr^n\right|_0^1\\ & =\frac11+\frac12+\dots+\frac1{x-1}+\frac1x\tag4\\ \end{align}$$

This is exactly what we need to extend $(3)$ to arbitrary $x$:


We then integrate this and apply the FTOC:


$$f(x)=f'(0)x+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

Recall what $f(x)$ was:

$$\ln(x!)=f'(0)x+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

Use the second condition of the factorial and $x=1$

$$\ln(1!)=f'(0)+\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

$$f'(0)=-\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi\tag5$$

So then,

$$x!=\exp\left[-x\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi\right]$$

which is equivalent to the gamma function.


try $$(n+t)! = n!+(n+1! \times t)$$ where t is any real number between 0 and 1

  • 1
    $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented Jun 7, 2022 at 19:43

Others have mentioned that the answers on the page you linked come from the Gamma function, which has the property that Γ(n)=(n-1)! for all nonnegative integers n. It stands to reason, then, that to find the value of x! for any x, you can use Γ(x+1).

But you also asked specifically about negative numbers, and there's an important caveat there. This definition produces well-defined values for all real and even complex numbers except negative integers.

This is easily seen by simply extending the definition of factorial backward, no gamma function required. The problem is, you wind up dividing by 0:

Given 3! = 6.

   2! = 3!/3 = 2
   1! = 2!/2 = 1
   0! = 1!/1 = 1
  (-1)! = 0!/0 = oops

You can see that this sequence also invalidates any other negative integer factorials, since (-2)! would be equal to (-1)!/-1 and (-1)! is undefined. Since (-2)! is undefined, so is (-3)!, and so on.

The Gamma function happily produces values for negative reals, but if you plot it, you'll see that it zooms out to infinity at the negative integers. But even if we were willing to extend the range of our function to allow infinity as a value, as silly as that is, Γ(-n) would still be undefined, because they aren't even well-behaved infinities! For every integer n, the limit of Γ(x) as x → -n can be either +∞ or -∞, depending on which direction you approach n from. Specifically, the limit is positive above even integers and below odd ones, negative above odd and below even.

For instance, Γ(-1.9) is about 5; Γ(-1.99) is about 50; Γ(-1.999) is about 500; and so on. The closer you get to x=-2 coming from the positive direction, the greater Γ(x) gets, increasing without bound, implying that Γ(-2) = (-3)! is +∞. But on the other side of x=-2, Γ(-2.1) is about -5, Γ(-2.01) is about -50, and Γ(-2.001) is about -500; the closer you get to x=-2 coming from the negative side, the lower Γ(x) gets, decreasing without bound, implying that Γ(-2) = (-3)! = -∞.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .