🎲 Random Number Generator

Generate a random number between any minimum and maximum.

Calculate Now

What is a Random Number Generator?

The Random Number Generator produces a single random whole number between any minimum and maximum value you choose β€” both endpoints included. It's useful for picking a raffle or giveaway winner from a numbered list, rolling a virtual dice, deciding who goes first in a game, generating a random test number, or simply settling an argument about which restaurant to pick tonight.

How It Works

The generator takes your minimum and maximum values, works out the size of the range (max βˆ’ min + 1, so both ends are included), and multiplies that range by a random decimal between 0 and 1 generated by the browser. Rounding that down to a whole number and adding your minimum back on gives a number that lands somewhere inside your chosen range, with every whole number in it equally likely to appear.

Random Number = ⌊Random(0–1) Γ— (Max βˆ’ Min + 1)βŒ‹ + Min

Worked Example

Set Minimum = 1 and Maximum = 6 to simulate rolling a standard six-sided die:

  • Range size = 6 βˆ’ 1 + 1 = 6 possible outcomes.
  • If the browser's random function returns, say, 0.83, the calculation is ⌊0.83 Γ— 6βŒ‹ + 1 = ⌊4.98βŒ‹ + 1 = 4 + 1 = 5.
  • Every value from 1 to 6 has an equal one-in-six chance of being the result, exactly like a fair die.

How to Use This Tool

  1. Enter your Minimum value.
  2. Enter your Maximum value.
  3. Click Calculate to get one random whole number between the two, inclusive.

Things to Know

πŸ’‘ Tip: Click Calculate again for a fresh number any time β€” nothing is stored between clicks. For picking a winner from a numbered list of entries (e.g., 1 to 500 participants), set Minimum to 1 and Maximum to your total entry count, and treat the number shown as the winning entry number.

Need a strong random password instead of a number? Try the Password Generator. Curious what your name adds up to numerologically? Check the Lucky Number Calculator.

📅 Last reviewed: July 2026 · Formulas verified against RBI/SEBI/IT Dept guidelines.