Random Decimal Number Generator

Choose how many numbers you need and how many decimal places, then press Generate numbers. Each value is between 0 and 1, and a small chart shows how evenly they are spread.

Try a preset

About this random decimal generator

A random number between 0 and 1 is the basic building block of simulations, statistics exercises, games, and sampling: multiply it by any range to scale it, or compare it with a probability to decide an event. This generator builds each value from 53 random bits supplied by your browser’s cryptographically secure generator, the full precision of a JavaScript number, so values are uniformly spread. Each is cut, not rounded, to the number of decimal places you choose, so it is always at least 0 and below 1. The mean of many values should come close to 0.5, and the chart of how many fall in each tenth helps you see that the spread is even.

How to generate random decimals

  1. Choose how many. Pick from 1 to 100 numbers.
  2. Choose the decimal places. Use 2 for percentages or money-style values, up to 15 for full precision.
  3. Press Generate numbers. Copy or download the list and check the mean, range, and spread.

Frequently asked questions

Can the result be exactly 0 or 1?

It can be 0 when all the shown digits happen to be zero, but never 1. Values are cut to the chosen places instead of rounded, so they stay below 1.

How do I get a random decimal in another range?

Multiply by the width of the range and add the start. For a number between 5 and 10, use 5 + value × 5.

Why is the mean not exactly 0.5?

Random samples vary. With 10 numbers the mean can easily be 0.4 or 0.6; with 100 it is usually within about 0.06 of 0.5.

Is this the same as Math.random()?

It gives the same kind of value, but uses the browser’s cryptographically secure generator instead, which is unpredictable and suitable even for security-sensitive uses.

Why stop at 15 decimal places?

A standard double-precision number holds about 15 to 17 significant digits, so further digits would not carry real randomness.