Dice Roller
Pick a die from d4 to d100, choose how many to roll and an optional modifier, then click Roll. Switch to Coin flip to toss up to 1,000 coins at once and count heads and tails.
Dice roll
Click Roll to roll the dice.
About this dice roller
This tool simulates fair dice and coins in your browser. It supports the seven standard polyhedral dice used in tabletop games (d4, d6, d8, d10, d12, d20 and the percentile d100), lets you roll up to 100 of them in one go, and adds a flat modifier to the total the way most role-playing systems do. The coin mode tosses up to 1,000 coins and reports heads and tails with percentages. Nothing is sent to a server, and no roll depends on the one before it.
How a fair roll is simulated
Every die face must come up equally often, which statisticians call a uniform distribution. For each die the roller takes a random number r between 0 and 1 from the browser's cryptographically secure generator and computes 1 + floor(r × sides). Because r is spread evenly over its range, every face from 1 to sides has probability exactly 1 ÷ sides: 1/6 ≈ 16.7% on a d6, 1/20 = 5% on a d20 and 1% on a d100.
The long-run average, shown as the expected total, is:
Expected total = dice × (sides + 1) ÷ 2 + modifier
Example: with the default 2d6 and no modifier, one die averages (6 + 1) ÷ 2 = 3.5, so two dice average 2 × 3.5 = 7. Add a +3 modifier and the expected total becomes 7 + 3 = 10, while the possible range shifts from 2–12 to 5–15. A single roll can land anywhere in that range; the expected value only tells you where the results cluster over many rolls.
Probability of each total with 2d6
Rolling two dice and adding them does not give a flat distribution. There are 36 equally likely pairs, and middle totals can be made in more ways than the extremes:
| Total | Ways to roll it | Probability |
|---|---|---|
| 2 | 1 (1+1) | 1/36 = 2.8% |
| 3 | 2 | 2/36 = 5.6% |
| 4 | 3 | 3/36 = 8.3% |
| 5 | 4 | 4/36 = 11.1% |
| 6 | 5 | 5/36 = 13.9% |
| 7 | 6 | 6/36 = 16.7% |
| 8 | 5 | 5/36 = 13.9% |
| 9 | 4 | 4/36 = 11.1% |
| 10 | 3 | 3/36 = 8.3% |
| 11 | 2 | 2/36 = 5.6% |
| 12 | 1 (6+6) | 1/36 = 2.8% |
This is why 7 is the key number in craps and why settlements in Catan are worth more next to a 6 or an 8 than a 2 or a 12. With more dice the curve gets narrower and more bell-shaped. To count combinations for other games, try the permutation and combination calculator.
How to use this dice roller
- Choose Dice or Coin flip.
- Select the die type and enter how many dice to roll, from 1 to 100.
- Enter a modifier if your game adds a bonus or penalty to the total; leave it at 0 otherwise.
- Click Roll. The total appears first, with every individual die listed below so you can apply rules such as "reroll 1s" or "keep the highest".
- For coins, enter how many to flip and click Flip. The full heads/tails sequence is shown for up to 50 coins.
Dice in tabletop games
- d20 systems (Dungeons & Dragons, Pathfinder): roll 1d20, add your modifier and compare with a target number. Rolling with advantage means rolling two d20 and keeping the higher, which raises the average from 10.5 to about 13.8.
- Damage rolls such as 2d6+3 use several dice plus a flat bonus, exactly what the modifier field is for.
- Percentile (d100) rolls are used in Call of Cthulhu and many random tables; a result is a success when it is at or below your skill percentage.
- Dice pools (Shadowrun, Vampire) roll a handful of d6 or d10 and count how many show a target number or higher; the individual dice chips make this easy.
- Coins settle who goes first, break ties, or stand in for any 50/50 call.
Tips and limitations
- Streaks are normal. Five heads in a row happens about 3% of the time (1 in 32) and says nothing about the next flip; each toss is independent.
- Do not expect the average. On 2d6 the expected 7 appears only one roll in six. Use the expected value to compare options, not to predict a single roll.
- Mixed dice such as 1d8 + 2d6 need two separate rolls; add the totals yourself.
- No history is kept. Note results you need to keep before rolling again. For draws from a list of names rather than numbers, use the random picker; for arbitrary ranges, the random number generator.
Frequently asked questions
Are these dice rolls really random?
Each roll uses the browser's cryptographically secure random source (crypto.getRandomValues), the same one used for encryption keys, and maps it evenly onto the faces of the die. Every face has exactly the same probability and no roll depends on the previous one, so the results are at least as fair as physical dice.
What does a modifier do?
The modifier is a fixed number added to (or subtracted from) the total once, not to each die. In many role-playing games you roll 1d20 and add an ability modifier such as +3; here you would choose d20, 1 die and a modifier of 3.
Why is my total so different from the expected value?
The expected value is the average you would see over a very large number of rolls, not a prediction for a single roll. With 2d6 the expected total is 7, yet a 2 or a 12 each turn up about once in 36 rolls. The more dice you roll, the closer the total tends to sit to the expected value in relative terms.
Can I roll different dice at once, like 1d8 + 2d6?
Roll each kind separately and add the totals. Set d8 and 1 die, note the result, then switch to d6 and 2 dice. Put any flat bonus in the modifier field on one of the rolls.
How many heads should I expect from a coin flip?
Half the flips on average. With 10 coins the most likely single outcome is 5 heads, but that exact result only occurs about 25% of the time; anything from 3 to 7 heads happens roughly 89% of the time. Long runs of the same side are normal and do not mean the coin is unfair.