Advanced maths

Gauss hypergeometric 2F1 calculator with convergence checks

Evaluate the Gauss hypergeometric function and its derivative by a bounded real-domain series,with term and cancellation diagnostics.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Evaluate the Gauss hypergeometric function and its derivative by a bounded real-domain series,with term and cancellation diagnostics. This is an analytic special function rather than a sampling probability distribution.

THE FORMULA2F1(a,b;c;z)=Σ (a)_k(b)_k z^k/((c)_k k!); d/dz=(ab/c)2F1(a+1,b+1;c+1;z).

A worked example

For a=b=1,c=2,z=0.5,the value is−log(1−z)/z=2log2≈1.3862943611. The derivative is≈1.2274112778.

Good to know

Real parameters within±10,c excludes nonpositive integers,|z|≤0.9. Up to5000series terms. No analytic continuation or complex branches. Positive/negative terminating upper parameters allowed;reject nonfinite or cancellation-unresolved calculations.

The name denotes a function rather than a probability law

The Gauss hypergeometric function has three parameters and a continuous argument. Its coefficient ratios use rising factorials. The hypergeometric probability calculator instead counts selections without replacement and takes integer population and draw counts.

These are different mathematical inputs and outputs despite the shared word. A returned2F1 value is not constrained to the probability interval and should not be interpreted as a percentage unless a separate normalized model establishes that meaning.

A hypergeometric special case has an elementary logarithmic checkx: 0 to 0.9a=b=1;c=2−log(1−z)/zAt0.5:2log2
Scroll across to see the full diagram.
For a=b=1,c=2,z=0.5,the value is−log(1−z)/z=2log2≈1.3862943611. The derivative is≈1.2274112778.

Compare this with the Multivariate hypergeometric probability calculator for several colors. The hypergeometric discrete probability distribution is not the analytic2F1 function.

Denominator parameters determine where the series is defined

A nonpositive integer c makes a denominator rising factorial vanish and is rejected by the standard series interface. Values close to those excluded integers can also create large terms and sensitive numerical behavior even when they are technically finite.

The page accepts bounded real parameters and a real argument with magnitude at most0.9. This stays within the ordinary power-series convergence disk and avoids making unsupported continuation or branch-cut choices for arguments beyond it.

A recurrence computes successive terms efficiently

Starting from the constant term one,the next contribution is obtained by multiplying by(a+k−1)(b+k−1)z divided by(c+k−1)k. This avoids repeated gamma-function evaluation and makes termination at a negative integer upper parameter explicit.

The derivative uses the shifted-parameter identity rather than a finite difference. Its denominator c still follows the same admissibility rule. Both the value and derivative must complete within the bounded iteration and finite-output checks.

The logarithmic default supplies a separate check

For a=b=1,c=2,the series equals−log(1−z)/z away from zero,with continuous value one at zero. Substituting z=0.5 gives twice the natural logarithm of two,which independently checks the default output.

Differentiating that elementary expression gives the stated derivative. This example therefore tests both the base evaluation and the parameter shift in the derivative formula,not merely a recurrence residual that shares the same starting coefficients.

Terminating series are valid special cases

If an upper parameter is a nonpositive integer,the corresponding rising factorial eventually becomes zero. The series then reduces to a polynomial,provided the denominator is admissible. Stopping at that zero contribution is an exact structural property of the input.

This case differs from a generic infinite series whose late contributions only become small. The output's term count reflects the numerical or structural stopping condition,but does not label every short sum an exact polynomial unless its parameters justify termination.

Monitor cancellation near difficult parameter combinations

Alternating contributions can make the absolute sum of term magnitudes much larger than the final answer. The implementation compares that quantity with floating precision to diagnose cancellation and rejects an unresolved value rather than printing arbitrary digits.

The last term and cancellation indicator remain numerical diagnostics. They do not establish a general analytic tail bound or guarantee relative accuracy arbitrarily close to a zero. Independent reference fixtures cover varied signs and terminating cases.

Retain the real-branch restriction when comparing references

Inside the supported real convergence disk,the power series fixes the ordinary branch directly. Outside it,continuation identities introduce additional conditions and branch conventions,so a general reference library may return values this page deliberately does not attempt.

When this function appears as one part of another formula,check every surrounding prefactor and parameter definition. A correct2F1 evaluation cannot compensate for swapped parameters,an omitted normalization constant or a probability interpretation imported from a different calculation.

A few questions, answered

Is this the hypergeometric distribution?

No. It evaluates the analytic Gauss2F1 special function.

Can c be zero?

No. Nonpositive integer denominator parameters are rejected.

Can the series terminate?

Yes. A nonpositive integer upper parameter can produce a polynomial.

Does it continue beyond the unit disk?

No. The implemented real argument range is within±0.9.

Find your calculator

Start typing to explore the library.