ratio.

Find a tool

Browse all tools and categories β†—
TRIALS UNTIL SUCCESSES

Negative Binomial Probability Calculator

Calculate a failure-count PMF and inclusive tails when independent Bernoulli trials stop at a specified number of successes.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

β€”

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Use the failures-before-rth-success convention with log-gamma PMFs and regularized-beta probability tails.

    P(K=k)=C(k+rβˆ’1,k)p^r(1βˆ’p)^k; E[K]=r(1βˆ’p)/p

    Worked example

    With r=3 successes, p=0.5 and k=2 failures, exactly five trials are needed for that outcome. P(K=2)=0.1875, P(K≀2)=0.5 and P(Kβ‰₯2)=0.6875.

    Assumptions and input details

    Required successes 1–1000, failures 0–100000 and success probability from 0.000001% to 100%. Trials are independent and share the same p. This counts failures, not total trials; total trials equal failures plus required successes. Both tails include k and therefore do not sum to one. Extreme tiny probabilities can underflow; no independence or real-world success-rate estimation is performed.

    References: SciPy: negative-binomial failures convention

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL Β· MATHEMATICSBinomial Probability Calculator

    Calculate exactly k, at most k and at least k successes in independent trials. Explore the binomial distribution, expected value and standard deviation.

    RELATED TOOL Β· MATHEMATICSPoisson Probability Calculator

    Calculate exact-count and cumulative probabilities for events with a specified mean per interval. Compare below, at-most, at-least and above probabilities.

    RELATED TOOL Β· PROBABILITYCoupon Collector Completion Calculator

    Estimate collection time and completion probability when random draws can repeat equally likely types.

    ADVERTISEMENT

    Reserved advertising space.