Random Number Generator: Integers and Decimals

Generate uniform values within a chosen range. Choose the decimal spacing, whether to allow duplicates and how to sort the results.

Result

Enter values and select Calculate.

How is this calculated?

Choose uniformly among the grid points within the entered bounds.

Worked example: Draw three different practice values

Each result is a two-decimal value between 0.12 and 0.16; all three must be distinct and in ascending order.

Method and limits

Bounds are inclusive when on the selected grid. Uses the browser’s random source with rejection sampling. Requests are bounded by a 500-value and total-output limit.

How to use this calculator

  1. Choose whole numbers or decimals and enter the inclusive range. Set decimal places to choose the grid spacing.
  2. Set the count, choose whether duplicates are permitted, and optionally sort the generated values.

Generate three distinct practice values

Use 0.12 to 0.16, two decimal places, a count of three, no repeats and ascending order. The output contains three different values selected from 0.12, 0.13, 0.14, 0.15 and 0.16; it need not match a previous run.

A decimal place defines a grid

Two decimal places mean steps of 0.01. For limits 0.123 and 0.156, the candidates start at 0.13 and end at 0.15; the calculator never rounds a drawn value outside the original limits.

Choose the sampling rule before sorting

When repeats are allowed, each draw uses the same candidate pool. Otherwise the pool shrinks after each draw. Sorting changes display order, not which values were selected.

Frequently asked questions

Why can I not draw six unique values from five candidates?
Without repeats each candidate can appear only once. Reduce the count, widen the range, or allow repeats.
Can both endpoints be drawn?
Yes if both land on the chosen grid. A bound between grid points is excluded.
Can I reproduce a previous sequence?
This utility does not expose a seed. Save the output if you need the exact list again.

Common mistakes and limits

Sources & methodology

Related calculators