Dice Roller - Roll Any Dice Online

Use this dice roller to roll virtual dice online. Pick the number of dice, choose any sides, and read the rolls, sum, and frequency table.

Dice Roller

How many dice to roll in one batch. Integer from 1 to 50.

Faces on each die. Common presets: 4, 6, 8, 10, 12, 20, 100. Range 2 to 1000.

Optional integer. Enter any integer to reproduce the same roll list. Leave empty for a fresh random batch.

Results

Roll List
0
Sum 0
Mean 0
Minimum 0
Maximum 0

Frequency Table

How many times each face landed across the roll list. Counts include every die in the batch.

Roll the dice to see the frequency table.

What this tool does

A dice roller is a virtual replacement for physical dice that you can use from a web page instead of carrying a set around. The form takes the number of dice you want to roll in one batch, the number of sides on each die from 2 up to 1000, and an optional seed for reproducible results, then rerenders the roll list, sum, mean, and frequency table every time any value changes.

  • Tabletop RPG combat: Roll a d20 for an attack, a d6 for damage, or a handful of d4s for a fireball without owning the dice.
  • Board game replacements: Replace missing or broken dice for Monopoly, Yahtzee, craps, or any game that asks for 1 to 10 dice at once.
  • Classroom probability: Roll a batch of dice and compare the realized mean to the expected (sides + 1) / 2 to show the law of large numbers in action.
  • Reproducible randomness: Enter a seed to regenerate the exact same roll list when you need to repeat a board game session or a teaching demo.

Each die roll is an independent draw from a discrete uniform distribution with sides equally likely, so a single die has mean (sides + 1) / 2 and the sum of n dice has mean n times that value. The tool pulls one uniform random number per die, scales it into an integer from 1 to sides, and accumulates the batch in the same view.

If you only need the theoretical probability of a particular sum or face, the dice probability calculator handles that without any random draws. This page is the simulation half of that workflow: it actually runs the experiment.

For a focused two-die sum and doubles view, Dice runs a complementary small-batch simulator alongside the multi-die tool on this page.

How the random roll works

The tool draws one uniform random number per die and turns it into an integer from 1 to sides using the standard floor-and-add trick. Multiply the uniform draw by sides, drop the fractional part with floor, and add 1 so the result is exactly 1 through sides. Repeat that step n times to produce the full roll list and the running summary.

For each die i in 1..n: draw u in [0, 1); result_i = floor(u * sides) + 1.
  • n: Number of dice to roll in one batch. Integer from 1 to 50, default 1 in the form.
  • sides: Faces on each die. Integer from 2 to 1000, default 6 for a standard cube die.
  • seed: Optional integer that seeds a deterministic pseudo-random sequence. Empty or zero falls back to Math.random for a fresh roll each run.

After each roll the value is added to the roll list, the running sum, and the min and max trackers, and the frequency table increments the matching face counter. The mean is computed once at the end as sum divided by n, so it always agrees with the displayed sum and roll count.

Worked example: 3 d20 with seed 2026

n = 3, sides = 20, seed = 2026

Draw u_1, u_2, u_3 in [0, 1). Each r_i = floor(u_i * 20) + 1.

A deterministic 3-roll list with sum equal to r_1 + r_2 + r_3 and mean = sum / 3.

The same seed always produces the same roll list, which makes the dice roller useful for repeating a tabletop session without surprises.

According to MDN Web Docs, Math.random, MDN Web Docs explains that Math.random returns a floating-point, pseudo-random number in the range 0 to 1 (inclusive of 0, exclusive of 1), which is exactly the uniform draw the dice roller scales into a face.

If you need the theoretical mean and standard deviation for n dice of m sides without running any rolls, Dice Average Calculator returns the analytic values directly.

Key concepts behind the random roll

Four ideas make the tool behave the way you expect. Each one explains a small piece of how a virtual die turns into a roll list.

Discrete uniform draw

A single die is a discrete uniform distribution: every face from 1 to sides has the same probability. The tool picks a face uniformly.

Scaling a uniform random number

Each roll starts with a uniform random number in [0, 1). Multiplying by sides and applying floor converts that continuous draw into an integer from 0 to sides - 1, and adding 1 shifts the range to 1 through sides.

Independence between dice

Each die uses a fresh random draw and does not look at any previous roll. That independence is what makes the batch mean close to (sides + 1) / 2.

Deterministic seed

A seed turns the random roll into a deterministic one. With the same seed the tool always returns the same roll list.

The seed concept is borrowed from pseudo-random number generators. Math.random() uses an internal seed that the browser does not expose, which is why two empty-seed runs almost never repeat. Entering an explicit seed overrides that behavior so the dice roller becomes a deterministic simulator you can rewind and replay.

Once the dice roller returns a batch, Dice Calculator can compute the exact probability of any sum or face count from the same dice configuration without re-rolling.

How to use this page

Set the three inputs, then read the roll list, sum, mean, minimum, maximum, and frequency table. The form updates on every input change, so changing the sides or the seed reruns the batch without any extra click.

  1. 1 Enter the number of dice: Type the integer number of dice to roll n into the first input. The default 1 is a single die; the form accepts 1 up to 50 dice in one batch.
  2. 2 Choose the sides per die: Set sides to 6 for a standard cube die, 20 for a d20, 100 for a percentile die, or any integer from 2 to 1000.
  3. 3 Optionally enter a seed: Type any integer into the seed field to reproduce the same roll list on later runs.
  4. 4 Read the roll list and sum: The roll list shows each die value in order. The sum below it is the total of all dice in the batch and the mean is the sum divided by the dice count.
  5. 5 Inspect the min, max, and frequency table: Use the minimum and maximum to see the spread of the batch, and use the frequency table to count how many times each face landed.
  6. 6 Reset for the next roll: Press Reset to clear the form back to n = 1, sides = 6, empty seed and to start a new roll.

If you need a d20 attack roll with advantage, set diceCount = 2 and sides = 20, read the roll list, and pick the higher of the two values. If you need a fireball that rolls 8d6, set diceCount = 8 and sides = 6 and add the eight values from the roll list to the spell's damage bonus.

After the tool returns a realized sum for two dice, Two Dice Probability Calculator can look up the exact probability of that sum and the related doubles distributions.

Benefits of using this page

The form combines a single-die roll, a multi-die batch, an optional seed, and a frequency table in one view, so a single calculation answers the most common dice-rolling questions without extra tools.

  • Any number of sides from one form: Set sides from 2 to 1000 in the same input, so d4, d6, d8, d10, d12, d20, and d100 are all handled without switching pages.
  • Up to 50 dice per batch: Roll a single die for an attack or up to 50 dice for a fireball or horde combat without leaving the form.
  • Reproducible roll lists: The optional seed turns the random batch into a deterministic one. Use the same seed on a second visit and the dice roller reproduces the exact same roll list.
  • Sum, mean, and frequency in one view: Sum, mean, minimum, maximum, and a per-face frequency table appear in the results panel so the realized outcome is readable at a glance.
  • Real-time updates: The form recomputes the roll list on every input change, so adjusting diceCount, sides, or the seed immediately shows the new outcome.

When the realized mean looks unusual, the frequency table lets you check whether one face is dramatically over- or under-represented. Cross-checking the realized mean against the theoretical (sides + 1) / 2 is the fastest way to spot a typo in sides or a bug in the random draw.

If the standard craps-style two-die view with sums and doubles is more useful than the general batch, 2 Dice Roller Calculator presents that exact layout side by side.

Factors that affect the results

The numbers are only as accurate as the assumptions behind each roll. Four practical factors change what the roll list really means and how it should be interpreted.

Number of sides

Larger sides make each face rarer, push the mean toward (sides + 1) / 2, and stretch the min and max of a single roll. The form accepts any sides from 2 to 1000.

Batch size

A small batch can show large swings away from the expected sum. For example, with sides = 6, three rolls often land between 3 and 18 while a hundred rolls almost always land between 250 and 350.

Pseudo-random quality

Math.random() is fine for a virtual roller, but it is not cryptographically secure. Use the seed field if the roll has to be reproducible.

Independence assumption

Each die is independent of the others. Stopping after a great roll, sharing a known-result die, or re-rolling low faces all break independence and the output should not be reused in those cases.

  • The tool runs in your browser and uses Math.random() by default. Two empty-seed visits will produce different roll lists, and that difference is by design, not a bug.
  • The form caps the batch at 50 dice and 1000 sides to keep the frequency table readable.
  • The tool does not show the underlying uniform draws. If you need to debug an unusual outcome, the seed field lets you reproduce the exact roll list.

Real physical dice can show small biases in practice, so a measured face distribution slightly different from 1 / sides is reasonable for a careful experiment. The form accepts any sides count, which keeps the simulation honest about what the experiment is actually doing.

According to NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.4 Discrete Uniform, a discrete uniform distribution assigns equal probability to each of k outcomes, which is the exact model used for a fair n-sided die.

According to Wikipedia, Dice, the standard dice used in tabletop role-playing games are the d4, d6, d8, d10, d12, d20, and d100, which is why the form exposes those numbers as common presets.

For a two-outcome random generator instead of a multi-sided die, Coin Flipper covers the same batch-roll workflow with heads and tails instead of faces.

Dice roller showing virtual dice rolls with side counts, sum, and frequency table for tabletop and classroom use
Dice roller showing virtual dice rolls with side counts, sum, and frequency table for tabletop and classroom use

Frequently Asked Questions

Q: How does this tool generate each roll?

A: The form draws one uniform random number per die from the range 0 to 1 and converts it to an integer from 1 to sides using floor(u * sides) + 1. Repeating that step for every die in the batch produces the full roll list and the running summary.

Q: Can I roll more than one die at a time?

A: Yes. Set the number of dice to any integer from 1 to 50 and the tool will roll that many independent dice in one batch and report the full roll list along with the sum, mean, minimum, maximum, and frequency table.

Q: Is the dice roller truly random?

A: By default the form uses the browser Math.random function, which is a pseudo-random source suitable for tabletop games and classroom demos. For exact reproducibility, enter any integer in the seed field and the same roll list will be returned on every run.

Q: What dice types does the tool support?

A: The form accepts any integer from 2 to 1000 sides, so it covers the standard d2, d4, d6, d8, d10, d12, d20, and d100 dice as well as any custom face count. The default 6 sides matches a standard cube die.

Q: Can I use this for tabletop RPGs?

A: Yes. Set sides to 20 for an attack roll, sides to 6 or 8 for a damage roll, and diceCount to the number of dice in the dice expression. For advantage roll two d20 and pick the higher; for disadvantage roll two d20 and pick the lower.

Q: How is the dice roll total calculated?

A: The total is the sum of every die in the roll list. For a batch of n dice each with sides faces the total ranges from n to n times sides, and the mean is the total divided by n.