Fair rolls with exact oddsReviewed 29 Sep 2026Runs in your browser

Dice Roller & Probability Calculator

Roll any dice expression such as 4d6kh3+2, see each die, and get the exact probability of every total. It supports keep and drop rules, modifiers, exploding dice and a 10,000-roll simulation.

Who wrote it

Written by Suhaib Hassan. Figures are estimates you can edit. Our methodology.

How the engine works

Rolls use the browser's secure random generator with rejection sampling. The odds are counted exactly for plain sums and for keep or drop rules on small pools.

Why we built it

Tabletop players want a quick roll and also want to know how likely a result was. This gives both together.

Dice expression

Add a die
format NdS, optional kh/kl/dh/dl, then + or − a number
Presets

kh3 keeps the highest 3 dice, kl1 keeps the lowest 1, dl1 drops the lowest 1, dh1 drops the highest 1. Up to 100 dice with up to 1,000 sides.

Total—
—

—

Expected value—
Range—
P(exactly this)—
P(this or higher)—
Probability of each total—
——
Std deviation—spread of the total
Percentile rank—share of rolls below this

Common dice compared

Exact figures for the expressions used most in tabletop games. The last column is the chance of rolling the highest possible total.

RollMinMaxMeanStd devVarianceP(max)
1d4142.5001.1181.25025.000%
1d6163.5001.7082.91716.667%
1d8184.5002.2915.25012.500%
1d101105.5002.8728.25010.000%
1d121126.5003.45211.9178.333%
1d2012010.5005.76633.2505.000%
2d62127.0002.4155.8332.778%
3d631810.5002.9588.7500.463%
4d6 keep highest 331812.2452.8478.1051.620%
2d20 keep highest 112013.8254.71122.1949.750%

Formulas

How the numbers are worked out.

Mean and variance

For one die with s sides, then added up for n dice.

mean = n × (s + 1) ÷ 2
variance = n × (s² − 1) ÷ 12

Exact probability of a total

Counted by combining the dice one at a time. With keep or drop rules, every combination is counted when there are few, otherwise the chart is simulated.

P(total = k) = ways to make k ÷ sn

Fair random rolls

Rolls use the browser's secure random generator. Values that would bias the result are discarded and redrawn.

roll = (random mod s) + 1, redraw if in the biased tail

Worked examples

Illustrative figures, each checked by hand. The first is the default setup.

Ability score

4d6, drop the lowest (4d6kh3), plus 2 (the default).

mean of 4d6kh3 = 12.24, so with +2 the mean is 14.24
range 3 to 18 before the modifier, 5 to 20 after

Advantage

Roll two d20 and keep the higher.

mean of 2d20kh1 = 13.825 against 10.50 for one d20
P(20) = 1 − (19/20)² = 9.75%

Fireball

8d6.

mean = 8 × 3.5 = 28
std dev = √(8 × 35 ÷ 12) = 4.83

How to use the dice roller

  • Type an expression such as 2d6+3, or tap dice and presets to build one.
  • Roll the dice. Dropped dice are shown struck through.
  • Read the expected value, chance of this result, and the probability chart.
  • Run 10,000 rolls to compare the simulation with the exact odds.

Rolls are random. Past results do not change future odds.

By Suhaib Hassan · Reviewed 29 September 2026 · How CalculatePilot verifies formulas →

Sources

  • Feller, W., An Introduction to Probability Theory and Its Applications, vol. 1, ch. 1 and 6.
  • MDN Web Docs, Crypto.getRandomValues().
  • NIST, SP 800-90A, Recommendation for Random Number Generation.

Frequently asked questions

What does 4d6kh3 mean?

Roll four six-sided dice and keep the highest three. It is a common way to generate character ability scores, giving an average of about 12.24.

What is advantage and disadvantage?

Advantage is rolling two d20 and keeping the higher (2d20kh1). Disadvantage keeps the lower (2d20kl1).

Are the rolls truly random?

They come from the browser's cryptographic random source, which is suitable for games. Values that would cause modulo bias are discarded.

What are exploding dice?

When a die shows its highest number you roll it again and add the result, repeating while it keeps showing the maximum.

Why do sums cluster in the middle?

There are more ways to make middle totals. With 2d6, seven can be made six ways while two can be made only one way.

Related calculators

More everyday tools.

All Everyday Calculators

Embed This Dice Roller

Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

<iframe src="https://www.calculatepilot.com/embed/dice-roller.html" width="100%" height="560" loading="lazy" title="Dice Roller"></iframe>
For website owners

Want this calculator on your own website?

Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

  • All 159 calculators, unlimited embeds
  • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
  • Runs in your visitor's browser, so nothing is sent to a server
  • License key emailed automatically after checkout, cancel anytime
$7.99 / month
or $89.99 / year · white-label Pro
Get the white-label license Embed free with attribution