Random Signed Decimal Generator
Generates a random decimal number that can land on either side of zero — useful for maths practice involving signed numbers.
What this generator does
Produces a decimal that may be positive or negative, for testing code and spreadsheets that handle sign as well as magnitude — a common source of bugs when only positive values were tried.
How to use this tool
- Press generate for a random signed decimal.
Worked examples
- Format
- -14.72
Common use cases
- Maths practice with positive and negative decimals
- Placeholder data needing signed values
- Testing number-formatting code
How this generator works
A magnitude is drawn within your range and a sign is drawn separately, so positive and negative are equally likely regardless of where the range sits. Drawing the sign independently is what makes that true: a range of −5 to 5 would be balanced anyway, but a range of 0.1 to 9.9 would produce nothing negative at all if the sign came from the number.
Limitations and good to know
- Zero is possible when the range allows it, and zero is neither positive nor negative — a run of draws will not split perfectly in two.
- The sign is drawn independently of the magnitude, so a large negative is exactly as likely as a large positive.
- Displayed to the number of places you choose; the underlying value is a binary float and long chains of arithmetic on these will drift.