Random Number Generator

Generate a random integer between a min and max range.

Save

Inputs

Your values stay on this device.

Results

Generated Number

Report

Export and share

Document

Copy and share

Assumptions

  • Minimum and maximum should be finite whole-number bounds.
  • The minimum value must be less than or equal to the maximum value.
  • Results use the browser's pseudo-random generator, which is appropriate for casual use but not cryptographic security.

Sensitivity preview

Minimum Current: Generated Number 3

Maximum -10%: Generated Number 27

Maximum Current: Generated Number 35

Related Tools

View All

About this Random Number

Whether you need to pick a raffle winner, generate a pin code, or just flip a digital coin, this Random Number Generator does the job. It produces a pseudo-random integer within an inclusive range you define.

Who this calculator is for

  • Anyone who needs a quick integer picker for contests, games, or classroom demos.
  • Users modeling simple random events across a custom whole-number range.
  • People replacing a spinner, numbered list draw, or coin flip with a fast digital tool.

When to use it

  • Pick a random winner from a numbered list.
  • Generate a value for a classroom probability example or simulation.
  • Create a simple random decision tool by mapping outcomes to numbers.

How to use this calculator

  1. Enter the Minimum value (e.g., 1).
  2. Enter the Maximum value (e.g., 100).
  3. Click Generate to get your number.

Key assumptions

  • Minimum and maximum should be finite whole-number bounds.
  • The minimum value must be less than or equal to the maximum value.
  • Results use the browser's pseudo-random generator, which is appropriate for casual use but not cryptographic security.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

The calculator uses the browser's built-in `Math.random()` function, which generates a floating-point number between 0 and 1. We scale this to your range using the formula: `Result = Math.floor(Math.random() * (Max - Min + 1)) + Min`

Inputs explained

Minimum

The lowest possible number that can be generated.

Maximum

The highest possible number that can be generated.

Understanding your results

The result is an integer. Each number in the range has an equal probability of being selected.

Example scenarios

Coin Flip

Min 1, Max 2. 1 = Heads, 2 = Tails.

Lottery

Min 1, Max 49. Generate 6 times to get your ticket.

Key Features

  • Inclusive Range
  • Instant Generation
  • Unbiased Algorithm

Tips & Best Practices

  • To pick a winner from a list of names, number the list (1 to N) and generate a number between 1 and N.
  • This tool generates integers. If you need decimals, you can generate 1-100 and divide by 100.

Glossary of Terms

Inclusive
Means the Minimum and Maximum numbers themselves are possible outcomes.
Uniform Distribution
Every number in the range has the exact same chance of being picked.

Frequently Asked Questions

Is this truly random?
It uses a Pseudo-Random Number Generator (PRNG). For casual applications like games or contests, it is sufficiently random. For high-stakes cryptography, specialized hardware RNGs are preferred.
Can it generate negative numbers?
Yes. You can enter negative values for the Minimum and Maximum (e.g., -10 to 10).
Will it repeat numbers?
Yes. Each click is an independent event. If you generate a number twice, it is possible (though unlikely for large ranges) to get the same number again.