Draw one random integer, or many integers or decimals, uniformly between two inclusive limits. Optional unique draws and sorting. Generated on this device with a pseudo-random generator — not for cryptography.
Formula
A uniform integer on the closed interval [L, U] is
N = L + floor(random() × (U − L + 1))
random() is in [0, 1). Decimals use the same rule on a scaled integer grid
with P digits after the decimal (multiply limits by 10^P, draw, then format
back). Unique mode samples without replacement from that grid.
This is a pseudo-random generator (Math.random in your browser), not a
cryptographic source. Do not use it for passwords, keys, or anything that
must be unpredictable to an attacker.
Simple vs comprehensive
| Mode | What it draws |
|---|---|
| Simple | One integer in [lower, upper], default 1–100 |
| Comprehensive | N integers or decimals; duplicates yes/no; sort none / asc / desc; decimal precision up to 999 digits |
Examples
One integer from 1 to 100
Simple mode, lower 1, upper 100. The result is a whole number, and both endpoints are possible.
Decimals at 50 places
Comprehensive mode, lower 0.2, upper 112.5, type Decimal, precision 50, generate 1. The value has fifty digits after the decimal and lies on that grid between 0.2 and 112.5.
Unique integers, sorted
Comprehensive mode, 1 to 5, generate 5, duplication No, sort Ascend. The only possible list is 1, 2, 3, 4, 5 — a full unique draw from a five-value pool, then sorted.