How it works
This tool uses JavaScript's Math.random() to generate pseudorandom values in your browser. These values are suitable for casual use, but are not cryptographically secure and should not be used for passwords, security tokens, or official drawings.
Configuration Steps
- Define the Bounds: Enter your absolute Minimum (Min) and Maximum (Max) values. These parameters fully support negative integers.
- Set the Volume: Specify the "Count" to determine how many numbers you want to generate in a single batch.
- Choose Number Format: Select "Integer" for whole numbers or "Decimal" for floating-point outputs. For decimals, choose how many places to display (0 to 20); this is a rounding setting, not a guarantee of that many accurate digits.
- Apply Restraints: Toggle "Allow Duplicates" or restrict the engine to "Unique Values Only." (Note: Requesting more unique values than your defined range mathematically allows will safely abort the generation to prevent infinite loops).
- Format & Sort: Pick how you want your batch outputted (Comma, Space, or Newline) and whether the final array should be automatically sorted into ascending or descending order.
The Mathematics Behind the Generation
For standard integer generation, the PRNG produces a base floating-point value, let's call it Rbase, where 0≤Rbase<1. To scale this uniformly across your target boundaries [min,max], the algorithm applies the following continuous distribution transformation:
Rfinal=⌊Rbase×(max−min+1)⌋+min
When unique integers are requested from a relatively small range, the tool shuffles a pool of available values instead of repeatedly drawing and checking for duplicates.