Calculation of the probability of obtaining a number with multiple dice, calculated from simulations

Code available from GitHub - Created by Juan David Leongómez · 2021 · Versión en español


First dice type (mandatory)

Second dice type (optional)

Third dice type (optional)


Minimum target score

Number of simulations

Distribution of scores

NOTE: For the histogram of the simulation to look right, the minimum target score must be within the range of the sum of the dice rolled and the modifier. For example, when rolling 1d20 + 3 the result can only be between 4 and 23. If you select a minimum target score smaller than 4 or greater than 23, the histogram will look strange, although the probability (shown below) will be correct