Skip to main content

MATH · RANDOM NUMBER

Random Number Calculator

Generate a random integer within any range you specify. Runs entirely in your browser — no server, no logging.

Range (integers)

Set a range and click Generate.

About This Calculator

Set a minimum and maximum integer and click Generate to get a random number in that range. Each click generates a new independent result. The range is preserved in the URL so you can share the settings without sharing the result.

How It Works

Enter integer minimum and maximum values, then click Generate. The number is produced by the browser's built-in cryptographically-seeded pseudo-random number generator at the moment you click — nothing is computed at page load or on the server.

The Formula

result = floor(Math.random() × (max − min + 1)) + min

min
inclusive lower bound (integer)
max
inclusive upper bound (integer)

Frequently Asked Questions

Is this random enough for security or games?
The browser's Math.random() is fast and uniformly distributed but is not a cryptographically secure random number generator (CSPRNG). It is fine for games, simulations, and general decisions, but not for generating cryptographic keys or passwords. For security purposes, use the Web Crypto API.
Can I generate multiple numbers at once?
Click Generate repeatedly. Each click is an independent draw, so results are not correlated. For large batches, a spreadsheet or a programming environment may be more practical.
Why are only integers supported?
Integer random numbers are the most common use case and the most unambiguous. For decimals, click Generate and divide the result by an appropriate power of 10 for your precision needs.