Beginner

Random Number Generator

Generate random whole numbers within a range you set, as many as you need.
Number of integers to generate (1–1000).

Set your range and press Generate to produce random integers.

Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Formula
n = min + ⌊random() × (max − min + 1)⌋, with integer bounds
How this is calculated

You provide three inputs: the minimum bound, the maximum bound, and how many numbers you want. The tool first rounds the bounds inward to whole numbers — the minimum is rounded up with ⌈min⌉ and the maximum rounded down with ⌊max⌋ — so every result is a valid integer that genuinely sits inside your stated range. The requested count is clamped to between 1 and 1000 to keep output manageable.

For each number it calls the browser's random() function, which returns a uniform fraction in the half-open interval [0, 1). Multiplying that fraction by the span (max − min + 1) and taking the floor produces an offset from 0 up to the span minus one; adding the minimum shifts it into your range. The "+1" makes both bounds inclusive, so every integer from min to max has an exactly equal chance.

Each draw is independent, so duplicates can occur and the distribution is uniform but not guaranteed even across a small sample. The generator is pseudo-random and not cryptographically secure. Inputs that leave no whole integer between the bounds return an error rather than a number.

About this calculator

This tool produces uniformly distributed random integers between the minimum and maximum you specify (both inclusive). Choose how many you want, press Generate, and the results appear as chips. Use it for raffles, choosing a winner, picking lottery-style numbers, sampling a dataset, or settling a friendly decision.

The numbers come from the browser's built-in pseudo-random generator, which is excellent for everyday and casual uses. Because each draw is independent, the same value can appear more than once — that is expected behaviour, not a bug. For cryptographic keys or security-sensitive applications, use a dedicated cryptographic random source instead.

Frequently asked questions

Yes. Both bounds are inclusive, so a range of 1 to 6 can return any value from 1 through 6.

Yes. Each number is drawn independently, so duplicates are possible and entirely normal.

No. It uses the browser's general-purpose generator. For keys, tokens or anything security-critical, use a cryptographic random source.

Also known as

random integer
rng
pick a number
random picker
number generator
random number
number picker
generate random number

APA

TG we-Calculate Editorial Team. (2026). Random Number Generator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/random-number-generator

Chicago

TG we-Calculate Editorial Team. "Random Number Generator." TG we-Calculate. 2026. https://we-calculate.com/calculator/random-number-generator.

IEEE

TG we-Calculate Editorial Team, "Random Number Generator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/random-number-generator

BibTeX

@misc{wecalculate_random_number_generator, title = {Random Number Generator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/random-number-generator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?