Skip to content
UniKit

Dice roller

Roll dice with browser cryptography: standard expressions like d20, 2d6+3 or 2d6+1d8-2, normal / advantage / disadvantage modes, up to 1000 rolls with total distribution, average and most common result.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Roll settings

Rolls use the browser crypto RNG — nothing is sent anywhere.

Mode
1

Result

Enter an expression and hit Roll.

What this tool does

  • Roll dice during a tabletop session: standard expressions like d20, 2d6+3 and 2d6+1d8-2 work, with per-group detail and the total.
  • Roll d20 with advantage or disadvantage (two rolls, take the higher or lower) — the most common check in D&D 5e.
  • Check the range and expected value of an expression: minimum, maximum and average are computed, which helps when balancing numbers.
  • Roll up to 1000 times and look at the total distribution; the histogram shows why 2d6+3 clusters in the middle.

Example

Input

2d6+3 (normal mode, one roll)

Output

Expression: 2d6+3
Detail: 4 + 6 = 10
Modifier +3
Total: 13

That is the shape of one actual roll: 2d6+3 spans 5–15 with an expected value of 10, but the individual pips come from the browser crypto RNG and differ every time.

Frequently asked questions

Is the randomness truly random?

It uses the browser crypto.getRandomValues, a cryptographically secure pseudo-random generator, which is a better fit for dice than Math.random — though still pseudo-random in the strict sense. Everything happens locally, with no network calls and no logging.

How complex can an expression be?

Multiple additive groups are supported, such as 2d6+1d8-2: each group is rolled and subtotalled separately and then combined with the modifier. Dice count is 1–100 and sides 2–1000, and the number before d may be omitted (d20 means 1d20).

What are the limits of advantage / disadvantage?

It only accepts a single d20, optionally with a modifier such as d20+3, because advantage is defined as two d20s keeping the higher. Any other shape raises an error rather than silently doing something ambiguous.

Will rolling many times freeze the page?

The cap is 1000 rolls and values beyond that are clamped. A thousand iterations is just a loop and a counter, so there is no noticeable lag; the histogram is sorted by total and bar heights are normalised against the most frequent total.

How is the "most common total" chosen?

It is the total that occurred most often, with ties broken by the smaller value. With few rolls this number fluctuates a lot — roll 200 or more times to see the real shape of the distribution.

Keywords:dice rollerdiced20dndrpgrandom骰子掷骰跑团随机数

Related tools