Dice Roller — Roll 1 to 9 3D Dice
Dice Roller throws 1 to 9 standard six-sided dice at once, 3 by default, and recreates the roll with tumbling 3D animation and clacking sound, then reports every face and the total. Set the dice count, the sound switch and the volume, then press Roll dice, press Shake under the stage, or hit Space; the count accepts only whole numbers from 1 to 9 and clamps anything outside that range. Faces come from crypto.getRandomValues with rejection sampling, so all six sides are exactly equally likely, and the result is drawn before the animation starts — the 3D tumble only turns the corresponding face towards you and cannot change the outcome by stopping somewhere else. The numbered result area gives the dice stage, every face, the total and statistics for this round, the stage can go fullscreen in one click, and it also shows the range, expected value and most common total; the reference area lists the table of opposite faces adding to 7 and the combination counts for 1 to 9 dice. Note that this is not a physics collision simulation: the clack is synthesised live with Web Audio, and browser autoplay rules mean no sound is produced until the first click. Devices without 3D transforms or Web Audio fall back to flat pip cards or silence, with the faces unchanged. Everything runs on your device, and the ten most recent rolls stay only in this browser.
Choose 1 to 9 dice, 3 by default; out-of-range values are clamped
Results
No roll yet. Press Roll dice above; the faces are drawn first and the dice then tumble to match them.
Counts follow the faces actually drawn, not wherever the animation happens to stop.
- Sum range3 – 18
- Expected10.5
- Most common sum10 / 11
- Opposites1↔6 · 2↔5 · 3↔4
Opposite faces always add to 7. Sums are not uniformly distributed; more dice cluster them closer to the expectation.
No records yet. Roll once and it will appear here.
Dice reference data
Faces and opposites
Opposite faces of a standard die always add to 7. That convention lets the six faces map one-to-one onto six final angles; both handednesses of the 1-2-3 corner exist, and this tool fixes one of them.
| Face | Opposite |
|---|---|
| 1 | 6 |
| 2 | 5 |
| 3 | 4 |
Sums for 1 to 9 dice
The table is computed exactly from combination counts. An odd number of dice has two tied central modes; with a single die all six faces are equally likely and there is no unique mode.
| Dice | Sum range | Expected | Most common sum |
|---|---|---|---|
| 1 | 1 – 6 | 3.5 | all faces equally likely |
| 2 | 2 – 12 | 7 | 7 |
| 3 | 3 – 18 | 10.5 | 10 / 11 |
| 4 | 4 – 24 | 14 | 14 |
| 5 | 5 – 30 | 17.5 | 17 / 18 |
| 6 | 6 – 36 | 21 | 21 |
| 7 | 7 – 42 | 24.5 | 24 / 25 |
| 8 | 8 – 48 | 28 | 28 |
| 9 | 9 – 54 | 31.5 | 31 / 32 |
Randomness and sources
Each face starts with a 32-bit unsigned integer from crypto.getRandomValues; rejection sampling discards any value greater than or equal to 4294967292 and draws again, and the remainder modulo 6 plus one is the face. 2 to the power of 32 leaves a remainder of 4 when divided by 6, so a plain remainder introduces a bias of about two hundred-millionths; dropping those four values makes all six faces exactly equally likely. The method and history above can be checked against:
How to use
- Set the dice count to a whole number from 1 to 9 (3 by default), and check the sound switch and volume. Only integers in that range are accepted and values outside it are clamped to the boundary. If the device does not support transform-style: preserve-3d or Web Audio, the page switches to flat pip cards or a silent notice; the faces are unchanged.
- Press the Roll dice button or the Shake button under the stage, or press Space / R while focus is on an empty part of the page. Browser autoplay rules require the audio context to be created inside this user gesture, so there is no sound until the first click. The button is disabled during the tumble to prevent repeat triggers.
- Wait for the dice to settle one by one, then read the 3D stage, each face and the total in section 01, followed by the round statistics in 02 and the sum range, expectation and most common sum in 03. Faces are drawn before the animation starts, and the visible face is verified against the final angles once the dice stop. To put the stage on a big screen, press Fullscreen under it, then press Esc or the Exit fullscreen button in the top right to come back.
- Press Copy result for a single line of text, or Download image to export the faces and total as a PNG. Section 04 keeps the ten most recent rolls, which you can copy one by one or clear all at once. Changing the dice count clears the current round but leaves the history intact.
Frequently asked questions
Are the results fair? Why rejection sampling?
All six faces are exactly equally likely. crypto.getRandomValues returns a 32-bit integer with 2 to the power of 32 possible values, which 6 does not divide, so a plain remainder makes 1 to 4 slightly more likely. The tool discards the four values at the top of the range and draws again to remove that bias. If the browser has no CSPRNG at all, the tool reports the problem and stops rather than quietly falling back to an ordinary pseudo-random generator.
Does turning off the animation or sound change the faces?
No. Faces are drawn before the tumble begins; the 3D animation and clacks are presentation only. With reduced motion enabled the dice jump straight to their final faces, without 3D transforms they become flat pip cards, and muting or setting volume to 0 affects only sound. None of these changes the drawn faces or the total.
Why was there no sound on the first click? How do I change the volume?
Browser autoplay rules require an AudioContext to be created or resumed inside a user gesture, so the first Roll dice click unlocks audio and the tumble and settle sounds play normally from then on. The control card has a sound switch and a 0 to 100 volume slider, on by default at 60. If the device has no Web Audio, the switch is disabled with an explanation.
Why are sums not uniformly distributed? Which sum is most likely with three dice?
Because different sums have very different numbers of combinations. Three dice have 216 equally likely outcomes; 10 and 11 tie for the most common with 27 combinations each, while 3 and 18 have only one each. The reference area lists the range, the expectation of 3.5 times the count and the most common sum for 1 to 9 dice, so you can compare it with your round.
Are rolls uploaded? Where are they stored and how do I clear them?
Nothing is uploaded. The count, sound switch, volume and ten most recent rolls are written to this browser locStore under two keys created solely for this tool; no other tool storage is read, written or modified. The records section has a Clear records button, and clearing site data for this browser removes them as well.
What is it
Treating "it looks like it is tumbling" as proof of fairness is a common misunderstanding; the two have nothing to do with each other. Fairness can only be judged from the sampling distribution: the 32-bit integers from crypto.getRandomValues have 2 to the power of 32 possible values, which 6 does not divide, so a plain remainder makes 1 to 4 about two hundred-millionths more likely than 5 and 6; discarding the last four out-of-range values and drawing again makes all six sides exactly equally likely. Another misunderstanding is "read whichever face the animation stops on": this tool draws the faces first, then solves backwards for the angles that bring each face to the front, the tumble only presents the result, and once the dice settle the visible face is looked up from the final angles as a check. Opposite faces of a standard die always add to 7, namely 1 and 6, 2 and 5, 3 and 4; that is what lets the six faces map one-to-one onto six target angles, and both handednesses of the 1-2-3 corner exist while this tool fixes one of them. Sums are not uniformly distributed either: with three dice, 10 and 11 are the most common at 27 combinations each, and 3 and 18 have one each; the more dice you roll, the closer they cluster around 3.5 times the count. Sound also deserves a clarification: there is no audio file here, the clack is a short pulse of white noise shaped by a band-pass filter and a decay envelope, and browsers require the audio context to be created inside a user gesture, so there is no sound before the first click. Drawing, rendering and synthesis all happen on your device, and records are never uploaded.
Origin & history
Dice are among the earliest randomising objects humans left behind. Archaeologists have found dice-shaped artefacts thousands of years old at sites in Mesopotamia and the Indus Valley, made of clay, stone, bone and ivory, in shapes that were far from uniform — tetrahedra, elongated cuboids and irregular polyhedra all appear. Some of them mark their values very differently from a modern six-sided die, and researchers still disagree about whether they served divination, games or counting. The six-sided cube later became dominant because it is easy to make, gives each face a similar chance of landing upwards and makes rules simple to agree on; the modern convention that opposite faces add to 7 is only a convention, and the mirror-image arrangement with the opposite handedness exists too, with nothing physical forcing one over the other. What truly turned dice-throwing into something computable was probability theory in the middle of the seventeenth century. In 1654 Pascal and Fermat corresponded about the problem of points, asking how to divide the stake fairly in an unfinished game according to the rounds already played, and the two produced equivalent solutions by different combinatorial arguments. In 1657 Huygens built on this in De ratiociniis in ludo aleae, usually regarded as the first published treatise on probability. Bernoulli, de Moivre and Laplace then established the law of large numbers, the normal distribution and a systematic language for probability, and dice moved from the gaming table into textbooks as the cheapest way to teach sample spaces, independent events and expected value. Rolling dice on a computer still inherits that combinatorial framework: only the sampling source has changed to a cryptographic random number generator, and fairness still has to be guaranteed explicitly by techniques such as rejection sampling — a more convincing animation does not make it true by itself.
Related keywords
Feedback
Found a problem with a tool or have a suggestion? Email us — we read every message.
