اردوहिन्दी

Random Number Generator

Pick random numbers in any range, roll dice or flip a coin. Nothing leaves your browser.

Random numbers

The highest number can be picked too.

1 to 1,000.

Your random number

18

Between 1 to 100, picked by the browser.

Possible values in the range
100

Every value from 1 to 100 had the same chance each time, so repeats are possible.

Dice roller and coin flip

A normal die has 6. Games also use 4, 8, 10, 12 and 20.

Your rolls

4, 4

2 d6, each side equally likely.

Total
8
Lowest possible total
2
Highest possible total
12
Average total over many rolls
7
4, 4
Total: 8

Each die is rolled on its own with a fair random draw.

Add this calculator to your website

Free to use on any site or blog. Paste this code where you want the calculator to appear. It stays up to date, needs no account, and keeps your visitors' numbers in their own browser.

Preview

How it works

Choose the lowest and highest number, how many you want, and whether repeats are allowed. The tool picks each number from the range so that every value has exactly the same chance. Press Generate again for a new draw.

In your browser the numbers come from crypto.getRandomValues, the same operating system source that web pages use for security tokens. To avoid a subtle bias, the tool draws just enough random bits for the size of your range and throws away any draw that falls outside it (rejection sampling). The common shortcut of taking a remainder (modulo) makes some values slightly more likely than others, and this tool does not use it.

With "every number different" the tool shuffles the range and takes the first numbers, so a value can never appear twice. For decimals it picks a whole step on a grid of your chosen decimal places and divides, so 0.01 steps are equally likely too.

The second panel rolls up to 100 dice with 2 to 1,000 sides and flips a fair coin up to 1,000 times. Each die and each flip is an independent draw from the same source.

Check it by hand: the range 1 to 100 holds 100 − 1 + 1 = 100 values, so each has a 1 in 100 chance. Covering 100 values takes 7 random bits, because 2^6 = 64 is too few and 2^7 = 128 is enough. Of the 128 possible 7-bit draws, 28 fall outside the range and are thrown away, so 100 ÷ 128 = 78.1% of draws are used, and every value stays equally likely. For five numbers with repeats allowed, the chance that all are different is 100 × 99 × 98 × 97 × 96 ÷ 100^5 = 90.3%.

Whole number: pick r uniformly from 0 to N-1, answer = lowest + r, where N = highest - lowest + 1
Decimal: scale = 10^places, pick a whole number between lowest × scale and highest × scale, then divide by scale
Two dice, total of 7: 6 of 36 combinations = 16.7%

Worked example

Range 1 to 100 holds N = 100 values, so each one has a 1 in 100 chance (1%) on every draw. Ask for 5 numbers with repeats allowed and the chance that all five are different is 100 × 99 × 98 × 97 × 96 ÷ 100^5 = 90.3%, so about one draw in ten contains a repeat.

Two six-sided dice have 36 equally likely outcomes. A total of 7 can be made 6 ways, so it comes up 16.7% of the time, and a total of 2 or 12 only 2.8% each.

Good to know

  • Browser randomness comes from your operating system and is suitable for games, raffles among friends, classroom picks and sampling. It is not a certified generator.
  • Do not use it for lotteries or draws that have legal rules, where an audited or witnessed process is required. Do not use it to create passwords or cryptographic keys: use a password manager or the key tool of your software, which also handles storage and formatting.
  • A pseudo-random generator (like Math.random in many programs) follows a formula from a starting value and can repeat if you know the seed. A cryptographic generator is built so the next value cannot be predicted. Neither is "true" physical randomness such as radioactive decay, though for everyday picks you cannot tell the difference.
  • Random does not mean evenly spread. Short runs of the same number, or of numbers close together, are normal and do not mean the tool is broken.
  • Decimals are limited to 10 places and numbers below 1,000,000,000,000,000. Results are not saved or sent anywhere.

Questions people ask

How do I pick a random number between 1 and 100?

Leave the lowest at 1 and the highest at 100 and read the number shown. Press Generate again for a new one. Both 1 and 100 can be picked.

Is this random number generator truly random?

It uses your browser's cryptographic random source, which is unpredictable and unbiased for practical purposes. It is not a physical source of randomness, and it is not certified for legal draws.

How do I get random numbers with no repeats?

Set "Repeats" to "Every number different". The number you ask for cannot be larger than the size of the range, so 10 different numbers need a range of at least 10 values.

What is the difference between pseudo-random and cryptographic randomness?

Pseudo-random numbers come from a formula and a starting seed, so the same seed gives the same sequence. Cryptographic generators are seeded from unpredictable system events and designed so that past values do not reveal future ones.

Can I use this for a lottery or to make a password?

No to both. A lottery with legal rules needs an audited process, and passwords and keys should come from a password manager or your security software.

Is the coin flip really 50/50?

Yes, each flip is one fair random bit. Flipping 10 times does not guarantee 5 heads. The share of heads only gets close to 50% over many flips.

What are the odds of rolling a 7 with two dice?

Two six-sided dice have 6 × 6 = 36 outcomes and 6 of them total 7 (1+6, 2+5, 3+4, 4+3, 5+2, 6+1), so the chance is 6 ÷ 36 = 16.7%.

What is the chance of flipping 10 heads in a row?

Each flip is 1 in 2, so 10 in a row is (1 ÷ 2)^10 = 1 ÷ 1,024, which is about 0.1%.

Part of the guide: Math and study calculators: percentages, fractions, GPA and everyday sums

Formulas and text last checked on 14 October 2026. Everything is calculated in your browser, so nothing you enter is sent or stored. Spotted a mistake? Tell us and we will fix it.