Dice PK — head-to-head rolls for 1 to 9 teams
Dice PK puts 1 to 9 teams at one table. Each team rolls 1 to 9 six-sided dice — red and blue with two dice each by default — and the PK button in the middle starts every tumble at once. Every face comes from the browser's cryptographic random source with rejection sampling, so all six sides are exactly equally likely; the result is drawn before the 3D dice move, and where they stop can never change it. Totals are summed and the higher total wins, a shared top score is marked as a tie, and a single team gets a solo practice roll without a winner. The top bar changes team and dice counts, toggles sound and volume, and opens a fullscreen stage you can show to a whole room. The result area gives the winner banner, every total, the margin, the expected value and mode for the current dice count, and the last 10 rounds; the reference area derives sum ranges and two-team tie probabilities for 1 to 9 dice by exact convolution. Sound is synthesised live with Web Audio and only unlocks after the first click; muted devices and browsers without Web Audio still roll normally. The limits are honest too: iPhone Safari falls back to a viewport-filling overlay instead of system fullscreen, a refresh keeps settings and history but not the round in progress, and nothing is ever uploaded.
01
Press the PK button in the middle to start this round.
02
This round
- Winners
- 0
- Top margin
- —
- Highest face
- —
- Rounds rolled
- 0
03
Probability readout
- Sum range
- 2 – 12
- Expected value
- 7.0
- Most common sums
- 7
- Two-team tie rate
- 11.27%
Computed for 2 teams with 2 dice each; the tie rate only matches the current setup for two teams.
04
Last 10 rounds
No records yet — the first roll will appear here.
Sum distribution for 1 to 9 dice
The table is generated by exact convolution: n dice have a minimum sum of n, a maximum of 6n and an expected value of 3.5n.
| Dice | Min sum | Max sum | Expected | Modes |
|---|---|---|---|---|
| 1 | 1 | 6 | 3.5 | 1 / 2 / 3 / 4 / 5 / 6 |
| 2 | 2 | 12 | 7.0 | 7 |
| 3 | 3 | 18 | 10.5 | 10 / 11 |
| 4 | 4 | 24 | 14.0 | 14 |
| 5 | 5 | 30 | 17.5 | 17 / 18 |
| 6 | 6 | 36 | 21.0 | 21 |
| 7 | 7 | 42 | 24.5 | 24 / 25 |
| 8 | 8 | 48 | 28.0 | 28 |
| 9 | 9 | 54 | 31.5 | 31 / 32 |
Two-team tie probability (same dice count per team)
Derived from the same distribution table as the chance that the highest total is shared. More dice spread the total around the middle, so ties actually become rarer.
| Dice | Tie rate |
|---|---|
| 1 | 16.67% |
| 2 | 11.27% |
| 3 | 9.28% |
| 4 | 8.09% |
| 5 | 7.27% |
| 6 | 6.65% |
| 7 | 6.17% |
| 8 | 5.78% |
| 9 | 5.46% |
Colour palette and fairness notes
Red and blue face each other by default; expanding to nine teams adds green, orange, purple, cyan, pink, indigo and slate. Colours only distinguish teams and carry no weight.
Faces come from crypto.getRandomValues with rejection sampling: 2 to the power of 32 is not divisible by 6, so a plain remainder is biased; discarding the last four values removes it.
Tumbling, sound, the flat fallback and reduced motion affect presentation only. The result is fixed before the animation and muting never changes a face.
How to use
- { "q": "Step 1: set the teams", "a": "The team stepper accepts 1 to 9, with 2 by default — red first, then blue, followed by green, orange, purple, cyan, pink, indigo and slate. Changing the team count clears the current round but keeps the last 10 rounds of history." }
- { "q": "Step 2: set the dice per team", "a": "The dice stepper also accepts 1 to 9, with 2 by default, and applies to every team so the comparison stays symmetric. With 9 teams and 9 dice each, phones shrink the cubes and switch to a three-column grid so everything stays readable." }
- { "q": "Step 3: press the centre PK button", "a": "With two teams the button sits between red and blue; with more teams it moves to a centred row above the arena. Each team's dice tumble on a staggered timeline and the button is disabled meanwhile. Browsers require a click before audio can start, so silence on the first roll is expected." }
- { "q": "Step 4: read the result or go fullscreen", "a": "When the dice settle, the banner names the winner or the tie and every total updates; one team gets a solo roll with no winner marker. Fullscreen opens a presentation stage; where element-level fullscreen is unavailable, such as iPhone Safari, a fixed overlay fills the viewport and Esc or the exit button returns you to the page." }
Frequently asked questions
Does the face the animation stops on decide the result?
No. Every face is drawn with the cryptographic source at click time, and the animation only turns that face towards you. After landing, the final angles are read back and corrected if needed. Turning sound off, enabling reduced motion or falling back to flat pip cards never changes a face or a total.
Why isn't a shared total assigned to one side?
The rule is sum first, compare second, so equal totals are a tie. This tool never quietly rerolls for you; press PK again if you want a decisive round. With more than two teams, every team sharing the highest total is marked as joint first.
Can I set a single team?
Yes, the supported range really is 1 to 9. With one team there is no opponent, the banner shows a solo practice roll and the total, no winner badge is drawn, and the two-team tie probability reads zero.
Why is the browser address bar still visible on my phone?
Browsers such as iPhone Safari do not allow a page to take a single element into system fullscreen. Dice PK falls back to a fixed overlay that fills the viewport but keeps the browser chrome. The overlay has its own exit button, Esc and the browser back action both close it, and focus returns to the button you pressed.
Is the previous round still there after a refresh?
Team and dice counts, the sound settings and the last 10 rounds are stored in this browser; the round in progress is not restored, so just roll again. Dice PK uses its own storage keys and never reads or rewrites data belonging to other tools on this site.
What is it
Treating a convincing tumble as proof of fairness is a common mistake. Animation is presentation only; fairness comes from the sampling distribution. The 32-bit integers returned by crypto.getRandomValues have 4294967296 possible values, which 6 does not divide, so a plain remainder makes faces 1 to 4 very slightly more likely than 5 and 6. Rejecting the last four out-of-range values makes every face exactly one sixth. This tool draws all faces first, then solves backwards for the angles that bring each cube's drawn face to the front; after the tumble it reads the face back from the final angles as a check. More dice pull the total towards 3.5 times the count: one die is uniform from 1 to 6, two dice have six ways to make 7, and nine dice range from 9 to 54 with modes at 31 and 32. When two teams compare totals, more dice actually make ties less likely; that probability comes from the same exact convolution table rather than a simulation. Sound is unrelated to the result: it is a band-passed noise pulse, browsers only allow it after a click, and muting or setting volume to zero changes nothing about the faces. Drawing, rendering and synthesis all happen on your device.
Related keywords
Feedback
Found a problem with a tool or have a suggestion? Email us — we read every message.
