The triangular distribution is a simple yet surprisingly versatile probability model. It is defined entirely by three numbers: the minimum a, the most likely value or mode c, and the maximum b. Because it is easy to understand and requires very little data, it often appears in project management and risk analysis when only rough estimates are available. The distribution forms a triangle-shaped curve that rises linearly from a to c and then drops linearly to b. Unlike a uniform distribution that treats every value between a and b as equally likely, the triangular distribution captures the intuition that some outcomes are more probable than others, while still constraining them within clear bounds.
The probability density function (PDF) is piecewise-defined. For values between the minimum and the mode, the density rises linearly:
For values between the mode and the maximum, the density decreases linearly:
Outside the interval [a,b], the density is zero. This simple shape makes the distribution intuitive for non-statisticians while still providing useful information about likely outcomes.
The cumulative distribution function (CDF) is likewise piecewise. For a ≤ x ≤ c:
For c < x ≤ b:
Again, the CDF is zero below a and one above b. Although the formulas look complicated, they are straightforward when implemented in code.
The triangular distribution has simple closed-form expressions for its first two moments. The mean is the average of the three defining parameters:
The variance is given by:
These formulas allow for quick assessments of the distribution's center and spread, which are helpful in planning scenarios where tasks may finish early, on time, or late.
The triangular distribution's shape depends on where the mode lies relative to the extremes. The table below summarizes some common cases:
Mode Position | Description |
---|---|
c=a | Right-skewed, starts at peak then tapers down. |
c=b | Left-skewed, rises from minimum then peaks at end. |
c=(a+b)/2 | Symmetric, essentially a tent shape. |
One popular use is in project management's Program Evaluation and Review Technique (PERT), where tasks are estimated with optimistic, most likely, and pessimistic times. The triangular distribution converts those three numbers into a crude probability model so managers can gauge completion dates. It is also used in engineering reliability when little data exists for component lifetimes, and in simulation models that require bounded random values.
To get started, enter the minimum, mode, and maximum along with a point x where you want to evaluate the distribution. The calculator will display the PDF and CDF at that point, plus the mean and variance derived from the parameters. Because the calculation runs entirely in your browser, no information is sent anywhere. You can experiment with different shapes or copy the results for reports using the Copy button.
Imagine estimating the duration of a short project. You think it could take as few as 3 days if everything goes well, 7 days is the most realistic guess, and 10 days would be the absolute maximum. Entering a = 3, c = 7, b = 10 and evaluating at x = 5 might yield a PDF around 0.088 and a CDF near 0.32, meaning there's roughly a 32 % chance the project will be done within five days. The mean of this distribution is (3 + 7 + 10)/3 ≈ 6.7 days, so you could plan around that value while still acknowledging the range of possibilities.
The triangular distribution's strength is its simplicity—just three numbers provide a quick model. Its main limitation is that it assumes a single most likely value and symmetrical rise and fall around that mode. Real-world phenomena may have multiple peaks or heavier tails than a triangle can capture. Nonetheless, for high-level planning and when data is scarce, the triangular distribution offers a pragmatic balance between realism and tractability.
The JavaScript implementation mirrors the mathematical formulas exactly. After validating your input, it determines whether x lies below the mode or above it, and applies the corresponding PDF and CDF equations. It also checks that the parameters satisfy a <= c <= b; otherwise it will warn you that they must be ordered. The output is formatted with a few decimal places and placed in a
If you're new to probability distributions, the triangular distribution serves as a gentle introduction. Explore how changing each parameter affects the curve and experiment with scenarios from your own projects. While the model is crude compared to more complex distributions, its intuitive shape makes it a staple of simple simulations and time-cost analyses. Learning how to apply it effectively can provide insight when detailed data is unavailable and decisions still need to be made.
The formulas above may appear out of thin air, but they follow directly from integrating the linear PDF. For a ≤ x ≤ c, the density is a line with slope , so the area under the curve from a to x is a triangle with base x-a and height , yielding . Integrating the falling segment between c and x produces the second piece of the CDF. Inverting these expressions gives the quantile function used by the calculator: solve for x in terms of p to find the value where the CDF equals a desired probability. This inverse transform is particularly helpful for simulation, as drawing a uniform random number p and plugging it into the quantile function generates triangularly distributed samples.
Monte Carlo simulations often require inputs with bounded support but an obvious most likely value. Using the quantile method described above, one can generate synthetic task durations, component lifetimes, or demand forecasts. The simplicity of the distribution reduces computational overhead compared with fitting complex parametric models. When chained together in a project schedule, these random draws provide a visual sense of best-case and worst-case completion times, helping managers evaluate contingency buffers and identify bottlenecks.
While the triangular distribution is often chosen by expert judgment, one can also estimate its parameters from data. The minimum and maximum are commonly set to the smallest and largest observations, though extreme values may be trimmed if they are believed to be outliers. The mode can be estimated by the sample mode or by maximizing the likelihood function, which for the triangular distribution reduces to a straightforward search because the distribution’s support is bounded. Nevertheless, the distribution is best used when there are too few observations to justify complex fitting procedures; otherwise, more flexible families may provide better accuracy.
Suppose you plan a delivery route whose duration is modeled with a=20 minutes, c=30 minutes, and b=50 minutes. To find the 90th percentile of completion time, set p=0.9. Because , the probability lies in the upper branch. The quantile formula yields , or approximately 44 minutes. Nine times out of ten the route should finish by this time, guiding expectations for customer notifications and staffing.
A frequent mistake is swapping the parameter order so that c does not fall between a and b. The calculator guards against this, but in spreadsheets it can produce negative densities or probabilities greater than one. Another issue arises when probabilities are entered outside the 0–1 range while using the quantile function; this is now caught and reported to prevent nonsensical results. Finally, remember that the triangular distribution assumes linear change between parameters. If empirical data show curvature or multiple modes, consider alternatives like the beta distribution or kernel density estimates.
Extensions of the triangular model include asymmetric versions with different slopes on either side of the mode, mixtures of multiple triangles to capture multimodal behavior, and discrete triangular distributions used in board games to model dice with varying counts of outcomes. These variations underscore the distribution’s flexibility while reminding us that the simple three-parameter form is just a starting point. By understanding the core version in depth, practitioners can adapt it creatively to match the nuances of their own uncertainty estimates.
Find the Jordan canonical form of a 2x2 matrix.
Compute the Wilcoxon signed-rank test for matched pairs and learn how it evaluates median differences.
Expand rational functions into a Laurent series around a point.