# Dice Roller

URL: https://speedycalculator.com/calculators/statistics/dice-roller/
Last updated: 2026-10-30

> The dice roller rolls up to 100 virtual dice of any type – from d3 to d120 or a custom number of sides, all alike or mixed – adds a modifier, and shows each die, the total, the average to expect and how likely your total was.

## Inputs

- Dice
- Number of dice
- Dice type
- Number of sides (custom die)
- Sides of each die
- Modifier added to the total

## Results

- Total
- Individual dice
- Average (expected) total
- Possible totals
- Chance of rolling exactly this total
- How many of each face
- Distribution of the total

## Formula

```
Each die: uniform on 1 … s · Total = Σ dice + modifier · Expected total = Σ (sᵢ + 1)/2 + modifier
```

## Explanation

A virtual dice roller is handy when the real dice are lost under the sofa, when you need many dice at once or when you want unusual shapes such as a d7, d30 or d120. This roller uses your browser's secure random number generator, so each face of each die is equally likely and no roll depends on the previous one.

Choose how many dice to throw and their type, or switch to mixed dice and list the number of sides of each – for example 6, 8, 20 for a d6, a d8 and a d20. Add a modifier for game rolls such as 3d6 + 2. The result shows every die and the total, together with the expected total and the range of possible totals.

The chart shows the exact probability of every possible total with your result highlighted, so you can see at a glance whether you rolled something ordinary or unusually lucky. With several dice of the same type the roller also counts how many times each face came up, which is useful for games that count matching dice or sixes.

### How to use the Dice Roller

- **Dice**
- **Number of dice**
- **Dice type**
- **Number of sides (custom die)**
- **Sides of each die**
- **Modifier added to the total**

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Each die is an independent uniform random integer from 1 to its number of sides, generated with crypto.getRandomValues(). The distribution of the total is calculated exactly by convolving the dice one at a time.

### Worked example

Rolling 2d6 gave 4 and 5 for a total of 9. The expected total is 2 × 3.5 = 7 and totals can run from 2 to 12. A total of 9 can be made 4 ways out of 36 – (3,6), (4,5), (5,4), (6,3) – so its chance was 11.11%. With mixed dice 6, 8 and 20 the expected total is 3.5 + 4.5 + 10.5 = 18.5.

### Dice at a glance

DieFacesAverage rollStandard deviationTypical used41–42.51.118Small weapons, healing potionsd61–63.51.708Board games, fireballs, ability scoresd81–84.52.291Longswords, cleric hit diced101–10 (or 0–9)5.52.872Percentile rolls, heavy weaponsd121–126.53.452Greataxes, barbarian hit diced201–2010.55.766Attack rolls, checks and savesd1001–10050.528.866Percentage tables, random events

## Worked example

Inputs — Dice: All dice of the same type; Number of dice: 2; Dice type: Cube – d6 (6 faces); Modifier added to the total: 0.

Results — **Total = 7**; Individual dice = 6, 1; Average (expected) total = 7; Possible totals = 2 to 12; Chance of rolling exactly this total = 16.6667 %; How many of each face = Face Count Share
────────────────────
1 1 50%
2 0 0%
3 0 0%
4 0 0%
5 0 0%
6 1 50%.

## Key terms

- **Polyhedral dice**: Dice shaped as polyhedra with 4, 6, 8, 10, 12 or 20 faces, used in role-playing games.
- **Uniform distribution**: Every outcome equally likely – the defining property of a fair die.
- **NdS notation**: N dice with S sides each, e.g. 3d6 means three six-sided dice.

## FAQ

**Is this dice roller fair?**
Yes. Each die uses the browser's cryptographically secure random generator, so every face has exactly the same chance.

**How many dice can I roll?**
Up to 100 at once, each with 2 to 1,000 sides.

**Can I roll different dice together?**
Yes – choose "Mixed dice" and list the sides, for example 4, 6, 8, 10, 12, 20 for a full polyhedral set.

**What does the modifier do?**
It adds a fixed number to the total, as in 1d20 + 5 or 2d6 − 1.

**What is the most likely total with 2d6?**
7, with a 16.67% chance. The chart shows the chance of every total.

**What dice shapes exist?**
Common ones are d4, d6, d8, d10, d12 and d20; prisms, trapezohedra and other special solids make odd and large dice such as d3, d5, d7, d14, d30, d100 and d120.


## Sources

- [Wolfram MathWorld – Dice](https://mathworld.wolfram.com/Dice.html)
- [MDN – Crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
- [OpenStax – Introductory Statistics 2e](https://openstax.org/details/books/introductory-statistics-2e)
