Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Dice Roller (Dice Notation)

Roll any dice using notation like 2d6+3 or 4d6kh3, with history and stats.

2d6: min 2, max 12, average 7

Use via API

Roll dice in standard tabletop notation (2d6+3, 4d6kh3, d20-1, 3d8+2d4) with a cryptographic random source; returns each die, the total, and the possible min, max and average. Send JSON, get JSON back.

POST https://pithlab.com/api/v1/tools/dice-roller

curl https://pithlab.com/api/v1/tools/dice-roller \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"notation":"4d6kh3+2"}'

Fields and responseOpenAPI documentGet an API key

About the Dice Roller

Roll virtual dice with standard notation like 2d6+3, d20, d% or 4d6kh3. See each die, the total, possible range and average, plus a history of rolls.

How to use the Dice Roller

  1. Type dice notation such as 1d20+5, 3d8-1 or 1d20+1d4+2, or press one of the quick dice buttons.
  2. Add kh or kl to keep the highest or lowest dice, for example 4d6kh3 or 2d20kl1. dl and dh drop dice instead.
  3. Press Roll (or Enter). The total, every die and the history appear below; dropped dice are crossed out.

Examples

Two six-sided dice plus 3

Input

2d6+3

Output

Range 5 to 15, average 10
Ability score (keep best 3 of 4d6)

Input

4d6kh3

Output

Range 3 to 18, average 12.24
Attack with modifiers

Input

1d20+1d4+2

Output

Range 4 to 26, average 15
Percentile die

Input

d%

Output

Range 1 to 100, average 50.5

Frequently asked questions

How do I read dice notation?

NdS means roll N dice with S sides, so 3d8 is three eight-sided dice. Leave out N for one die (d20), use d% for a 100-sided die, and add or subtract numbers or other dice with + and -.

What do kh, kl, dl and dh mean?

kh3 keeps the highest 3 dice and kl1 keeps the lowest 1. dl1 drops the lowest die and dh1 drops the highest. 2d20kh1 is advantage and 2d20kl1 is disadvantage in D&D 5e.

Are the rolls fair?

Yes. Each die uses your browser's cryptographically secure random number generator with rejection sampling, so every face is equally likely. Nothing is sent to a server.

How is the average worked out?

For plain dice it is N times (S + 1) / 2. When you keep or drop dice, the tool computes the exact expected value from order statistics, which is why 4d6kh3 averages about 12.24 rather than 10.5.

Are there limits?

You can roll up to 100 dice in total per roll, each with up to 1,000 sides, across up to 20 terms.