Number to GPU Float Converter: FP32, FP16, BF16, FP8, and FP4 Explained<br>Search GPUsBack to AI and Deep Learning Calcuators<br>Number to GPU Float Converter: FP32, FP16, BF16, FP8, and FP4 Explained<br>This converter shows how a number is stored across GPU floating-point formats, from FP64 down to FP4, and the tutorial below explains what the resulting values mean in practical AI workloads.<br>Number to GPU Floating-Point Precision Converter<br>ConvertClearConverted Values:<br>FP64:<br>FP32:<br>TF32:<br>FP16:<br>BF16:<br>FP8 E4M3:<br>FP8 E5M2:<br>FP4 E2M1:<br>This converter shows the raw FP4 E2M1 element value. MXFP4 and NVFP4 use shared block scales, so they are not exact single-number outputs.
What This Converter Shows<br>This page does two jobs at once. First, it lets you type a number and see what happens when that number is stored in several GPU floating-point formats. Second, it gives you a beginner-friendly explanation of why those formats exist, why AI engineers care so much about them, and why the same decimal number can come back as a slightly different value once you squeeze it into fewer bits. If you have seen terms like FP16, BF16, FP8, or FP4 in GPU specs and they felt abstract, this tutorial is meant to make them concrete.<br>The short version is that a GPU almost never stores most real-world numbers exactly. Instead, it stores an approximation that fits into a fixed number of bits. The more bits you spend, the better your approximation usually is. The fewer bits you spend, the more memory and compute you save, but the more rounding error you accept. Modern AI runs on this tradeoff. Training and inference are not just about fast matrix multiplication. They are also about deciding which parts of the workload deserve more precision and which parts can survive with less.<br>The converter above is useful because it exposes that tradeoff in a single glance. Enter a value like 1.1, 13.625, 123.456, or 0.00009, and you can see how different formats respond. FP64 and FP32 often stay close to the original. FP16 and BF16 may move a little more. FP8 can move a lot, especially when the number needs more precision than 2 or 3 mantissa bits can carry. FP4 becomes extremely coarse, which is why practical 4-bit AI systems normally need extra scaling information around the raw 4-bit values.<br>The rest of this tutorial builds from first principles. We will start with the basic question of how a decimal number is converted into a floating-point format. Then we will connect that idea to GPU formats used in AI and deep learning. After that, we will walk through a full FP8 example step by step. Finally, we will explain why standalone FP4 is usually not useful by itself, even though "4-bit AI" is a very real thing in production systems.<br>What This Converter Is Doing Under the Hood<br>FP32, TF32, FP16, and BF16 all use a common binary-float encoding flow: determine sign, compute the normalized exponent and mantissa, apply bias, round the mantissa, and then decode the packed result back into a display string. That makes these outputs directly tied to an explicit bit-budgeted representation rather than hand-wavy estimates.<br>FP64 on this page is displayed as the JavaScript number formatted to 32 decimal places. It is effectively the high-precision reference line for comparison inside this tool. FP32 is single precision. TF32 uses the same 8-bit exponent width as FP32 but a much shorter mantissa, which mirrors its role as a throughput-oriented tensor format. FP16 cuts both range and precision compared with FP32. BF16 keeps the 8-bit exponent width of FP32 but drastically reduces mantissa bits, which is why it preserves range much better than FP16 while still being much cheaper than FP32.<br>The FP8 modes are intentionally distinct from each other. E4M3 means 4 exponent bits and 3 mantissa bits. E5M2 means 5 exponent bits and 2 mantissa bits. That one-bit swap is not cosmetic. It changes the personality of the format. E4M3 spends more of its tiny budget on precision. E5M2 spends more on range. The converter exposes both so you can see how the same decimal number gets treated differently depending on whether the design leans toward range or precision.<br>The FP4 result is different again. The page does not pretend that a single raw 4-bit value is a complete modern AI quantization story. Instead, it shows a coarse E2M1-style element value so you can see just how little information fits into four bits by themselves. The note under the output is important: real MXFP4 and NVFP4 workflows rely on shared scales for blocks or groups of values. Without those shared scales, a raw FP4 value is usually too crude to carry useful numeric detail on its own.
A Quick Tour of the Formats on This Page<br>FP64 is double precision. It is excellent when you want a high-precision reference, but it is rarely the workhorse for mainstream deep learning because it is expensive in both memory and throughput. Most AI engineers only touch FP64 when debugging, validating, or doing numerically sensitive scientific...