Generate inclusive whole numbers
Set a minimum, maximum and count. Both endpoints are included: −2 through 2 contains five integers, not four. Bounds must be whole integers from −1000000000000 to 1000000000000, without commas, decimal points or exponents. You may request 1–1000 values.
Choose whether duplicates are allowed. With duplicates, each draw can repeat a previous value. Without duplicates, the count cannot exceed maximum − minimum + 1. Equal bounds allow one unique value or multiple identical values when repeats are permitted.
Original order means generation order. Ascending and descending sort the selected values; they do not make low or high values more likely to be selected. Sorting a unique list is not the same thing as a randomly ordered list.
A reproducible range example
Enter minimum −2, maximum 2, count 5, no duplicates, and ascending order. The result must be −2, −1, 0, 1, 2 because you requested the entire inclusive range. The generation order may differ before sorting. A request for six unique values from that range is impossible and produces an error.
The default settings instead draw five distinct integers from 1 through 100 in generation order. No particular output is promised, and pressing Generate again can produce an identical sequence by chance. There is no user seed or saved history.
Browser entropy and unbiased mapping
The browser adapter uses the W3C Web Cryptography API’s getRandomValues method. Each source word combines two unsigned 32-bit words into one exact unsigned 64-bit integer. The sampler does not use a weaker fallback if the browser source is unavailable.
Mapping a source word directly by remainder can favor some results when the range size does not divide the source domain. For a width w, this implementation accepts only words below floor(2^64 / w) × w; it rejects the incomplete tail first, then takes the remainder. Each possible result consequently has the same number of accepted source words, under the uniform-source assumption.
For unique generation, a sparse partial shuffle selects among the remaining positions and replaces the selected position with the last remaining index. It does not keep drawing the whole range until a new value happens to appear. That avoids a collision retry explosion when you request most or all of a range. Memory grows with the requested count, not the full range size.
Limits, privacy and appropriate interpretation
Each accepted draw permits at most 64 source attempts. An unavailable, invalid or repeatedly rejected source gives an error without a partial result. Limits bound CPU and memory use even for a large range or a dense unique request.
Browser-provided entropy is not a formal certification for regulated drawings, security keys or a particular scientific protocol. A small observed set cannot establish statistical certainty about randomness. This page generates integers only; it has no decimal-distribution mode.
Bounds and outputs remain in current page memory. Editing an option clears the result, and reloading starts without one. Generated values are not placed in analytics payloads, persistent browser storage or URLs.
For descriptive analysis of a dataset, use Standard Deviation. For a proportion or ratio rather than sampling, use Percentage or Ratio. For expressions, use Scientific.
Sources & review
- Web Cryptography API: getRandomValues — W3C Recommendation
Last reviewed: . The formula is reproduced above so you can check the math independently.