Negative Binomial Distribution Calculator

Often one would like to model a situation where you have one, and only one, probability assigned to a specific event, such as the probability of a machine failing. In these situations, there is a probability of success (p) and the probability of failure (1 - p). In a number of trials (x), one might have a certain number of successes (r), with the rest being failures. Maybe you are a manufacturer who will offer to replace a machine purchased by one of your customers if the machine breaks down a certain number of times in a number of uses as opposed to just repairing it. You could model this situation with a negative-binomial distribution. Assumptions surrounding the negative-binomial are

  1. The number of observations (x) is fixed.
  2. The observations are independent of each other.
  3. Each observation has a probability of success and a probability of failure.
  4. The probability of success is the same for each trial.

Under these conditions, the probability of observing the rth success on the xth trial is represented by the probability density function (pdf) P(X = x) = x-1Cr-1pr(1 - p)x - r.

The mean of such a distribution is r/p. The variance is r(1 - p) / p2. You can interpret the mean of this distribution as the expected number of trials needed before observing the rth success.

You can use the calculator below to calculate probabilities under your own scenario using the assumptions you input. The probability density function yields probabilities for a specified number of trials needed to obtain r successes, whereas the cumulative density function yields probabilities for each and every number of trials up to a specified number needed to obtain r successes. The graphs generated are shaped in accordance with the assumptions you enter.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-06-14 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.