Random Number Generator
Set Min and Max, then click Generate to draw a whole number where both ends are allowed. Each click rolls again with the browser’s Math.random, so raffles and quick picks stay on the page.
Updated 2026-08-03 · math
Click Generate.
About this tool
The generator reads two numeric fields and returns a single integer from Min through Max inclusive. If either value is not finite or Min is greater than Max, the result area shows Invalid range instead of a fake number.
How to use
- Set the minimum: Enter the lowest allowed integer in the Min field (default 1).
- Set the maximum: Enter the highest allowed integer in the Max field (default 100).
- Generate a number: Click Generate to compute a random integer in the closed interval.
- Read the result: Use the number shown, or fix Min/Max if you see Invalid range.
Common use cases
- Draw a contest winner when entries are numbered from Min to Max.
- Pick a random page, dice substitute, or team order without installing an app.
- Teach inclusive ranges by showing that both endpoints can appear.
Tips
- Min and Max must be numbers, and Min cannot be greater than Max.
- Click Generate again for a new roll; the previous result is replaced.
FAQ
Are Min and Max included?
Yes. The formula can return Min, Max, or any integer between them.
Why do I see Invalid range?
One of the values is not a finite number, or Min is greater than Max.
Is the result a decimal?
No. It floors to a whole number using Math.floor on the scaled random value.
Does this need an account?
No. Generation runs locally when you click Generate.