Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Generate a random integer or decimal within any range.
Generating a number...
This tool generates a uniformly random number -- integer or decimal, to any number of decimal places -- within a min/max range you set, using the Web Crypto API's cryptographically strong random source rather than a weaker pseudo-random generator.
Enter a minimum, maximum, and (optionally) decimal places. Click Generate for a new random value within that inclusive range.
For integers, a random value is drawn uniformly from the inclusive [min, max] range. For decimals, both bounds are scaled up by the requested decimal precision, a random integer is drawn in that scaled range, then scaled back down -- ensuring uniform distribution across the requested precision.
For a random string or password instead of a number, see the Random String Generator or Password Generator.
Both bounds are inclusive, so a range of 1 to 6 can return 1, 6 or anything between. With zero decimal places the tool returns a whole number chosen from all integers in the range, each equally likely. With decimal places set, it multiplies the bounds by ten to the power of the places, picks a whole number in that scaled range, and divides back. For example, a minimum of 0, a maximum of 1 and two decimal places gives 101 possible outcomes, from 0.00 to 1.00, each with equal probability. Because the choice is made among discrete steps, a decimal result never has more places than you asked for. The decimal places field is read as a whole number of at least zero.
Number of possible outcomes = (max - min) x 10^places + 1 (bounds rounded to that precision).
Suppose 250 tickets were sold and numbered 1 to 250. Set Min to 1, Max to 250 and decimal places to 0. The generated number is the winning ticket, and every ticket has the same chance. If you need a second and third winner, click the generate button again, and check whether the same ticket appears twice, because each draw is independent and repeats are possible. To draw without repeats, note the numbers already chosen and re-roll on a duplicate.
The tool uses the browser cryptographic random source, which is well suited to games, sampling, test data and everyday decisions. It is not certified for regulated purposes such as official lotteries, gambling or legal drawings, where rules may require audited or witnessed processes. In those situations follow the rules of the relevant authority instead.
Yes -- every value in the specified range has an equal probability of being selected, using a cryptographically strong random source rather than a biased or predictable method.
Yes -- set decimal places to any value from 0-10; the tool scales the range accordingly to produce a uniformly distributed decimal result.
The underlying randomness source (Web Crypto API) is cryptographically strong, but always use a purpose-built cryptographic library for actual security-critical key/token generation rather than a general web tool.
Yes. Both bounds are inclusive, so each can be returned as a result.
Yes. Every draw is independent, so repeats can happen, especially in small ranges. That is normal for random generation.
Set the decimal places field to 2 and choose a range that contains it. The result will have at most two decimal places.
It is fine for casual use, but formal contests and lotteries often have legal requirements for how winners are selected. Check the applicable rules before relying on any online generator.
Reference: MDN Web Docs