Triangular Distribution Calculator
Evaluate the triangular density, mean and variance from a minimum, maximum and mode.
What it does
The triangular distribution is a simple continuous model built from three numbers: a lowest value, a highest value and a most likely value. It is popular in risk analysis and simulation because it is easy to explain to people who can estimate a range and a best guess but not a full probability curve.
The density has two straight branches. Between the minimum and the mode it rises linearly, and between the mode and the maximum it falls linearly. The peak height is chosen so the total area under the curve is one. The tool evaluates the correct branch depending on where x sits relative to the mode.
The mean is the average of the three parameters, which makes the effect of changing the mode easy to see. The variance depends on the squared parameters and their pairwise products. It grows when the range widens and is smallest when the mode sits near the middle.
This page uses the standard form with the mode strictly between the endpoints. If the mode equals an endpoint the distribution becomes a one sided triangle, which needs a limiting form. The tool rejects those cases so the two branch formula is always valid.
The density value is not a probability. Probability for a continuous distribution comes from integrating the density over an interval. The calculator reports the point density, the mean and the variance, but not cumulative probabilities or quantiles.
How to use
- Enter the minimum value a.
- Enter the maximum value b, which must be greater than a.
- Enter the mode c between a and b.
- Enter the value x where you want the density.
- Read the density, mean and variance.
- Use the mean and variance as summary inputs for a larger simulation.
Formula
- a
- Lower bound or minimum.
- b
- Upper bound or maximum.
- c
- Mode, the most likely value.
- x
- Point at which the density is evaluated.
- f(x)
- Probability density at x.
The variance is (a² + b² + c² - ab - ac - bc) / 18, which is what the tool evaluates. Outside the interval from a to b the density is zero. Because the distribution is continuous, the exact value at a single point has no probability meaning.
Worked example
Example: minimum 0, maximum 10, mode 6, x = 4
Defaults: a = 0, b = 10, c = 6 and x = 4.
- Since x is below the mode, use the rising branch.
- Numerator: 2 x (4 - 0) = 8.
- Denominator: (10 - 0) x (6 - 0) = 60.
- Density: 8 / 60 = 0.133333.
- Mean: (0 + 10 + 6) / 3 = 5.333.
- Variance: (0 + 100 + 36 - 0 - 0 - 60) / 18 = 4.222.
Reference table
| x | Density | Branch |
|---|---|---|
| 0 | 0.000000 | Lower endpoint |
| 2 | 0.066667 | Rising |
| 4 | 0.133333 | Rising |
| 6 | 0.166667 | Mode |
| 8 | 0.100000 | Falling |
Limits
- Requires the mode to lie strictly between the endpoints.
- Reports density, not interval probability.
- Does not compute cumulative probabilities or quantiles.
- A crude model compared with data fitted distributions.
Common mistakes
- Entering the mode outside the minimum and maximum.
- Reading density as probability.
- Using a symmetric formula when the mode is not centred.
- Confusing this with the triangular numbers in number theory.
- Expecting a cumulative probability output from this tool.
Try it yourself
Quick checks. Answers sit tucked under each question.
Evaluate the density at x = 8 with the same parameters.
Here x is above the mode, so use the falling branch: 2 x (10 - 8) / ((10 - 0)(10 - 6)) = 4 / 40 = 0.100000.
What are the mean and variance for these parameters?
Mean is 5.333 and variance is 4.222, as shown by the tool for any x with this set of endpoints.
What happens if the mode equals the maximum?
The tool returns the error Require min < mode < max, because the two branch formula needs a strict interior mode.
Questions
What is the triangular distribution?
A continuous distribution defined by a minimum, a maximum and a most likely value, with a linear rise and fall in density.
Why is it used in risk analysis?
Because people can often estimate a range and a best guess more easily than a full statistical distribution.
Is the density a probability?
No. Probability is the area under the density over an interval.
What is the mean?
The simple average of the minimum, maximum and mode.
Can the mode be at an endpoint?
Not with this two branch formula. That case needs a one sided limiting form, which this tool rejects.
How does variance change with the range?
It grows quickly as the gap between minimum and maximum widens.
Sources
- Duke University Statistics 211: triangular distribution exercise
- NIST Dataplot Reference Manual: TRIPDF