Random Number Generator
Generate a random integer between two values.
Browser-based random number
This tool uses JavaScript’s built-in pseudorandom number generator and is intended for everyday use, not cryptography.
When to use this tool
Use this generator when you need an everyday random integer for games, drawings, classroom exercises, or choosing among numbered options.
How the result is calculated
The browser generates a pseudorandom value and maps it to the inclusive minimum and maximum that you enter. Both endpoints can be selected.
Worked example
With a range of 1 through 100, every generated result will be an integer from 1 to 100 inclusive.
What to keep in mind
This tool uses the browser’s ordinary pseudorandom generator. It is not designed for passwords, cryptographic keys, lotteries, security decisions, or regulated drawings.
About our calculations
StraightTools is designed to show the method behind the answer, not just the result. Inputs are handled in your browser for this tool. For important financial, legal, medical, tax, safety, or contractual decisions, verify the result with an appropriate authoritative source or qualified professional.