A UUID v4 has 5.3169119831397⋅10⁺³⁶ variants, and 2⁶⁴ − 1 is where doubles run out of digits

122 random bits once the version and variant fields are carved out — plus an exact 2⁶⁴ − 1 in the base converter and a rounded one on the workbench.

Number bases and coding · Level: Classic result · Updated on 2026-11-10

2^122 on the workbench prints 5.3169119831397⋅10+36, which is the number of distinct version-4 UUIDs a generator can produce. The identifier is 128 bits, but 4 of them hold the version digit and 2 more hold the variant bits, so only 122 are free. Key 2^128 and you get 3.4028236692094⋅10+38 — exactly 64 times larger, which is the six fixed bits showing up as a factor rather than as a story.

The base converter is the one place this number survives intact. Type sixteen F's and the hexadecimal line comes back as FFFFFFFFFFFFFFFF, the decimal line as 18446744073709551615, the binary line as sixty-four ones: the converter walks the digits with integer arithmetic and never hands the value to a floating-point double. Key 2^64 on the workbench instead and the double is all you get — 1.844674407371⋅10+19 — because doubles stop representing every integer above 2⁵³, and the true value is rounded on the way in. It is the same ceiling that makes 2^53 the last exact counter.

Answer

5.3169119831397⋅10+36

How to read it

2¹²² on the workbench, the version-4 UUID space. The third link types 2⁶⁴ − 1 as sixteen hex digits and shows what the base converter does with it.

Source

RFC 4122 fixes 4 version bits and 2 variant bits in a 128-bit UUID, leaving 122 random bits for version 4; 2⁶⁴ − 1 is exactly 18,446,744,073,709,551,615 and exact integer arithmetic in a double stops at 2⁵³

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.