Draw five unique integers from 1–5
Input and settings
Minimum 1 / Maximum 5 / Count 5 / Unique: on
Expected result
Each of 1, 2, 3, 4 and 5 appears once; order may vary.
Generate one or more unbiased random integers with optional uniqueness.
These are example steps; replace the values for your task.
Generate integers for draws, ordering, or test data with the browser's cryptographic random source. Rejection sampling prevents modulo bias.
When duplicates are disabled, the requested count cannot exceed the number of integers in the selected range.
Compare selecting an entire range without replacement with drawing more numbers than the range contains.
Example buttons replace the inputs and settings above and calculate. Restore previous input steps back one example at a time. After trying multiple examples, repeat restore to return to your original input. This history is lost when the page closes.
Minimum 1 / Maximum 5 / Count 5 / Unique: on
Each of 1, 2, 3, 4 and 5 appears once; order may vary.
Minimum -2 / Maximum 2 / Count 8 / Unique: off
Eight integers from −2 through 2. Some values must repeat; values and order are not fixed.
Both endpoints are included. The first draw must contain the whole five-value set because it selects all candidates without replacement. The second needs repeats because eight draws use five possible values. With replacement does not mean equal counts for each value. Repeating a previous result can be valid.
Endpoints must be safe integers; the inclusive range has at most 2³² values and count is 1–1,000. Unique count cannot exceed the range. Web Crypto with rejection sampling avoids modulo bias, but the tool provides no source audit, draw certification or seed for replay. Examples perform real draws and replace the result. Restore returns input settings only, not previous draws; generate again after restoring.
Verification: existing functions check the complete candidate set, signed bounds/counts and rejection of excessive unique counts. Browser checks validate actual integer outputs, bounds, duplicates and checkbox restoration without assuming specific random values.
With minimum 1, maximum 5, count 5 and no duplicates, each integer from 1 to 5 appears once in a random order. The order can differ between runs.
Both endpoints are included. Six unique integers cannot be drawn from 1 to 5.
Yes, unless you select No duplicates.
No. This tool generates integers only.
No. Inputs and results are not stored.
Share only the tool name and public URL. Your input and results are not included.
Keep any content you need before clearing. This tool does not autosave inputs or results. Reloading or closing the page, clearing inputs or resetting may discard your work.
Favorites and language preferences are stored separately and may be lost when site data is cleared. Tool resets and site-data deletion do not delete files already downloaded to your device.