RandomNr

Number Generators

Random Negative Number Generator

Draw random numbers below zero across any negative range, as integers or decimals.

Random Negative Number Generator

-42

Range -100 to -1 · 1 result

Choose the range

How many negative numbers to generate

Up to 1000 per draw

Options

Sort results
Copy separator

How to use the negative number generator

  1. Set both bounds on the negative side, or set the highest to 0 to include zero.
  2. Choose how many numbers you need, and whether repeats are allowed.
  3. Press Generate negative numbers, then copy or download the set.

Where negative numbers show up in real data

Negative values are not an edge case, they are how the world below zero is measured. If you are building test data, these reference points show the scale real data sets use.

Real world valueFigure
Water freezes0 degrees C
Coldest air temperature recorded on Earth, Vostok Station 1983-89.2 degrees C
Liquid nitrogen boils-196 degrees C
Absolute zero, the coldest possible temperature-273.15 degrees C
Dead Sea shoreline, lowest land on Earthabout -430 m
Challenger Deep, deepest known point in the oceanabout -10,900 m

Ordering and size below zero

Negative numbers reverse the intuition about size: minus 100 is smaller than minus 1, even though 100 is the bigger figure. The value written after the minus sign is the absolute value, the distance from zero. This matters when you sort a draw, because smallest first puts the most negative value at the front. The sort control on this page offers both directions, so a coldest first or a closest to zero first ordering is one tap away.

Negative numbers in computing

Computers store signed numbers in two's complement, which gives the negative side one extra value. That is why the classic limits are lopsided, and why test data for typed columns should probe the exact bottom end.

Storage typeMost negativeMost positive
8 bit signed-128127
16 bit signed-32,76832,767
32 bit signed-2,147,483,6482,147,483,647

Set the range to a type's exact bottom value to generate boundary test cases, the inputs most likely to expose an overflow bug.

Popular generators

Frequently asked questions

What is a negative number generator

It draws random whole numbers below zero. Set the lowest and highest value, both negative, and every result falls between them.

Can the highest value be zero

Yes. Set the highest value to 0 to include zero in the pool, or keep it at minus 1 for strictly negative results.

Can I get negatives with no repeats

Yes. Tick no repeats for a set with no duplicates. The count is capped at the size of the range.

How large can the range be

Any whole numbers your browser can handle, so ranges into the millions below zero work fine.

Is it free

Yes, free and with no sign up. Every draw runs in your browser and nothing you enter leaves your device.

Related generators

Prefer the full number line? The random number generator handles negatives and positives together, and the random integer generator covers any whole number range.