HomeStatistics & Probability › Dice Probability Calculator

Dice Probability Calculator

Computes the exact probability that the sum of several dice equals, is at least or at most a target value (by convolution of the face distributions), or that at least one die shows a specific face, with favourable and total outcomes and the odds.

When to use

You need probabilities for rolling dice of any number of sides (d4 to d100): totals in board games and role-playing games, or the chance of at least one six in several rolls.

Do not use when: The dice are weighted or you want the probability of a number of successes among trials with a given per-trial probability (use binomial-distribution).

Formula

P(sum = s) from the convolution of dice uniform distributions on 1…sides; P(sum ≥ s) = Σ_{j ≥ s} P(sum = j); P(at least one die shows f) = 1 − ((sides − 1)/sides)^dice; expected sum = dice(sides + 1)/2; variance = dice(sides² − 1)/12

Exact enumeration by iterated convolution (no simulation); sums outside dice … dice × sides have probability 0 and trigger a note. All dice are fair and independent.

Inputs

ParameterTypeUnitRequiredDescription
diceintegeryesHow many dice are rolled together. Range: ≥ 1, ≤ 50
sidesintegeryesFaces on each die, numbered 1 to sides (6 for a standard die). Range: ≥ 2, ≤ 100
targetenum: sum_equals | sum_at_least | sum_at_most | at_least_one_specificdefault sum_equalsWhich event to evaluate.
target_valueintegeryesThe sum of interest, or the face value (1 … sides) for at_least_one_specific. Range: ≥ 1

Outputs

OutputTypeUnitDescription
probabilitynumberProbability of the event, 0 to 1.
probability_percentnumber%Same probability in percent.
oddsstringProbability expressed as '1 in N'.
favorable_outcomesnumberNumber of ordered dice results producing the event.
total_outcomesnumbersides^dice ordered results.
expected_sumnumberdice × (sides + 1) / 2.
sum_std_devnumber√(dice × (sides² − 1) / 12).

Example

Sum of two dice equals 7: {"dice":2,"sides":6,"target":"sum_equals","target_value":7}{"probability":0.166667,"probability_percent":16.67,"odds":"1 in 6","favorable_outcomes":6,"total_outcomes":36,"expected_sum":7,"sum_std_dev":2.4152}

At least one six in four dice (de Méré): {"dice":4,"sides":6,"target":"at_least_one_specific","target_value":6}{"probability":0.517747,"probability_percent":51.77,"favorable_outcomes":671,"total_outcomes":1296,"expected_sum":14}

GET https://tttkmbb.com/api/v1/calculate/dice-probability?dice=2&sides=6&target=sum_equals&target_value=7

Machine access

Sources

FAQ

Why is 7 the most likely total of two dice?

Six of the 36 ordered outcomes (1+6, 2+5, 3+4, 4+3, 5+2, 6+1) sum to 7, more than any other total; the distribution of a sum of dice is triangular for two dice and approaches a bell curve for more.

What is de Méré's problem?

Whether at least one six in four rolls (51.77 %) is more likely than at least one double six in 24 rolls of two dice (49.14 %); the calculator gives the first directly (dice = 4, target 6) and the second with dice = 24, sides = 36, target 36.

Related calculators