How this tool works
The decimal setting defines a grid of possible values. For two places, each grid point differs by 0.01. The browser uses a cryptographic random source and discards out-of-range samples to keep the available values equally likely.
Scale the interval by 10^places, round the lower bound up and upper bound down, then sample a uniform integer.A worked example
The interval 1 through 100 with zero decimal places contains 100 possible integers. The sample form returns five draws.
Good to know
Independent draws with replacement. Repeated values are possible. The generator requires the browser’s cryptographic random API.
How the inputs affect the result
To assign numbered slips to participants, check that the endpoints correspond to real slip numbers. Use a separate selection without replacement when the same participant must not appear twice.
At two places the inclusive interval has 101 possible values.
Where the calculation applies
Independent draws with replacement. Repeated values are possible. The generator requires the browser’s cryptographic random API.
For a related calculation, see the Polyhedral dice roller.
A few questions, answered
What happens if no grid point lies in the interval?
The calculator asks for wider bounds or more decimal places. For example, 1.1 to 1.9 contains no whole number.
What does the “Decimal draws from 0 to 1” setting illustrate?
At two places the inclusive interval has 101 possible values.