Expected highest die calculator
Roll two six-sided dice and keep the higher one, and the long-run average is exactly 161/36. Enter how many dice and how many sides, and see that average plus the chance of every highest face. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Dice
- 2
- Sides
- 6
- Expected highest
- 4.4722222222
- Exact fraction
- 161/36
The expected highest die calculator finds the long-run average of the best result when you roll several identical fair dice and keep only the highest one. It returns both an easy-to-use decimal and an exact reduced fraction, along with the probability of every possible highest face. This is useful when designing tabletop rules, comparing advantage-style mechanics, balancing rewards, or checking probability work without simulation. Because the calculation counts every possible outcome mathematically, the answer is deterministic and does not depend on a sample size or a lucky sequence of rolls.
Describe the keep-highest roll
Enter the number of dice rolled and the number of sides on each die. The dice are assumed to be independent, fair, identical, and numbered consecutively from 1 to the chosen side count. For example, rolling more dice cannot create a face above the die's maximum, but it shifts probability toward that upper end.
This calculator models the common instruction “roll several dice and keep the highest.” It does not add the dice, keep multiple dice, apply modifiers, reroll results, explode maximum faces, or handle dice with unequal probabilities. If a game includes any of those rules, treat this result as the baseline for its plain keep-one-highest portion rather than as the complete resolution of the custom mechanic.
Understand the exact calculation
For a highest result to be at most m, every die must show m or less. With n dice and s sides, that cumulative probability is (m/s) raised to the nth power. The probability that the maximum equals exactly m is therefore the difference between two neighboring cumulative counts: m^n minus (m−1)^n, divided by s^n.
The calculator multiplies each possible highest face by its exact count, adds those products, and divides by the total number of equally likely outcomes. The distribution also reports an exact probability fraction for every possible maximum. Its decimal probability is included for charts, quick comparisons, and application code that prefers ordinary numbers.
The ways values are strings because outcome counts can grow beyond JavaScript's safe integer range even when the final probabilities remain straightforward. This preserves every digit rather than silently rounding a large count.
Use the answer in game design
Expected value is most helpful when comparing mechanics across many uses. You can compare one large die with several smaller dice, estimate how much an extra advantage die improves a check, or price a reward that depends only on the best face. Read the distribution whenever thresholds matter: two mechanics with similar expected maxima can have different chances of reaching a particular target.
Avoid interpreting the mean as the most likely face; inspect the per-face probabilities for that question. Also remember that repeated uses average out only over time. A player can still roll the minimum or maximum on any single attempt.
What you can do with it
Balance an advantage mechanic
Measure the exact average benefit of adding another die while keeping only the best face.
Compare dice-pool choices
Compare candidate die counts and side counts before choosing a tabletop game's core resolution rule.
FAQ
What does expected highest mean?
It is the long-run average of the maximum face when the same keep-highest roll is repeated many times.
Are the dice fair and identical?
Yes. Every die has the same side count, each face is equally likely, and rolls are independent.
Does this support keeping the two highest dice?
No. It models only the single highest face. Keeping multiple dice requires an order-statistics calculation with a different output.
Why are outcome counts returned as strings?
Large dice pools can have more outcomes than JavaScript can represent as safe integers, so strings preserve the exact counts.
What is the expected highest of two six-sided dice?
Exactly 161/36, a little under four and a half. Keeping the better of two dice pulls the typical result clearly upward compared with rolling a single die.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/hobby/game-dice-expected-highest \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"dice":2,"sides":6}'const res = await fetch("https://api.kit.forhosting.com/hobby/game-dice-expected-highest", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"dice": 2,
"sides": 6
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/hobby/game-dice-expected-highest",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"dice": 2,
"sides": 6
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/hobby/game-dice-expected-highest", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"dice":2,"sides":6}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"dice":2,"sides":6}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/hobby/game-dice-expected-highest", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"dice": 2,
"sides": 6
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "hobby.game_dice_expected_highest",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_dice | 100 |
max_sides | 1000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Describe the keep-highest roll
The result called expected_highest is the average maximum you would approach over a very large number of repeated rolls. It is not a promise that a particular roll will land near that value, and it may be fractional even though every physical face is an integer.
Understand the exact calculation
All counting and fraction reduction use integer arithmetic, so the exact_fraction field is not inferred from a rounded decimal.
Use the answer in game design
The API costs $0.002 per request, while the same deterministic core can power the browser experience.
Integration use cases
Verify probability notes
Use reduced fractions and the complete maximum distribution to check design documents or test fixtures.
Technical questions
Is the result exact?
Yes. exact_fraction is calculated and reduced with integer arithmetic; the decimal is a convenient approximation of that fraction.
What does an API request cost?
Each API request costs $0.002.