Excel decimal to hex function dec2hex guide
In Excel, =DEC2HEX(n[, places]) returns hex text for integer n; compare results with our Decimal to Hexadecimal converter for the same integer.
Detailed answer
DEC2HEX takes a signed 10-bit style range in older docs—practically, use it on integers Excel can represent. Optional `places` pads with leading zeros. Our web converter shows hex digits (optional 0x) for the parsed integer without Excel’s cell limits. If you need two-digit channel bytes, pad manually or match Excel’s `places` argument.
Relationship context
Spreadsheets expose DEC2HEX/HEX2DEC for quick engineering tasks; web calculators are useful when you want consistent radix rules outside the workbook.
Quick conversion table
| Decimal (input) | Hexadecimal (output) |
|---|---|
| 0 | 0 |
| 1 | 0x1 |
| 2 | 0x2 |
| 3 | 0x3 |
| 4 | 0x4 |
| 5 | 0x5 |
| 6 | 0x6 |
| 7 | 0x7 |
| 8 | 0x8 |
| 9 | 0x9 |
| 10 | 0xa |
| 15 | 0xf |
| 16 | 0x10 |
| Decimal (input) | Hexadecimal (output) |
|---|---|
| 11 | 0xb |
| 32 | 0x20 |
| 64 | 0x40 |
| 128 | 0x80 |
| 256 | 0x100 |
| 512 | 0x200 |
| 1024 | 0x400 |
| 2048 | 0x800 |
| 4096 | 0x1000 |
| 8192 | 0x2000 |
| 16384 | 0x4000 |
| 32768 | 0x8000 |
| 65535 | 0xffff |
More Decimal converters
Dedicated pages from Decimal to every other format (binary, octal, decimal, hexadecimal, character), with the same parsing rules as the main Number System Converter.