EasyUnitConverter.com

Random Number Generator

Generate random integers, even numbers, or odd numbers within any range. Supports up to 1,000 numbers with sorting, copy, and history. See also Percentage Calculator and Combinations Calculator.

Quick:

Range: 100 possible values

How to Generate Random Numbers

Set your minimum and maximum values to define the range, choose how many numbers to generate (up to 1,000), and select your options. You can generate all integers, only even numbers, or only odd numbers. Enable "Unique only" to prevent duplicates, and choose a sort order if needed. Use the quick preset buttons for common scenarios like dice rolls, coin flips, lottery picks, or PIN codes. Click Generate to produce your random numbers instantly. Every generation is saved in the history panel so you can reference previous results.

Random Number Formula

Random integer in [min, max]:

result = floor(random() × (max − min + 1)) + min

For unique numbers: Fisher-Yates shuffle on pool, take first N

For even only: filter pool where n % 2 === 0

For odd only: filter pool where n % 2 !== 0

Common Use Cases

Lottery Numbers

Generate 6 unique numbers from 1-49 for lottery quick picks

Dice Simulation

Roll one or multiple dice (1-6) for board games

PIN Codes

Generate random 4-digit PIN codes (0-9, 4 numbers)

Raffle Drawing

Pick random winners from numbered tickets

Statistical Sampling

Generate random sample indices for research

Password Seeds

Create random number sequences for password generation

Example

Generate 6 unique numbers between 1 and 49 (lottery)

Range: 1 to 49 (49 possible values)

Count: 6, Unique: Yes, Sort: Ascending

Possible result: 3, 12, 23, 31, 38, 47

Frequently Asked Questions

Are these truly random numbers?

This generator uses pseudorandom numbers from your browser's Math.random() function, which is suitable for games, simulations, raffles, and general use. For cryptographic purposes (passwords, encryption keys), use a cryptographically secure random number generator (CSPRNG).

Can I generate negative numbers?

Yes. Set the minimum to a negative value. For example, min = -50 and max = 50 will generate numbers in that range, including negative values and zero.

What is the Fisher-Yates shuffle?

The Fisher-Yates (Knuth) shuffle is an algorithm that produces an unbiased random permutation of a sequence. It iterates through the array and swaps each element with a randomly chosen element from the remaining unshuffled portion. This ensures every permutation is equally likely.

How many numbers can I generate at once?

You can generate up to 1,000 numbers at once. For unique numbers, the count cannot exceed the number of available values in your range (after filtering for even/odd if selected).

What is the difference between even and odd number generation?

When you select "Even," only numbers divisible by 2 are included in the pool (e.g., 2, 4, 6...). When you select "Odd," only numbers not divisible by 2 are included (e.g., 1, 3, 5...). "All" includes every integer in the range.

Related Calculators: