Home › Statistics & 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
dice | integer | yes | How many dice are rolled together. Range: ≥ 1, ≤ 50 | |
sides | integer | yes | Faces on each die, numbered 1 to sides (6 for a standard die). Range: ≥ 2, ≤ 100 | |
target | enum: sum_equals | sum_at_least | sum_at_most | at_least_one_specific | default sum_equals | Which event to evaluate. | |
target_value | integer | yes | The sum of interest, or the face value (1 … sides) for at_least_one_specific. Range: ≥ 1 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
probability | number | Probability of the event, 0 to 1. | |
probability_percent | number | % | Same probability in percent. |
odds | string | Probability expressed as '1 in N'. | |
favorable_outcomes | number | Number of ordered dice results producing the event. | |
total_outcomes | number | sides^dice ordered results. | |
expected_sum | number | dice × (sides + 1) / 2. | |
sum_std_dev | number | √(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
- API:
GET https://tttkmbb.com/api/v1/calculate/dice-probability(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/dice-probability · Markdown: https://tttkmbb.com/statistics/dice-probability.md · JSON definition: https://tttkmbb.com/statistics/dice-probability.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="dice-probability" - OpenAPI operationId:
calculate_dice_probability - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wolfram MathWorld – Dice (reference)
- Wikipedia – Dice (reference)
- Wolfram MathWorld – de Méré's Problem (reference)
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
- Binomial Distribution Calculator — Number of dice showing a given face.
- Expected Value Calculator — Expected payoff of a dice game.
- Probability of Two Events Calculator — Combine two independent dice events.