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

HexDecimalBinary
A101010
1F3111111
FF25511111111
100256100000000
FFFF655351111111111111111

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

HexDecimalCommon use
0A10Newline character (LF)
1F31Last control character
7F127Max ASCII value
FF255Max byte value
FFFF65,535Max 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

HexDecimalHexDecimal
0A10A0160
0F15FF255
1016100256
1F311FF511
64100FFF4095

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

HexDecimalHexDecimal
A101016
F151F31
FF255100256
4001024FFF4095
FFFF655351000065536
Have Feedback or a Suggestion? Contact Us
Top