User guide All lessons Cookbook Function reference Open playground

Dice notation step by step

At the table

Tabletop games write rolls as XdY (X dice, Y sides), sometimes with a bonus or drop lowest. This lesson walks from the smallest form to 4d6dl1 ability scores.

Try it

In the playground, open this lesson in the playground and click Run (or press Shift+Enter). Output lists five distributions in order—one per stage below.

Stage 1: one die (1d4)

output("one_d4", 1d4)

one_d4 · DieRoll · mean 2.500

outcome%fracX/36
125.01/49
225.01/49
325.01/49
425.01/49

two_d6 · DieRoll · mean 7.000

outcome%fracX/36
22.781/361
35.561/182
48.331/123
511.11/94
613.95/365
716.71/66
813.95/365
911.11/94
108.331/123
115.561/182
122.781/361

two_d6_plus_3 · DieRoll · mean 10.000

outcome%fracX/36
52.781/361
65.561/182
78.331/123
811.11/94
913.95/365
1016.71/66
1113.95/365
1211.11/94
138.331/123
145.561/182
152.781/361

four_d6 · DieRoll · mean 14.000

outcome%fracX/36
40.081/12950
50.311/3240
60.775/6480
71.545/3241
82.7034/12591
94.327/1622
106.175/812
118.0213/1623
129.65106/10993
1310.835/3244
1411.373/6484
1510.835/3244
169.65106/10993
178.0213/1623
186.175/812
194.327/1622
202.7034/12591
211.545/3241
220.775/6480
230.311/3240
240.081/12950

four_d6dl1 · DieRoll · mean 12.245

outcome%fracX/36
30.081/12950
40.311/3240
50.775/6480
61.627/4321
72.9319/6481
84.7831/6482
97.0262/8833
109.4161/6483
1111.437/3244
1212.9167/12965
1313.343/3245
1412.310/814
1510.1103/10194
167.2547/6483
174.171/242
181.627/4321

four_d6dh1 · DieRoll · mean 8.755

outcome%fracX/36
31.627/4321
44.171/242
57.2547/6483
610.1103/10194
712.310/814
813.343/3245
912.9167/12965
1011.437/3244
119.4161/6483
127.0262/8833
134.7831/6482
142.9319/6481
151.627/4321
160.775/6480
170.311/3240
180.081/12950

four_d6kh2 · DieRoll · mean 9.344

outcome%fracX/36
20.081/12950
30.311/3240
41.165/4320
52.472/811
65.0249/9772
78.331/123
813.219/1445
917.314/816
1020.129/1447
1118.861/3247
1213.219/1445

three_d12kl1 · DieRoll · mean 3.521

outcome%fracX/36
123.0190/8278
219.2263/13737
315.793/5936
412.6163/12985
59.78129/13194
67.3594/12793
75.2789/16902
83.5355/15581
92.1427/12611
101.1017/15460
110.415/12340
120.061/17260

Mean7.

Stage 3: flat bonus (2d6 + 3)

output("two_d6_plus_3", 2d6 + 3)

Mean14 (four times the mean of one d6).

Stage 5: drop lowest (4d6dl1)

output("four_d6dl1", 4d6dl1)

Mean8.76.

Stage 7: keep highest N (4d6kh2)

output("four_d6kh2", 4d6kh2)

Mean3.52 (average of the minimum of three d12).

Suffix cheat sheet

SuffixMeaningFunction
dlNDrop lowest N, sum the restdrop_lowest
dhNDrop highest N, sum the restdrop_highest
khNKeep highest N, sum thosekeep_highest
klNKeep lowest N, sum thosekeep_lowest

Reading the result

Eight named outputs in the sample script, each with mean and a probability table (or truncated table for large supports).

Try this