Dice Roller

Two rollers in one: six-sided dice with real pip faces, and a custom roller for any die from a coin-flip d2 up to a d1,000,000. Every roll reports the sum, the product and how the values landed.

d6 Just enter your values below — results update automatically.
Six-sided dice

The ordinary board-game die, drawn with real pip faces. Throw anywhere from one to two hundred of them at once.

150100
Any number of sides

For role-playing dice and anything that is not a d6. A d2 is a coin flip; a d1,000,000 is fine too.

Total
—
Set your dice and roll
This throw, die by die
What this set should do on average

How this dice roller works

Pick a tab, say how many dice you want, and the roller throws them. The Standard dice tab is the familiar six-sided set — the kind that comes in a board game box — and it draws each result as a real pip face so you can read a handful of dice at a glance the way you would on a table. The Custom dice tab drops the pips and lets you name the number of sides, which is what you need for tabletop role-playing dice, probability homework, or anything that is not a d6.

Nothing is sent anywhere. The roll happens inside your browser in a few thousandths of a second, and the short tumble you see before the numbers settle is only there so a new roll feels like a roll rather than a page refresh. Change the number of dice and a fresh throw happens straight away; press Roll dice to throw the same set again.

Every throw reports four things beyond the individual values: the sum, the product, the average and the highest and lowest die in the set. The bar chart underneath counts how many times each face came up, which is the quickest way to see that a run of three sixes really was three sixes and not a misread.

Standard six-sided dice

A six-sided die, written d6, is the default die of almost every board game ever printed. The faces are numbered one to six and the pips are arranged so that opposite faces always add to seven: one opposite six, two opposite five, three opposite four. That is a manufacturing convention rather than a rule of probability, but it is why a real die looks the way it does, and the faces drawn here follow it.

The standard tab takes anything from a single die up to two hundred of them. One die is a flat one-in-six on each face. Two dice is where the interesting part starts: there is only one way to roll a total of two (both dice showing one) but six ways to roll a total of seven, which is why seven is the most common result in craps, Monopoly and Settlers of Catan alike.

Total on 2d6Ways to make itChance
2 or 1212.78%
3 or 1125.56%
4 or 1038.33%
5 or 9411.11%
6 or 8513.89%
7616.67%

Roll two dice a few dozen times here and you will watch that table assert itself. The sevens pile up and the twos stay rare, without anything in the code nudging them along.

Custom dice: d4, d8, d10, d12, d20, d100

Role-playing games use a whole family of dice, and the custom tab covers all of them by letting you type the number of sides directly. The five shapes beyond the cube are the Platonic solids plus the ten-sided trapezohedron, and each has its own job at the table.

  • d4 — a tetrahedron, four faces. Small weapon damage, and the one die that lands point-up instead of face-up.
  • d8 — an octahedron. Mid-range damage and hit dice.
  • d10 — ten faces, often rolled in pairs to make a percentile result.
  • d12 — a dodecahedron, the big-damage die.
  • d20 — an icosahedron, and the die that decides whether an action succeeds in most modern systems. A natural 20 is a critical success, a natural 1 a critical failure.
  • d100 — a percentile roll, either as a hundred-sided ball or as two d10s.

You are not limited to the shapes that exist as physical objects. A d2 is a coin flip. A d3 is useful and impossible to hold. A d1,000,000 is perfectly reasonable arithmetic and no manufacturer will ever mould one. Type any whole number of sides from 1 upward and the roller treats it as a fair die with that many equally likely faces.

If you need several different dice at once — say 2d6 plus a d20 — roll them as two separate throws and add the sums yourself, or use the random number generator if what you actually want is a range rather than a die.

Where the randomness comes from

Each face is chosen with your browser's cryptographic random number generator, the same crypto.getRandomValues facility that is considered strong enough to generate encryption keys. That is a deliberate choice over the ordinary Math.random, which is fast but is only required to look random, not to be unpredictable.

There is a subtlety that catches a lot of dice code. The obvious way to turn a random 32-bit number into a die roll is to take the remainder when dividing by the number of sides. That is very slightly unfair, because the range of 32-bit values does not divide evenly by, say, six: the low faces get one extra chance each. The bias is tiny — around one part in seven hundred million for a d6 — but it is real and it is avoidable. For a d6 exactly four of the four-billion-odd possible values sit in that uneven tail, so the bias runs at about one part in a billion. This roller throws those four values away and draws again, a technique called rejection sampling, so every face has exactly the same chance.

faces = 6 limit = floor(2^32 / 6) × 6 → the largest clean multiple draw r from crypto if r ≥ limit → discard, draw again die = (r mod 6) + 1

A physical die is not this fair. Injection-moulded dice have hollowed pips that remove a little mass from the high faces, and casino dice are made with flush, filled pips precisely because that difference is measurable over thousands of throws. A software die has no mass to worry about.

The odds behind common rolls

The chance of one specific outcome on one die is simply one divided by the number of sides. Rolling a particular result on several dice at once multiplies those chances together, which is why streaks feel so unlikely and are: five sixes in a row on a d6 is one chance in 7,776.

QuestionWorkingAnswer
A six on one d61 / 616.67%
Two sixes on 2d61 / 362.78%
At least one six on 2d61 − (5/6)²30.56%
A 20 on one d201 / 205.00%
At least one 20 on 2d201 − (19/20)²9.75%
A total of 18 on 3d61 / 2160.46%

The "at least one" line is the pattern worth memorising: it is almost always easier to work out the chance of the thing not happening and subtract from one. The probability calculator handles the general case if you want to chain several events together.

Expected values are tidier than they look. The average face of a fair die with s sides is (s + 1) / 2, so a d6 averages 3.5 and a d20 averages 10.5. Multiply by the number of dice and you have the expected sum: 3d6 averages 10.5, which is why so many tabletop stat blocks hover around ten.

Reading the sum, product and average

The sum is what nearly every game asks for, and what you compare against a target number. The average is the sum divided by the number of dice, and it is the figure to watch if you are testing whether a set of rolls looks reasonable: throw fifty d6 and the average should sit close to 3.5, drifting further from it the fewer dice you throw.

The product is the rarer statistic, and it grows at a speed that surprises people. Twenty d6 can produce a product with sixteen digits; a hundred of them can reach seventy-eight. Most calculators quietly give up here and fall back on floating-point notation, printing something like 1.78e+236 or simply Infinity. This page keeps the product exact at any size by doing the arithmetic in arbitrary-precision integers, the same approach used by the big number calculator. If a product runs to hundreds of digits you will see every one of them.

A product is worth having when a roll is multiplicative rather than additive — a compounding effect across several dice, a quick scratch-built random seed, or simply checking how fast a number can run away from you.

What people use a dice roller for

The most common reason is a missing die. Board games lose dice at a rate that defies physics, and one tab on a phone replaces the one that rolled under the sofa in 2019. A screen also settles arguments about whether a die that landed leaning against a wall counts.

Beyond that, the roller gets used for probability teaching, where throwing two hundred dice at once makes the shape of a distribution obvious in a way that a formula does not; for tabletop role-playing when the dice bag is at home; for picking a random winner or a random turn order; and for generating small amounts of random test data. Teachers in particular tend to use the custom tab with a large number of dice, then read the bar chart rather than the individual values.

If what you want is a number in a range rather than a die — a winner from 1 to 48, say — the random number generator is the better tool. If you are flipping for a yes or no, set the custom roller to two sides.

Fairness and accuracy notes

A few details about how this page behaves, so nothing is a surprise:

  • Dice are independent. Nothing carries over from the last roll, there is no smoothing, and no attempt is made to make results "look" random. Long runs of the same face will happen, because they happen with real dice too.
  • The number of dice is capped at 200 per throw. That is far past anything a game needs and keeps the page quick to draw; the reason there is a cap at all is that uncapped rollers will happily accept five thousand dice and freeze the tab.
  • Sides must be a whole number of 1 or more. A one-sided die is allowed and always rolls 1, which is arithmetically correct and practically useless.
  • Decimals in either field are rounded down to a whole number, and anything that is not a number is reported rather than silently replaced with a default.
  • The sum, average, highest and lowest are read from the values shown, so what you see on screen is exactly what was counted.

For statistics work on a set of rolls you have already recorded, the statistics calculator will give you the standard deviation and quartiles that this page does not.

Frequently asked questions

Is this dice roller actually random?

Yes. Each face is drawn from your browser's cryptographic random number generator rather than the ordinary pseudo-random one, and values that would introduce a small bias are discarded and redrawn so every face has an identical chance. The result is fairer than a moulded plastic die, which loses a little mass from its high faces where the pips are hollowed out.

How many dice can I roll at once?

Up to 200 in a single throw, with any number of sides from 1 upward. The cap exists so the page stays responsive; beyond a couple of hundred dice the individual values stop being readable and the bar chart of how often each face appeared is the useful output anyway.

Can I roll a d20, d100 or other role-playing dice?

Yes. Switch to the Custom dice tab and type the number of sides: 4, 8, 10, 12, 20 and 100 all work, as does any other whole number. Shortcut buttons are provided for the six common role-playing dice so you do not have to type them.

What does the product mean, and why is it so large?

The product is every die multiplied together rather than added. It grows extremely fast, so even twenty six-sided dice can produce a sixteen-digit figure. This page keeps it exact at any length using arbitrary-precision integer arithmetic, instead of switching to approximate scientific notation or returning Infinity as most rollers do.

Why is seven the most common result on two dice?

Because there are more ways to make it. Six different combinations total seven, from 1+6 through 6+1, while only one combination totals two. With 36 equally likely pairs, seven comes up on six of them, or 16.67% of throws.

Do the dice faces match a real die?

The pip layout follows the standard convention where opposite faces add to seven, which is how commercially produced dice are arranged. Only the face that landed upward is drawn, so the opposite-face rule is a detail of the drawing rather than something that affects the roll.

This dice roller is provided for games, teaching and general use. Results are generated in your browser and nothing is recorded or transmitted. It is not intended for gambling, lotteries, prize draws with legal requirements, or any use where a certified random source is required.