Skip to content

Random Number Generator and Dice Roller

Pick random numbers in any range, or roll any number of dice.

Result

—

Total
—
Possible values
—

Good to know. Each roll is independent. Six sixes in a row don’t make a seventh any less likely.

How it works

In plain words

Each number is drawn with equal probability from the range, using a seeded pseudo-random generator. The seed is in the share link, so anyone who opens it sees the same result.

The formula

n = min + floor(random() × (max − min + 1))
random() is uniform on [0, 1)

Worked example

Rolling two six-sided dice with the seed "example" gives 3, 1 for a total of 4. Press "Roll again" for a fresh roll.

Sources

No outside data or rates: this is plain arithmetic.

8 automated tests check its answers on every change.

About the random number generator and dice roller

Need to pick a winner, choose who goes first, draw lottery-style numbers, or roll dice without the dice? This generator picks numbers in any range you like, with or without repeats, or rolls any number of dice with any number of sides.

Every value in the range has the same chance of coming up. For picking several numbers "without repeats", each number can appear only once, like drawing raffle tickets from a hat. "With repeats" is like rolling a die several times.

The dice roller supports the usual shapes: d4, d6, d8, d10, d12 and d20 for tabletop games, and anything else up to 1,000 sides. The total is shown too.

The numbers come from a seeded pseudo-random generator. A fresh random seed is chosen every time you open the page or press "Roll again". The seed is part of the share link, so if you send someone the link, they see exactly the same roll. That makes it easy to prove a draw was fair.

This is ideal for games, classrooms and everyday decisions. It is not suitable for cryptography, security codes or regulated gambling, which need certified random number generators.

Questions people ask

Are the numbers really random?

They are pseudo-random: statistically fair and unpredictable for everyday use, but generated by an algorithm. Not suitable for security or gambling.

Can I pick numbers without repeats?

Yes. Choose "No, all different". The count can’t be larger than the number of values in the range.

Why does the share link show the same result?

The link includes the seed, so the same numbers are generated again. That lets others check the result.

How do I flip a coin?

Roll one die with 2 sides: 1 is heads, 2 is tails.

Put this calculator on your site

Paste this where you want it. It fits the width of the page, grows with the answer and follows your readers’ dark mode. Free, with no ads inside.

<a href="https://99solved.com/random-number" data-99solved>Random Number Generator and Dice Roller</a>
<script async src="https://99solved.com/embed.js"></script>