Skip to main content
Back to Numbers generators

Numbers

Random Number Between Two Values Generator

Used by developers, writers, and creators worldwide.

A random number between two values generator solves a simple but recurring problem: you need one or more numbers inside a specific range, right now, without opening a spreadsheet or writing a script. Set a minimum, set a maximum, choose how many numbers you want, and optionally dial in decimal precision. The result is a clean batch of values ready to copy anywhere. Developers use it to seed test databases and mock API responses. Teachers run fair classroom draws. Game designers control loot tables and difficulty scaling. The decimal places input is what sets this apart from a basic dice roller — 0 gives clean integers, 2 gives values like 47.83, and 6 gives normalized weights for ML experiments.

Loading usage…

Free forever — no account required

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Enter your lower bound in the Minimum field and your upper bound in the Maximum field.
  2. Set the How Many field to the count of numbers you want generated in one batch.
  3. Adjust Decimal Places to 0 for integers or higher for floating-point precision.
  4. Click Generate to produce your random numbers instantly within the defined range.
  5. Copy the output list and paste it directly into your spreadsheet, code, or document.

Use Cases

  • Seeding a Postgres staging table with 50 random prices between 9.99 and 499.99
  • Simulating d20 rolls for tabletop combat by setting min 1, max 20, decimals 0
  • Generating random latitude offsets (decimals set to 6) for map clustering tests
  • Producing normalized probability weights between 0 and 1 for a Scikit-learn dataset
  • Picking raffle winners from a numbered ticket pool of 1 to 500 in one click

Tips

  • For realistic price simulations, set decimals to 2 and a range like 9 to 999 — output mirrors actual currency values.
  • When generating large batches, check for duplicates manually if uniqueness matters; this generator does not guarantee distinct values.
  • To simulate a percentage chance, use min 0, max 100, and 1 decimal place — values like 73.4% feel natural in reports.
  • Combining multiple runs with different ranges lets you build weighted distributions — generate more numbers from the narrower range you want to favor.
  • For load-testing API delays, use a range of 200 to 2000 with 0 decimals to produce realistic millisecond wait times.
  • Setting min and max to the same value always returns that exact number — useful for sanity-checking how your application handles edge cases.

FAQ

how do I generate random decimals between two numbers

Set the decimal places field to 2 or higher before clicking Generate. The tool will return floating-point values like 34.71 or 99.04 instead of whole integers. For high-precision work like probability weights or scientific sampling, use 4 to 6 decimal places.

is Math.random safe enough for simulations and test data

For simulations, test databases, games, and sampling it is perfectly adequate — the output is statistically unpredictable within the range you set. It is not cryptographically secure, so do not use these values for passwords, tokens, or encryption keys.

can I generate negative random numbers with this tool

Yes — set min to a negative value like -100 and max to any higher number, including 0 or a positive integer. The generator handles negative ranges correctly and respects your decimal places setting, so you can get values like -23 or -7.58.