Random Number Between 1 and 4

Generate a random whole number from 1 to 4, for a four-sided die (d4) in tabletop games.

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

Odds for numbers between 1 and 4

Possible numbers4
Chance of any one number1 in 4 (25.0%)
Average result over many picks2.5
Even / odd numbers2 even, 2 odd

The d4 at the table and beyond

In Dungeons & Dragons fifth edition, a d4 rolls damage for small weapons such as the dagger. Each dart of the magic missile spell deals 1d4 + 1 force damage. Outside games, 1 to 4 picks one of four people or teams. It also picks one answer from A to D on a multiple-choice question.

Four is also the number of compass points (north, east, south, west), seasons and card suits, so a 1 to 4 pick chooses any of them once you've numbered them. Two 1–4 picks give 16 equally likely pairs, enough to choose one square on a 4 × 4 grid.

Matching faces on several d4

Dice rolledChance of a repeat (repeats allowed)Different sets (no repeats)
225.0%6
362.5%4
490.6%1

Roll 3 d4 and two of them probably match (62.5%). Collecting every face from 1 to 4 is slower: it takes 8.3 rolls on average.

Totals of two numbers from 1 to 4

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

TotalWays to make itChance
216.3%
3212.5%
4318.8%
5425.0%
6318.8%
7212.5%
816.3%

Rolling several d4

To roll more than one d4, 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 2.5, which helps when you want a quick estimate instead of a roll.

DiceLowest totalHighest totalAverage total
1d4142.5
2d4285
3d43127.5
4d441610
6d462415
8d483220

Guessing on a four-option quiz

Picking a random letter from A to D gets 1 in 4 questions right on average. That's 2.5 out of 10. Doing better by luck alone gets unlikely fast:

Score on 10 questionsChance by random guessing
Exactly 05.6%
3 or more47.4%
5 or more7.8%
7 or more0.35%
10 or more1 in 1,048,576

So random answers make a fair way to fill a sample answer key, but a poor way to pass a test. Building a real key? Random letters won't come out even. In a 20-question key, each letter appears 5 times on average, and one letter showing up 8 or more times happens 10.2% of the time for any given letter. Check the count before you print.

Waiting for a 4

Chance of having seen itRolls needed
50%3
90%9
99%17

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

Does the d4 look fair? Tally a batch

Ask for 1,000 rolls with repeats allowed and count each face. Every face should land about 250 times. Anything from 223 to 277 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 d4

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

DiceAverage highestAverage lowest
2d43.131.88
3d43.441.56
5d43.731.27
10d43.941.06

Magic missile and other d4 rolls

Magic missile fires three darts at 1st level and one more for each spell slot level above that, each dealing 1d4 + 1. Because every dart always hits, the damage range is easy to plan around:

Slot levelDartsLowestHighestAverage
1361510.5
2482014
35102517.5

Two d4 and one d8 share a top score of 8, but 2d4 averages 5 against 4.5 for the d8, can't roll a 1, and lands on 4, 5 or 6 62.5% of the time.

How the number is picked

Your browser's Web Crypto API supplies a 32-bit random value (4,294,967,296 possibilities). Since 4 is a power of two, it divides that total exactly: 1,073,741,824 values map to each number and none are wasted.

Frequently asked questions

What is the average of 1d4 + 1?

3.5, from a low of 2 to a high of 5. That's the damage of one magic missile dart, so the spell's three darts at 1st level average 10.5.

What are the odds of a 4 on two d4?

At least one 4 turns up 7 times in 16 (43.8%). Both dice show 4 only 1 time in 16 (6.3%).