We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Generate random decimals with a specified range, decimal places, and quantity. Ideal for data analysis, simulation experiments, and more.
Click the generate button to start generating random decimals
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
This random decimal number generator creates a list of values between a minimum and maximum you enter. Set how many results you need, choose the displayed decimal places, and optionally sort the list in ascending order. For example, a range from 0.5 to 2.5 with two places produces values displayed in a form such as 1.37 or 2.04. Each run is a new sample; the example values are illustrative, not a promised output.
For each result, the generator scales a random fraction to your interval, then formats it to the selected number of places:
x = min + u × (max − min), where 0 ≤ u < 1
display = x formatted to the selected fixed decimal places
The underlying random fraction does not reach 1, so the unformatted value is below the entered maximum. Formatting can round a value up to that maximum, however. With a range of 0 to 1 and one displayed place, a value close to 1 may appear as 1.0. The output is therefore rounded decimal text, not a guarantee that every displayed value is equally likely. The ECMAScript specification describes Math.random as approximately uniform over [0, 1), and toFixed as fixed-place formatting; see the ECMAScript 2026 language specification (checked September 28, 2026).
Decimal places control the number of digits shown after the decimal point, including trailing zeros. Thus 1.20 and 1.2 represent the same numeric quantity, while only the first visibly records two places. Changing displayed precision also changes how many distinct strings are possible and can make separate underlying samples look identical.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Enter the lower and upper values using the same unit or scale. The minimum must be less than the maximum; equal or reversed bounds produce no results. Negative and fractional bounds can be used, such as -2.5 and 3.5.
Enter the number of values (the field is intended for 1–10,000) and the number of decimal places, up to 10. The default batch contains 10 values at two places. To show whole-number formatting, use zero places; if the places field is cleared or invalid, the displayed precision falls back to two.
Select ascending sort if order is useful, then choose Generate. Editing settings or changing the sort option creates a fresh batch. Copy an individual result or copy the entire comma-separated list, for example 0.31,0.58,0.92. Copy the values before changing settings if you need to keep that particular sample.
Use cases
See how the tool fits into real work and everyday tasks.
A tester can make temporary decimal inputs within a field’s allowed range, then paste selected values into a test case. Check special rules such as allowed increments, required uniqueness, or valid measurement units separately.
An instructor can generate fresh values to discuss ranges, rounding, repeated outcomes, or ascending order. Because each generation is a new sample, students should not expect a fixed answer key.
When a prototype needs plausible-looking decimal placeholders, choose a range and precision that resemble the target column, then copy the comma-separated batch. Label placeholders clearly so they are not mistaken for measured or business data.
Q&A
Find concise answers to common questions and confusing cases.
Yes. The unrounded sample is below the maximum, but rounding to the chosen number of places can make the displayed text equal the maximum.
Repeats are allowed, and rounding can map different samples to the same displayed value. This decimal generator does not offer a unique-values setting. More places or a wider range may reduce collisions but cannot guarantee distinct results.
No. Changing the sort setting generates a fresh sample and then orders that new list from low to high. Copy the existing list first if you need to preserve it.
A zero or invalid precision entry falls back to two places in the current control behavior. For ordinary whole-number results, review the displayed values after generating; if the input does not hold zero, this page may not be suitable for that formatting requirement.
Notes
Review scope, result limitations, and important precautions before use.
This generator is intended for examples, placeholder data, and informal sampling. Do not use its results for passwords, keys, security tokens, regulated drawings, gambling, or any selection that requires cryptographic strength, provable fairness, or an auditable process.
Related
Discover related tools, collections, and available API capabilities.