Hex to Decimal Calculator
Enter a hexadecimal number (0�9, A�F) to convert it to decimal.
How to Convert Hex to Decimal
Method: positional notation (base 16)
Multiply each hex digit by 16 raised to its position (right to left, starting at 0), then sum.
Example: 1F = 1×16¹ + 15×16&sup0; = 16 + 15 = 31
Quick reference
| Hex | Decimal | Binary |
|---|---|---|
| A | 10 | 1010 |
| 1F | 31 | 11111 |
| FF | 255 | 11111111 |
| 100 | 256 | 100000000 |
| FFFF | 65535 | 1111111111111111 |
Related Calculators
How to Convert Hex to Decimal
Each hex digit represents a power of 16, starting from 16⁰ = 1 at the right. Multiply each digit by its positional value and sum. For example, hex 1A3: (1×16²) + (A×16¹) + (3×16⁰) = 256 + 160 + 3 = 419. This process is identical to reading decimal (base-10) place values, but with powers of 16 instead of 10. Programmers encounter this when reading error codes, colour values, or memory offsets.
Common Hex to Decimal Values
| Hex | Decimal | Common use |
|---|---|---|
| 0A | 10 | Newline character (LF) |
| 1F | 31 | Last control character |
| 7F | 127 | Max ASCII value |
| FF | 255 | Max byte value |
| FFFF | 65,535 | Max 16-bit unsigned int |
Converting Hex to Decimal Step by Step
Hexadecimal is base-16, so each digit position represents a power of 16. Starting from the rightmost digit (16⁰ = 1), each step left multiplies by another 16. To convert hex 2AF to decimal: A is in the 16¹ position (value 10×16=160), 2 is in the 16² position (2×256=512), F is in the 16⁰ position (15×1=15). Sum: 512 + 160 + 15 = 687. Verify: 2AF hex = 687 decimal.
Hex-to-decimal conversion is needed whenever you read error codes, memory addresses, or port numbers from technical documentation. HTTP status codes, UNIX file permissions, and Windows registry values are commonly displayed in hex. Web colors: #3B82F6 means R=0x3B=59, G=0x82=130, B=0xF6=246 in decimal RGB. Understanding this lets you interpret color values, debug network packets, and read hardware datasheets.
Hex to Decimal Reference
| Hex | Decimal | Hex | Decimal |
|---|---|---|---|
| 0A | 10 | A0 | 160 |
| 0F | 15 | FF | 255 |
| 10 | 16 | 100 | 256 |
| 1F | 31 | 1FF | 511 |
| 64 | 100 | FFF | 4095 |
How Hexadecimal Place Values Work
Hexadecimal is a positional number system with base 16. Like decimal (base 10) where each position represents a power of 10, hexadecimal positions represent successive powers of 16. The rightmost position is 16 raised to the power 0 (which equals 1), the next position is 16 raised to the power 1 (which equals 16), then 256, 4096, 65536, and so on. To convert a hexadecimal number to decimal, multiply each digit by its positional power of 16 and add all the products. The digits 0 through 9 have their usual values; A represents 10, B represents 11, C represents 12, D represents 13, E represents 14, and F represents 15. For example, hex 2B3 converts as follows: 3 times 1 equals 3, B (11) times 16 equals 176, and 2 times 256 equals 512. Adding gives 3 plus 176 plus 512 equals 691. This positional expansion technique works for hex numbers of any length. In practice, programmers convert hex constants from source code to decimal when verifying values against hardware data sheets or debugging off-by-one errors in address calculations and protocol parsers.
Hex to Decimal Reference Table
| Hex | Decimal | Hex | Decimal |
|---|---|---|---|
| A | 10 | 10 | 16 |
| F | 15 | 1F | 31 |
| FF | 255 | 100 | 256 |
| 400 | 1024 | FFF | 4095 |
| FFFF | 65535 | 10000 | 65536 |
