Random Number & Dice Roller

The Random Number & Dice Guide

How the number ranges, coin flips and dice notation work, how to read a dice breakdown, and why the draws avoid bias.

Open Random Number & Dice Roller

What the Tool Does

The Random Number and Dice Roller provides three everyday randomizers in one place. The number tab draws whole numbers from a range you choose. The coin tab flips one or many coins. The dice tab rolls dice described in standard notation, such as 2d6+3, and reports every die separately. A short list of your last ten results appears underneath all three tabs.

Every draw comes from your browser's cryptographically secure random number generator. The draws happen on your device, and the results are kept only in the open page, so nothing is stored between visits.

Control by Control

  1. Tabs. Switch between random numbers, coin flip and dice notation. Each tab keeps its own inputs while you move between them.
  2. Lowest and highest value. Whole numbers only. Both bounds are included in the range, so 1 to 6 can produce a 1 and a 6. The lowest value must not be greater than the highest.
  3. How many numbers. Between 1 and 1,000. With one number, the result appears large in the output box. With several, they appear as a comma-separated list.
  4. Repeats. Allow repeats makes each draw independent. No repeats returns unique values, so the same number never appears twice in one result. The tool refuses a request for more unique numbers than the range contains.
  5. Draw numbers. Runs the draw and adds a line to the history with the range and the outcome.
  6. Number of flips. Between 1 and 1,000. The tally underneath counts heads and tails for that run.
  7. Dice expression. Type dice notation into the box. Pressing Enter does the same as Roll dice.
  8. Result and breakdown. The large figure is the total. The breakdown lists each dice group with its faces and subtotal. The face tally shows how often each face appeared in that group.
  9. Possible range. The lowest and highest totals the expression can produce, based on the dice and constants you entered.
  10. Last 10 results. A session-only list. Clear list empties it, and reloading the page also clears it.

Reading Dice Notation

A group reads as a count, the letter d, and a number of sides. The count defaults to 1 when it is left out, so d20 means one twenty-sided die. Each group can be preceded by a plus or minus sign, and constants can be added or subtracted anywhere after the first term. A minus sign in front of a group subtracts all of its faces from the total.

The tool accepts up to 100 dice in one expression, each group with between 2 and 1,000 sides, and constants up to 10,000. Spaces are ignored, so 2d6 + 3 and 2d6+3 are the same. An expression that cannot be read produces a message that points to the part it could not understand.

Worked Examples

Example 1: the range of 2d6+3. Two six-sided dice give totals from 2 to 12. Adding 3 moves that to 5 to 15, which is the possible range the tool displays. The average of two dice is 7, so the average total is 10. Of the 36 equally likely pairs of dice, six add up to 7. That means a total of exactly 10 has a chance of 6 in 36, or about 16.7 percent.

Example 2: the range of 4d8-1. Four eight-sided dice give 4 to 32. Subtracting 1 gives 3 to 31. Each die averages 4.5, so the expected total is 4 x 4.5 - 1 = 17.

Example 3: a breakdown for 2d6+3. Suppose the dice show 4 and 6 in a hypothetical roll. The breakdown would read: group 2d6 with faces 4, 6, subtotal 10. Constant +3. Total 13. The face tally would read 4 x1, 6 x1. The numbers here are illustrative, because each real roll is new.

Example 4: coin flips. Flipping a fair coin 10 times produces exactly 5 heads in 252 of the 1,024 equally likely sequences, which is about 24.6 percent. Getting exactly 5 heads is common but far from certain, so a result of 3 or 7 heads is equally normal.

Example 5: unique picks. Drawing numbers 1 to 10 with no repeats, asking for 10 picks, returns every value once in a random order. Asking for 11 picks triggers the message, because the range only has 10 values.

Why the Draws Avoid Bias

The generator produces 32-bit values, which can take 4,294,967,296 different settings. To turn one of those values into a number between 1 and 6, a common shortcut is to take the remainder after dividing by 6. That shortcut is slightly uneven, because 4,294,967,296 does not split evenly into groups of six. The remainder 4 is left over, so the results 1 to 4 would show up very slightly more often than 5 and 6.

The tool avoids the problem with rejection sampling. It calculates the largest multiple of the range that fits in 32 bits, and if a value falls above that point it throws the value away and draws again. For a range of six, only four of the 4,294,967,296 values are discarded, which is roughly one draw in a billion. The result is an even split with almost no extra work.

Tips and Common Mistakes

  • Check the bounds first. A message that says the lowest value is greater than the highest usually means the two boxes were swapped.
  • Remember both ends are included. For a list of 100 items, use 1 to 100, not 0 to 100.
  • Use no repeats for picks. Drawing winners or seats from a list needs unique values, so choose the no repeats option before rolling.
  • Read the sign carefully. A term such as -1d4 subtracts a die, while 1d4-1 rolls one die and subtracts one from the result.
  • Copy results you need. The session list is cleared on reload, so write down anything you must keep.
  • Do not treat the tool as a gambling device. It is a convenient, fair randomizer for games and casual decisions, but it is not certified for gambling or regulated draws.

Frequently Asked Questions

Why can two runs of the same range give different results?

Each draw is independent and unpredictable by design. The tool does not replay a stored sequence, so the same settings will produce a different result each time, and no past result tells you what comes next.

Is a sequence of ten heads more likely to be followed by tails?

No. Each flip is a fresh draw with the same chance of heads or tails. Long streaks happen by chance more often than people expect, but they do not make the next flip more likely to go the other way.

Why does the dice total sometimes land outside the range I expected?

The possible range is shown under the total and is calculated from the minimum and maximum faces of every group. If a total seems outside it, check the signs of each term, because a negative dice group subtracts its faces rather than adding them.

Can I use this tool to choose a winner in a contest?

It is suitable for casual picks, classroom games, and informal draws where everyone accepts the method. For a formal contest with legal or financial stakes, use a process with published rules and an independent audit.

Open Dice Roller