General Productivity, Dates & MathUpdated: September 2026

Polyhedral Dice Roller (D6, D20) & Coin Flipper | Cryptographic Random

Cryptographically fair polyhedral dice roller (D4, D6, D8, D10, D12, D20, D100) and 3D coin flipper with zero modulo bias via crypto.getRandomValues().

Research: LocalTooldeck Financial & Engineering Team
Audit: Verified for Mathematical Accuracy
Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)

100% Hardware CSPRNG Randomness

Entropy is gathered directly from hardware operating system entropy pools via crypto.getRandomValues() with strict rejection sampling. Zero rolls or game statistics leave your device.

Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)
Dice Quantity: 1
Flat Modifier (+/-): +0
Total Roll Result
18
Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

CSPRNG Randomness & Elimination of Modulo Bias

In computer science and statistical modeling, generating fair random numbers across non-power-of-two ranges (such as a 6-sided or 20-sided die) introduces a well-documented vulnerability known as modulo bias. When a raw pseudo-random 32-bit unsigned integer (0 to 232 - 1 = 4,294,967,295) is naively reduced via the modulo operator (X mod N), certain face outcomes occur with slightly higher frequency because 232 is not evenly divisible by N.

To achieve uncompromising cryptographic fairness, this simulator implements rejection sampling:

limit = 2^32 - (2^32 mod sides)

Any random integer generated by crypto.getRandomValues() that equals or exceeds this threshold is rejected and re-sampled. This guarantees uniform probability down to the exact mathematical limit.

Tabletop RPG Dice Symbology & Probability Profiles

Die TypePolyhedron GeometryDiscrete Uniform ProbabilityPrimary TTRPG Mechanic (e.g. D&D 5e)
D4Regular Tetrahedron (4 faces)25.00% per faceDagger damage, Magic Missile, Healing Word
D6Regular Hexahedron / Cube (6 faces)16.67% per faceShortsword damage, Fireball damage, Rogue Sneak Attack
D8Regular Octahedron (8 faces)12.50% per faceLongsword damage, Cure Wounds, Cleric hit dice
D10Pentagonal Trapezohedron (10 faces)10.00% per faceHeavy crossbow, Halberd, Fighter hit dice
D12Regular Dodecahedron (12 faces)8.33% per faceGreataxe damage, Barbarian hit dice
D20Regular Icosahedron (20 faces)5.00% per faceCore D20 System: Attack rolls, ability checks, saving throws
D100Zocchihedron / 2d10 Percentile1.00% per integerWild Magic Surge table, Divine Intervention, Call of Cthulhu

Bernoulli Trials & The Law of Large Numbers

The flip of an unbiased coin is the archetypal Bernoulli trial: an experiment with exactly two mutually exclusive outcomes (Success p = 0.5, Failure q = 1 - p = 0.5). While short runs frequently exhibit localized clustering (e.g. four heads in five flips), the Strong Law of Large Numbers proves that as the sample size n → ∞, the sample mean X̄n converges almost surely to the expected value μ = 0.5.

Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

Frequently Asked Questions (US Standards)

How does this tool eliminate modulo bias in random number generation?
Standard implementations that use Math.floor(Math.random() * sides) or crypto.getRandomValues() % sides suffer from "modulo bias" when the range of the random integer generator is not an exact multiple of the desired sides. Our algorithm uses rejection sampling: it discards random integers that fall into the incomplete trailing remainder of the 32-bit unsigned integer range (4,294,967,296), guaranteeing mathematically pure, uniform probability distribution for every die face.
What polyhedral dice types are supported for tabletop RPGs?
The roller supports all seven standard polyhedral dice utilized in tabletop roleplaying games such as Dungeons & Dragons (D&D 5e), Pathfinder, and Call of Cthulhu: D4 (tetrahedral), D6 (cubic), D8 (octahedral), D10 (pentagonal trapezohedral), D12 (dodecahedral), D20 (icosahedral), and D100 (percentile).
How does the multi-coin batch simulation demonstrate the Law of Large Numbers?
A fair coin flip represents an idealized Bernoulli trial with a theoretical probability p = 0.5 for heads and p = 0.5 for tails. In small sample sets (e.g. 5 flips), variance and clustering are common. However, when flipping 100 coins in a batch, the Law of Large Numbers dictates that the empirical ratio of heads and tails will converge closely toward the expected 50.00% equilibrium.
Are roll or flip results transmitted over the network?
No. All entropy gathering, rejection sampling algorithms, and 3D CSS tumble animations execute 100% locally on your device within the browser JavaScript engine.
Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 320×100 Mobile Anchor