What a mission! But for anybody interested I got there, ending up with a custom LAMBDA function HexToFloat() that was built without the need for VBA. The LAMBDA function and several other functions used are new in Excel 365 - if you're getting errors reproducing the functions below you might have an older version.

The Wikipedia page Single-precision floating-point format was my primary reference, in particular the section Converting binary32 to decimal.

Read the article for a full understanding (good luck!!), but for TLDR it's worth noting that there is an implied bit that is not actually stored in memory and when combined with the fraction component this is referred to as the "significand".

For my solution I had to build several supporting LAMBDA functions in Excel's Name Manager. In my case the data was stored as Little-Endian so if this is not applicable in your case you can skip that step.

Name Comment
LittleEndianHex Interpret Hex data as Little Endian by reversing it in 2-byte chunks
=LAMBDA(HexData,MID(HexData,7,2) & MID(HexData,5,2) & MID(HexData,3,2) & MID(HexData,1,2))
Name Comment
HEXtoBIN Handles bigger numbers than the native Excel HEX2BIN function
=LAMBDA(number,[places],LET(Unpadded,REDUCE("",HEX2BIN(MID(number,SEQUENCE(LEN(number)),1),4),LAMBDA(result,byte,result & byte)),REPT("0",IF(ISOMITTED(places),0,places-LEN(Unpadded))) & Unpadded))
Name Comment
BINtoDEC Handles bigger numbers than the native Excel BIN2DEC function
=LAMBDA(E,SUMPRODUCT(MID("0"&E,ROW(INDIRECT("1:"&LEN("0"&E))),1)*2^(LEN("0"&E)-ROW(INDIRECT("1:"&LEN("0"&E))))))
Name Comment
HexToFloat Convert hexadecimal representation of little-endian IEEE 754 binary32 (4 bytes) number to Single-precision floating-point format
=LAMBDA(HexData,LET(LEHex,LittleEndianHex(HexData),Binary,HEXtoBIN(LEHex,32),bSign,LEFT(Binary,1),bExponent,MID(Binary,2,8),bImplicit,IF(bExponent=REPT("0",8),"0","1"),bSignificand,bImplicit & RIGHT(Binary,23),dSign,BIN2DEC(bSign),dExponent,BINtoDEC(bExponent),dSignificand,BINtoDEC(bSignificand),(-1)^dSign*(dSignificand*2^-23)*2^(dExponent-127)))

Once you've done all this you can enter the HexToFloat formula directly into a cell, e.g. =HexToFloat(A1) or =HexToFloat("d162c240"). This particular example returns the result 6.07456254959106.

(PS I've never asked for votes before but this took me weeks! If you find it useful please consider giving me an up-tick.)

Answer from Wayne Ivory on Stack Overflow
🌐
SCADACore
scadacore.com › home › tools › programming calculators
Online Hex Converter - Bytes, Ints, Floats, Significance, Endians - SCADACore
April 8, 2021 - Online Hex Converter This is a free online hex converter that converts hex values into bytes, ints, and floats of different bit significance. With millions of different sensors and devices that will be connected to the cloud for IIoT, determining the
🌐
VisibleEarth
h-schmidt.net › FloatConverter › IEEE754.html
IEEE-754 Floating Point Converter
You can either convert a number by choosing its binary representation in the button-bar, the other fields will be updated immediately. Or you can enter a binary number, a hexnumber or the decimal representation into the corresponding textfield and press return to update the other fields. To make it easier to spot eventual rounding errors, the selected float ...
🌐
G2384
g2384.github.io › collection › Hex_Calc_IEEE754_conversion.html
Hex/Bin Calculator | IEEE-754 Conversion | Fix-point Bin Conversion | Radical Calculator
Bin, Hex, Dec Converter · IEEE-754 Floating-Point Conversion · Input: · Fix-Point · Dec Converter · Set Binary Fraction Length: · Bits (Max = 32) · Floating-point Expression Evaluator · Radical Calculator
🌐
Heltec
resource.heltec.cn › utils › hf
Online Tools
Heltec Automation Resource Page · Download Page · ChipID Query · E-Ink Bitmap array · Online Tools
🌐
Wheel of Fortune Solver
gregstoll.com › ~gregstoll › floattohex
Floating Point to Hex Converter
Just a handy way to convert and visualize floating-point numbers!
🌐
Christophervickery
christophervickery.com › babbage › IEEE-754 › IEEE-754.old › 32bit.html
IEEE-754 Floating-Point Conversion from 32-bit Hexadecimal to Floating-Point
From 32-bit Hexadecimal Representation To Decimal Floating-Point Along with the Equivalent 64-bit Hexadecimal and Binary Patterns · [ Convert IEEE-754 64-bit Hexadecimal Representations to Decimal Floating-Point Numbers. ] [ Convert Decimal Floating-Point Numbers to IEEE-754 Hexadecimal Representations.
🌐
Microsoft Store
apps.microsoft.com › detail › 9wzdncrdqtch
Float to Hex - Free download and install on Windows | Microsoft Store
Convert hex values to floating-point and back! Great for editing save game files and just learning how floating-point works!
Top answer
1 of 3
7

What a mission! But for anybody interested I got there, ending up with a custom LAMBDA function HexToFloat() that was built without the need for VBA. The LAMBDA function and several other functions used are new in Excel 365 - if you're getting errors reproducing the functions below you might have an older version.

The Wikipedia page Single-precision floating-point format was my primary reference, in particular the section Converting binary32 to decimal.

Read the article for a full understanding (good luck!!), but for TLDR it's worth noting that there is an implied bit that is not actually stored in memory and when combined with the fraction component this is referred to as the "significand".

For my solution I had to build several supporting LAMBDA functions in Excel's Name Manager. In my case the data was stored as Little-Endian so if this is not applicable in your case you can skip that step.

Name Comment
LittleEndianHex Interpret Hex data as Little Endian by reversing it in 2-byte chunks
=LAMBDA(HexData,MID(HexData,7,2) & MID(HexData,5,2) & MID(HexData,3,2) & MID(HexData,1,2))
Name Comment
HEXtoBIN Handles bigger numbers than the native Excel HEX2BIN function
=LAMBDA(number,[places],LET(Unpadded,REDUCE("",HEX2BIN(MID(number,SEQUENCE(LEN(number)),1),4),LAMBDA(result,byte,result & byte)),REPT("0",IF(ISOMITTED(places),0,places-LEN(Unpadded))) & Unpadded))
Name Comment
BINtoDEC Handles bigger numbers than the native Excel BIN2DEC function
=LAMBDA(E,SUMPRODUCT(MID("0"&E,ROW(INDIRECT("1:"&LEN("0"&E))),1)*2^(LEN("0"&E)-ROW(INDIRECT("1:"&LEN("0"&E))))))
Name Comment
HexToFloat Convert hexadecimal representation of little-endian IEEE 754 binary32 (4 bytes) number to Single-precision floating-point format
=LAMBDA(HexData,LET(LEHex,LittleEndianHex(HexData),Binary,HEXtoBIN(LEHex,32),bSign,LEFT(Binary,1),bExponent,MID(Binary,2,8),bImplicit,IF(bExponent=REPT("0",8),"0","1"),bSignificand,bImplicit & RIGHT(Binary,23),dSign,BIN2DEC(bSign),dExponent,BINtoDEC(bExponent),dSignificand,BINtoDEC(bSignificand),(-1)^dSign*(dSignificand*2^-23)*2^(dExponent-127)))

Once you've done all this you can enter the HexToFloat formula directly into a cell, e.g. =HexToFloat(A1) or =HexToFloat("d162c240"). This particular example returns the result 6.07456254959106.

(PS I've never asked for votes before but this took me weeks! If you find it useful please consider giving me an up-tick.)

2 of 3
0

Short answer = DEC2HEX('Your reference cell or value')

Your formula shifts places of low and high byte of when you extract the hex value from your string. Hex is just like all other position based numbers, where the lowest value is found on the right side.

This person explain working with hex values in excel

Debug of your formula

You can use multipe stages in one formula like:

=DEC2HEX(SUM(HEX2DEC("c240");HEX2DEC("d162")))

Note: If you use US settings in Office replace ; with ,

Find elsewhere
🌐
Modbuskit
modbuskit.com › en › data-converter
Data Type Converter | IEEE‑754 Float/Hex/Decimal ...
Professional data type conversion tool for IEEE‑754 floating‑point and integer formats: bidirectional Hex ⇄ Decimal conversion covering UINT16/INT16/UINT32/INT32/FLOAT32/UINT64/INT64/FLOAT64, with multiple byte orders (Big Endian/Little Endian/Big Endian – byte swap/Little Endian – byte swap) and real‑time results. ... Designed to convert between Hex and Decimal and across 16‑ to 64‑bit data types.
🌐
Binary Convert
binaryconvert.com › convert_float.html
Float (IEEE754 Single precision 32-bit) Converter
Online binary converter. Supports all types of variables, including single and double precision IEEE754 numbers
🌐
Evanw
evanw.github.io › float-toy
Float Toy
Click on a cell below to toggle bit values, or edit the hex or decimal values directly. Use this to build intuition for the IEEE floating-point format.
🌐
Alteryx Community
community.alteryx.com › t5 › Alteryx-Designer-Desktop-Discussions › Hex-to-Float-conversion › td-p › 571700
Discussions: Designer Desktop: Hex to Float conversion
June 1, 2020 - Couldn't find an inbuilt function off the bat and HexToNumber() only seems to work for integers. Was able to set up a Formula Tool to do the calculation (see attached - needs testing). Also added a Python example to do the same. Found this along the way: https://babbage.cs.qc.cuny.edu/IEEE-754.old/64bit.html · Hope this helps! ... Thanks it works. Appreciate your help. ... Thats great! If you don’t mind marking as the solution, that would be a big help! ... Could you please help me to convert the 8 Byte Hex to 32 bit signed integer.
Top answer
1 of 6
87

In Python 3:

>>> import struct
>>> struct.unpack('!f', bytes.fromhex('41973333'))[0]
18.899999618530273
>>> struct.unpack('!f', bytes.fromhex('41995C29'))[0]
19.170000076293945
>>> struct.unpack('!f', bytes.fromhex('470FC614'))[0]
36806.078125

In Python 2:

>>> import struct
>>> struct.unpack('!f', '41973333'.decode('hex'))[0]
18.899999618530273
>>> struct.unpack('!f', '41995C29'.decode('hex'))[0]
19.170000076293945
>>> struct.unpack('!f', '470FC614'.decode('hex'))[0]
36806.078125
2 of 6
25

I recommend using the ctypes module which basically lets you work with low level data types. In your case you could say

from ctypes import *

def convert(s):
    i = int(s, 16)                   # convert from hex to a Python int
    cp = pointer(c_int(i))           # make this into a c integer
    fp = cast(cp, POINTER(c_float))  # cast the int pointer to a float pointer
    return fp.contents.value         # dereference the pointer, get the float

print convert("41973333")    # returns 1.88999996185302734375E1

print convert("41995C29")    # returns 1.91700000762939453125E1

print convert("470FC614")    # returns 3.6806078125E4

I believe that the ctypes module makes sense here, because you're essentially asking how to perform low-level bit casting. Your question is basically, how do I tell Python to take some data and interpret that data as if those exact same bits were a different data type?

In C if you had an int and wanted to interpret its bits as a float, you'd do roughly the same thing, taking a pointer and then casting and dereferencing it:

int i = 0x41973333;
float f = *((float*)&i);

and that's exactly what the Python code using the ctypes library is doing in my example.

🌐
Hexadecimalcalculator
hexadecimalcalculator.com › calculator › hexadecimal-float-converter
Hexadecimal Float Converter - Convert Hex to IEEE 754 Floating-Point
Convert hexadecimal representations to IEEE 754 single-precision (32-bit) or double-precision (64-bit) floating-point numbers. Essential for numerical analysis.
🌐
NI
knowledge.ni.com › KnowledgeArticleDetails
Conversion from Hexadecimal to Single Precision Float in LabVIEW - NI
Home Support Conversion from Hexadecimal to Single Precision Float in LabVIEW
🌐
GeeksforGeeks
geeksforgeeks.org › python › convert-hex-string-to-float-in-python
Convert hex string to float in Python - GeeksforGeeks
July 23, 2025 - This code converts the hexadecimal string into an integer of 16 bases it does this by using the int() function. It also changes the number to byte array with top-down approach consisting of four bytes. Finally, struct.unpack() which uses format !f is used in order to unpack byte array for creation of floating point number.
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Floating Point to Hex Converter - Programming - Arduino Forum
April 17, 2020 - Dear All, Currently, I read data ...0000d0e80441577e (Hex) 0x00000000d0e80441 ==> Volume: 171290.0 I get this volume by using this website. Floating Point to Hex Converter and tick Swap endianness and past in convert to Double my question : Did anyone know the library ...