Random Number Generator

Generate one or more random whole numbers within any range you choose. Pick how many numbers you want and whether repeats are allowed.

Result
80
Note

How it works

Each number is drawn uniformly at random from your chosen range (inclusive of both endpoints). With duplicates disallowed, numbers are drawn without replacement - the same value can never appear twice - using a shuffle so every possible combination is equally likely.

Formula
With duplicates: each draw is independent. Without duplicates: numbers are drawn from the range without replacement (a Fisher-Yates shuffle of the full range, then take the first N).

Example. Range 1-100, count 5, no duplicates might produce something like: 7, 42, 88, 13, 61.

Frequently asked questions

Can I generate more numbers than fit in my range without duplicates?

No - if your range only contains, say, 10 possible numbers, you can't draw 20 unique values from it. The calculator will cap the count at the range size and let you know.

Is this good enough for something like a raffle or giveaway?

For casual or informal use, yes. For anything requiring cryptographic-grade randomness or provable fairness (like real-money gambling or a legally binding drawing), use a dedicated certified random-number service instead.

Related calculators

Embed this calculator

Free to use on any site. Please keep the credit link.

<iframe
  id="letmecalc-random-number-generator"
  src="https://letmecalc.com/embed/math/random-number-generator"
  title="Random Number Generator"
  width="100%"
  height="620"
  style="border:0;max-width:100%"
  loading="lazy"
></iframe>
<p><a href="https://letmecalc.com/math/random-number-generator" target="_blank" rel="noopener">Random Number Generator</a> by letmecalc</p>
<script>
(function () {
  var f = document.getElementById("letmecalc-random-number-generator");
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://letmecalc.com") return;
    if (!f || e.source !== f.contentWindow) return;
    var d = e.data;
    if (!d || d.source !== "letmecalc-embed" || d.type !== "resize") return;
    if (typeof d.height === "number" && d.height > 0) {
      f.style.height = d.height + "px";
    }
  });
})();
</script>