Roll Outcome
{{ lastTotalDisplay }}
{{ expression_normalized }} · {{ parsedSimulations }} simulations
{{ targetStatusLabel }} · success rate {{ successRateDisplay }}
{{ expression_normalized }} {{ parsedNotationLabel }} {{ adv_mode === 'adv' ? 'Advantage' : 'Disadvantage' }} RNG {{ rngModeLabel }} Seeded Explode {{ explodeModeLabel }} Reroll ≤ {{ rerollThreshold }} μ {{ meanDisplay }} σ {{ stdevDisplay }}
runs
reroll ≤
entries
Field Value Copy
{{ row.label }} {{ row.value }}
# Kept Roll chain Die total Copy
{{ die.index }} {{ die.kept ? 'Yes' : 'No' }} {{ die.chain }} {{ die.total }}
{{ compareSummary }}
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.

Everyday Use & Decision Guide:

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.

  • Watch the normalized expression and notation badge after each run. They confirm what the parser actually accepted, which matters when you typed keep or drop syntax.
  • Use seeded RNG when you need a repeatable test sequence, and use crypto RNG when you want browser cryptographic entropy instead of determinism.
  • If the result feels suspicious, open Roll Trace before changing rules. Dropped dice, rerolled low faces, and exploding chains are easier to trust once you see the per-die chain.

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.

Technical Details:

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.

Rule Pipeline

Rule pipeline used by the dice roller
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.

Formula Core For Simple Rolls

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.

E [ T ] = n s + 1 2 + m , σ [ T ] = n s2 - 1 12
Variable legend for the dice roller expectation equation
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

Outputs And Session State

Outputs produced by the dice roller
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.

Step-by-Step Guide:

Start by deciding whether you need one outcome or a probability picture, because that choice changes which result fields matter most.

  1. Pick a preset or type a Roll expression such as 2d6+3 or 4d6kh3. If you see a sample result already loaded, remember that the page auto-runs the current preset on first load.
  2. Set Simulations. Leave it at 1 for a single outcome, or raise it above 1 when you want Probability Lens, percentiles, and a meaningful Success rate.
  3. Open Advanced only for rules you actually need: Roll mode for advantage or disadvantage, Success check for a target, Exploding dice, Reroll threshold, RNG source, Seed, and Session log size.
  4. Press Roll and confirm the normalized expression plus the notation badge under Roll Outcome. Those tell you what the parser accepted after cleaning spacing and shorthand.
  5. Read Outcome Ledger first, then Probability Lens if simulations are above 1. If the chart area is empty, increase Simulations above 1 and roll again.
  6. If the tool shows Unsupported expression or Drop count must leave at least one die kept, fix the notation to one supported NdS rule set, then rerun and inspect Roll Trace to verify the corrected behavior.

Interpreting Results:

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.

  • Success rate always evaluates the final total after keep or drop rules and the modifier. It is not counting individual die hits.
  • Analytical mean and Analytical stdev appear only in the simple no-transform case. If they are blank, the rule set is too modified for the exact shortcut used here.
  • Probability Lens only exists when simulations > 1. With one run, there is no distribution to interpret.

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.

Worked Examples:

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.

FAQ:

Can I use this for wagering or prize-based outcomes?

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.

What notation does it actually accept?

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.

Why are Analytical mean and Analytical stdev blank?

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.

Does seeded mode repeat the same results?

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.

Does the page send my rolls to a server?

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.

Glossary:

Dice notation
A compact roll rule such as NdS with optional modifiers.
Keep highest
A rule that keeps only the largest die sums and drops the rest.
Exploding dice
A rule that adds another face when a die hits a chosen trigger value.
Advantage / disadvantage
Two full expression rolls where the higher or lower final total is selected.
Seeded RNG
A deterministic random sequence generated from the same seed string.

References: