
Random number generator
Generate 1 to 100 integers between inclusive bounds, with possible repeats.
Generation takes place in your browser. Inputs and results are neither sent nor stored.
Method and assumptions
Method version 1.0.0 · Updated
Generate integers
Formula: Uniform integers → rejection of excess values → inclusive interval
Both bounds are included. Identical results are possible, including across two clicks on Generate. If minimum = maximum, every result equals that bound. Example: between 1 and 6, only 1, 2, 3, 4, 5 and 6 can appear. Numbers are separated by semicolons.
- minimum
- Inclusive minimum
- maximum
- Inclusive maximum
- count
- Number of results
Integer bounds from −2,147,483,648 to 2,147,483,647, with 1 to 100 results. Repeats are possible; generation order is preserved without sorting. No user seed or sampling without replacement.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const value = Math.floor(Math.random() * (20 - 1 + 1)) + 1; // integer from 1 to 20