Modbus register to float converter

Enter two registers read from the device. The table shows the result for every byte order, so you can see straight away which one makes sense.

Registers → number

Result

Float32 (ABCD)12.56
Int32
1,095,300,547
UInt32
1,095,300,547
Int16 / UInt16 (R1)
16,712 / 16,712
Int16 / UInt16 (R2)
−2,621 / 62,915
Hex
4148 F5C3
All byte orders
OrderFloat32Int32UInt32
ABCD12.561,095,300,5471,095,300,547
CDAB−4.950302 × 10³²−171,753,1444,123,214,152
BADC198,415.81,212,269,5571,212,269,557
DCBA−490.5645−1,007,335,3593,287,631,937
Embed on your site

Paste this code into your page’s HTML. The tool sets its own height, and the link to Kalkio has to stay visible.

Calculator by Kalkio · kalkio.app

Why byte order matters

Modbus carries data in 16-bit registers, while a float32 takes 32 bits, so two registers. The standard doesn’t say which register holds the high half, so manufacturers differ. The same registers 4148 F5C3 are 12.56 in ABCD order but a completely different number in CDAB.

If you don’t know the device’s order, read a known value (such as a temperature shown on its display) and find the table row where the result matches.

How an IEEE 754 float is built

A float32 has a sign bit, 8 exponent bits and 23 mantissa bits. That gives a range of about ±3.4 × 10³⁸ and roughly 7 significant digits.

Common questions

What does CDAB mean?

A word swap: the device sends the low register first, then the high one. It is one of the most common orders in PLCs and energy meters.

Why do I get a huge or tiny number?

Almost always the wrong byte order. Check the other rows of the table.

Does the tool connect to my device?

No. It only converts the values you type, in your browser.