| Field | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
| # | Kept | Roll chain | Die total | Copy |
|---|---|---|---|---|
| {{ die.index }} | {{ die.kept ? 'Yes' : 'No' }} | {{ die.chain }} | {{ die.total }} |
| When | Expression | Total | Simulations | Success rate | Copy |
|---|---|---|---|---|---|
| {{ entry.when }} | {{ entry.expression }} | {{ entry.total }} | {{ entry.simulations }} | {{ entry.successRate }} |
Dice notation turns a roll into a compact rule such as 1d20+5 or 4d6kh3. Those short strings look simple, but the odds change quickly once you add keep or drop rules, exploding dice, rerolls, or a second pass for advantage and disadvantage. This tool takes one of those compact rules and turns it into an immediate roll or a repeatable simulation so you can judge the total it tends to produce.
This tool parses one notation string, rolls it immediately, and can also simulate many runs to show how the result behaves over time. That makes it useful for tabletop checks, damage planning, percentile rolls, or quick house-rule comparisons when you want more than a single lucky or unlucky total.
A practical example is checking whether 1d20+5 really feels reliable against a target of 15, or seeing how 4d6kh3 tends to cluster around mid-range ability scores. Instead of treating one sample roll as the whole story, you can look at the last total alongside the mean, spread, percentiles, and success rate.
The important boundary is scope. This package accepts one NdS expression with an optional keep or drop suffix and one optional integer modifier. It does not parse arithmetic chains, parentheses, success-count systems, or full game-specific rule engines, so preset names should be read as quick starters rather than as complete emulations of any particular RPG.
The random output is for play, testing, and probability checking, not for monetary use. If you change the RNG mode, add exploding or reroll behavior, or compare a seeded sequence with a crypto-backed sequence, treat those as different experiments rather than as directly interchangeable evidence about the same roll.
For a quick table decision, begin with the closest preset or type a simple expression, then leave simulations at 1. That gives you one immediate total and a clean Roll Trace without mixing in distribution statistics you do not need.
When you care about odds instead of one outcome, raise simulations above 1 before pressing Roll. The page will then build the Probability Lens and fill the Outcome Ledger with mean, standard deviation, percentiles, and any Success rate you asked for, which is a much better way to judge reliability than staring at one last total.
A common misread is assuming a good last total means the expression is favorable. If Outcome Ledger shows a modest mean or a low Success rate, the tool is telling you that the dramatic last roll was the exception, not the rule.
The parser accepts one expression in the form NdS, optionally followed by kh, kl, dh, or dl, and then one optional signed integer modifier. If the count is omitted, the tool treats it as 1 die. Counts are clamped from 1 to 2,000, sides from 2 to 100,000, and the modifier to a large integer range so the expression stays valid and finite.
Each run rolls every die with the selected RNG source, applies one reroll when the first face is less than or equal to the reroll threshold, then keeps adding extra faces while the explode trigger repeats. After that, the keep or drop rule is resolved from the finished die sums, the kept dice form the subtotal, and the modifier is added to produce the final total. Advantage and disadvantage work by rolling the whole expression twice and selecting the higher or lower total, not by re-rolling a single die.
When simulations are greater than 1, the tool sorts the totals and derives a histogram, mean, standard deviation, minimum, maximum, and the P10, median, and P90 percentiles. A success check compares the final total against the chosen operator and target after all other rules have finished. Exact analytical mean and standard deviation are only exposed when there is no keep or drop rule, no reroll, no exploding dice, and no advantage or disadvantage.
| Stage | What happens | Important boundary |
|---|---|---|
| Parse | Reads one NdS expression with optional keep or drop suffix and one modifier. | Unsupported syntax triggers a visible error instead of partial parsing. |
| Roll | Creates one face per die from crypto RNG, seeded RNG, or Math.random(). | Seeded mode is deterministic for the same seed and input sequence. |
| Reroll / explode | Rerolls once for low faces at or below the threshold, then appends exploding faces while the trigger repeats. | Exploding chains stop after 40 extra faces per die to prevent runaway loops. |
| Keep / drop | Ranks die sums, then keeps or removes dice according to kh, kl, dh, or dl. | Drop rules must still leave at least one kept die. |
| Total and target | Adds the modifier to the kept subtotal, then checks the final total against >, >=, =, <, or <=. | The success rule always evaluates the final total, not individual die faces. |
| Simulation stats | Aggregates totals into histogram buckets and summary statistics. | The Probability Lens appears only when simulations are above 1. |
When the expression has no keep or drop rule, no reroll threshold, no exploding trigger, and no advantage or disadvantage, the tool can expose an exact mean and standard deviation for the final total.
| Symbol | Meaning | Maps to |
|---|---|---|
| n | Number of dice | The count in the parsed expression |
| s | Number of sides per die | The die size in the parsed expression |
| m | Signed modifier | The trailing +k or -k term |
| T | Final total | The value shown as Last total and used by Success check |
| Output | Format | Meaning |
|---|---|---|
| Roll Outcome | Summary badges | Shows the last total, normalized expression, parsed notation, RNG mode, and optional success summary. |
| Outcome Ledger | Table | Reports Last total, kept subtotal, modifier, mean, spread, min or max, and any success metrics. |
| Probability Lens | Histogram | Displays frequency by final total when simulations exceed 1. |
| Roll Trace | Per-die rows | Shows each die chain, whether it was kept, and the die total after rerolls or explosions. |
| Session Log | Recent entries | Keeps the latest runs in page memory up to the configured log-size limit. |
| JSON | Structured snapshot | Captures inputs, evaluation data, the last roll, comparison rolls, distribution, and history for the current page state. |
Start by deciding whether you need one outcome or a probability picture, because that choice changes which result fields matter most.
The most important question is whether you care about the last run or about the rule set as a whole. Last total answers the first question. Mean total, P10 total, Median total, P90 total, and Success rate answer the second.
The main false-confidence trap is overvaluing one dramatic total. Verify any strong impression by comparing it with Success rate or the histogram, and remember that seeded mode improves repeatability, not randomness quality for decision-making.
For a common check, enter 1d20+5, set a Success check of >= 15, and run 200 simulations. One run might show Last total 17 while Outcome Ledger reports Mean total 15.50 and Success rate near 55%. That tells you the build is slightly favorable against the target, but still far from automatic.
For ability generation, roll 4d6kh3 with 1,000 simulations. A typical result is Last total 14, Mean total around 12.2, Median total 12, and P90 total 16. The important reading is not the lucky 14 by itself, but the cluster centered around the low teens after the lowest die is discarded.
For a troubleshooting case, try 4d6dl4. The tool returns Drop count must leave at least one die kept because all four dice would be removed. Change the rule to 4d6dl1 or 4d6kh3, roll again, and confirm in Roll Trace that the dropped die is marked No under Kept.
No. Treat it as a roller for tabletop play, testing, and probability checks. The random output has no monetary value, and the page is better suited to game support than to regulated or audited draw workflows.
One expression in the form NdS, optionally followed by kh, kl, dh, or dl, then one optional signed integer modifier. Expressions such as 2d6+1d4 or parenthesized formulas are outside this parser.
Those fields only appear when the expression is a simple sum of fair dice plus a modifier. Keep or drop rules, rerolls, exploding dice, and advantage or disadvantage break the shortcut, so the tool falls back to simulation-only statistics.
Yes, if you keep the same expression, advanced settings, and seed. The seed is hashed into a deterministic 32-bit generator, so repeated runs with the same setup replay the same sequence of random integers.
Not in this package. Roll parsing, RNG selection, simulations, the histogram, and the session log are handled in the browser, and the Session Log only lives in current page state unless you export it yourself.