Random Number Between 1 and 12

Generate a random whole number from 1 to 12, for a twelve-sided die (d12) or picking a month.

Press Generate for a random number between 1 and 12, ends included.

Odds for numbers between 1 and 12

Possible numbers12
Chance of any one number1 in 12 (8.3%)
Average result over many picks6.5
Even / odd numbers6 even, 6 odd

The d12 at the table and beyond

In Dungeons & Dragons fifth edition, the d12 rolls damage for the greataxe and is the barbarian's hit die. Away from the table, 1 to 12 maps onto the months of the year (1 is January, 12 is December) or the hours on a clock face.

A d12 and two six-sided dice both top out at 12, but they behave very differently. The d12 gives every number from 1 to 12 the same 8.33% chance. Two d6 can't roll a 1 at all, and their totals pile up in the middle: 7 comes up 6 times in 36, while 12 comes up once.

Matching faces on several d12

Dice rolledChance of a repeat (repeats allowed)Different sets (no repeats)
28.3%66
323.6%220
561.8%792
1099.61%66
12over 99.99%1

Roll 5 d12 and two of them probably match (61.8%). Collecting every face from 1 to 12 is slower: it takes 37.2 rolls on average.

Totals of two numbers from 1 to 12

Generate two numbers with repeats allowed and add them, as you would with a pair of dice. There are 144 equally likely pairs, but the totals aren't equally likely: the middle total, 13, can be made 12 ways, while 2 and 24 can each be made only one way.

So a total of 13 comes up 8.3% of the time, a total of 24 only 0.69%, and doubles (both numbers the same) 8.3%.

Rolling several d12

To roll more than one d12, set How many numbers to the number of dice, untick No repeats and add the results. The average total is the number of dice times 6.5, which helps when you want a quick estimate instead of a roll.

DiceLowest totalHighest totalAverage total
1d121126.5
2d1222413
3d1233619.5
4d1244826
6d1267239
8d1289652

Picking a random month

Each month gets a 1 in 12 chance (8.33%), even though months differ in length. February holds only 28 of the 365 days in a common year (7.67%), while a 31-day month holds 8.49%. So if you pick a month and then a day in it, a February date is more likely than a January one: 1 in 336 against 1 in 372.

To give every date the same chance, pick a number from 1 to 365 (1 to 366 in a leap year) on the random number generator and count forward from January 1.

Waiting for a 12

Chance of having seen itRolls needed
50%8
90%27
99%53

A 12 turns up once every 12 rolls on average, yet a few unlucky rollers go 53 rolls without one (under 1% of them). A dry spell doesn't make it due: after 12 misses, the average wait is still 12 more.

Does the d12 look fair? Tally a batch

Ask for 1,000 rolls with repeats allowed and count each face. Every face should land about 83.33 times. Anything from 67 to 101 is inside the normal spread for one face. A fair die still won't give you a flat line. If you're testing a physical die the same way, a face far outside that range is worth a second look.

Keeping the best (or worst) of several d12

Some rules roll several dice and keep only the highest or lowest. The averages:

DiceAverage highestAverage lowest
2d128.494.51
3d129.483.52
5d1210.472.53
10d1211.341.66

Month by month: a pick by month against a pick by day

MonthDaysChance picking a monthShare of a 365-day year
January318.33%8.49%
February288.33%7.67%
March318.33%8.49%
April308.33%8.22%
May318.33%8.49%
June308.33%8.22%
July318.33%8.49%
August318.33%8.49%
September308.33%8.22%
October318.33%8.49%
November308.33%8.22%
December318.33%8.49%

If birth months were equally likely, two people in a group of 5 would share one 61.8% of the time; real months differ by a few days, which nudges that slightly. Twelve also covers the zodiac signs and the animals of the Chinese zodiac, and a 1 to 12 hour with a 0 to 59 minute gives one of 720 times on a 12-hour clock.

How the number is picked

Your browser's Web Crypto API supplies a 32-bit random value (4,294,967,296 possibilities). Dividing by 12 leaves 4 spare values that would tilt the odds toward the lowest 4 numbers, so the generator discards them and draws again (1 time in 1,073,741,824).

Frequently asked questions

How do I pick a random month?

Number the months 1 (January) to 12 (December) and generate one number. Each month gets 8.33%, whatever its length.

Is a d12 the same as two d6?

No. A d12 gives every number from 1 to 12 an 8.33% chance. Two d6 can't total 1, and they total 7 16.7% of the time but 12 only 2.8%.