Random Number and Password Generator

Generate cryptographically strong random integers in a range, unique lottery-style picks, or secure passwords with configurable length and character classes.

Free & Instant•Version: v1.0•Formula, examples and assumptions• Frequently searched

Calculator InputsFormula v1.0

-1,000,00011,000,000
-1,000,000491,000,000
16numbers200
416characters128
Calculated Output

Uniform integer in [min, max] = min + floor(U × (max − min + 1)), where U is drawn from a cryptographically secure uniform source; entropy = L × log₂(alphabet size)

Generated numbers

41, 6, 33, 43, 26, 7
Range1 to 49 (inclusive)
Count drawn6
Repeats allowedNo
Sorted order6, 7, 26, 33, 41, 43
Mean of the draw26.000
Probability of any single value2.0408%

• Each draw is independent of previous draws and of previous visits to this page.

Instant Browser CalculationNo Server Logging

Formula and method

Uniform integer in [min, max] = min + floor(U × (max − min + 1)), where U is drawn from a cryptographically secure uniform source; entropy = L × log₂(alphabet size)

Cryptographic randomness means each draw is independent and cannot be predicted from earlier outputs. Entropy estimates assume truly random selection: a memorable pattern typed by a human has far less entropy than a generated string of the same length.

Variables

min / max
Inclusive bounds of the integer range
count
How many numbers to draw
unique
Whether repeats are allowed
L
Password length in characters
Alphabet size
Total characters available: 10 digits, 26 lowercase, 26 uppercase, 32 symbols

Worked example

Ten unique numbers between 1 and 49 produce a lottery-style draw such as 4, 7, 12, 19, 23, 28, 33, 37, 41, 48. A 16-character password using all four character classes has about 104 bits of entropy.

Who this calculator is for

Teachers making quizzes, raffle and lottery organizers, developers needing test data, and anyone creating a strong password.

Complete guide to the random number and password generator

Every figure below comes from this calculator itself. The method is Uniform integer in [min, max] = min + floor(U × (max − min + 1)), where U is drawn from a cryptographically secure uniform source; entropy = L × log₂(alphabet size), applied to the tool's default inputs and then stress-tested one input at a time.

What the Random Number and Password Generator works out

Random Number and Password Generator answers one specific question: Generate cryptographically strong random integers in a range, unique lottery-style picks, or secure passwords with configurable length and character classes. It is written for teachers making quizzes, raffle and lottery organizers, developers needing test data, and anyone creating a strong password.

The method is Uniform integer in [min, max] = min + floor(U × (max − min + 1)), where U is drawn from a cryptographically secure uniform source; entropy = L × log₂(alphabet size). The inputs are What do you want to generate?, Minimum value (inclusive), Maximum value (inclusive), How many numbers (numbers), Repeats, Password length (characters), Include lowercase letters, Include uppercase letters, Include digits, Include symbols, Avoid look-alike characters (0/O, 1/l/I). With the default values - What do you want to generate? = numbers, Minimum value (inclusive) = 1, Maximum value (inclusive) = 49, How many numbers = 6 numbers, Repeats = no, Password length = 16 characters, Include lowercase letters = yes, Include uppercase letters = yes, Include digits = yes, Include symbols = yes, Avoid look-alike characters (0/O, 1/l/I) = yes - the result is Generated numbers: 17, 42, 13, 9, 2, 41. Raising Minimum value (inclusive) from 1 to 1.10 moves the headline result from 17, 42, 13, 9, 2, 41 to 1, 6, 20, 48, 29, 4.

What each figure in the breakdown means

Alongside 17, 42, 13, 9, 2, 41 this method reports 6 supporting quantities: Range: 1 to 49 (inclusive); Count drawn: 6; Repeats allowed: No; Sorted order: 2, 9, 13, 17, 41, 42. The supporting figures show whether the result came from the rate, the period or the size of the inputs.

The worked example is: Ten unique numbers between 1 and 49 produce a lottery-style draw such as 4, 7, 12, 19, 23, 28, 33, 37, 41, 48. A 16-character password using all four character classes has about 104 bits of entropy. Use it to confirm the direction of the calculation before entering your own figures, and keep intermediate values unrounded until the final step.

How to interpret the answer

Cryptographic randomness means each draw is independent and cannot be predicted from earlier outputs. Entropy estimates assume truly random selection: a memorable pattern typed by a human has far less entropy than a generated string of the same length.

Applying that reading here: 17, 42, 13, 9, 2, 41 alongside range of 1 to 49 (inclusive) describes one specific scenario, not a range of possibilities. Adjust the quantity that is genuinely uncertain in your case, then read both figures again.

Common mistakes to avoid

Reusing a generated password across sites, which defeats its strength. Assuming a short password is safe because it contains a symbol: length drives entropy far more than character variety. Treating a random draw as a strategy for lotteries, where every combination has the same probability.

Before you act on the result, re-read What do you want to generate?, Minimum value (inclusive), Maximum value (inclusive), How many numbers (numbers), Repeats, Password length (characters), Include lowercase letters, Include uppercase letters, Include digits, Include symbols, Avoid look-alike characters (0/O, 1/l/I) and confirm each entry matches its label, including whether a quantity is entered in the unit the label names. Change Minimum value (inclusive) deliberately and check that the result moves the way the formula predicts - here 17, 42, 13, 9, 2, 41 should shift smoothly rather than jump.

Limitations and responsible use

Uses the browser or Node.js cryptographic random source; it does not provide a hardware entropy guarantee. Generated passwords are only as safe as the place you store them. Use a password manager.

Read the figures above as conditional on those limits rather than as a guarantee. CalculatorFlash shows the formula, the substitution and the units so the arithmetic can be checked by hand, but it cannot verify that the inputs describe your real circumstances. For a consequential decision, verify the operative figures against a primary source before relying on the answer.

Frequently asked questions

Are the numbers truly random?

They are drawn from a cryptographically secure pseudo-random generator seeded by the operating system, which is the standard for security-sensitive use.

How long should a password be?

At least 12–16 characters for most accounts. With all four character classes, 16 characters gives roughly 104 bits of entropy, well beyond brute-force reach.

What is entropy in bits?

Entropy = length × log₂(alphabet size). It measures how many guesses an attacker needs on average; every extra bit doubles the work.

Related searches for this calculator

People also look for random number generator, random password generator, number picker, lottery number generator and strong password generator. Everything on this page is calculated in your browser from the formula shown above.

Related Mathematics Calculators

Explore another calculator in this subject.