Hex to Decimal Calculator
Convert a hexadecimal number to decimal.
0-9 and A-F (0x prefix optional)
Results update as you type.
How it works
Hexadecimal, or hex, is a base-16 number system widely used in computing, and this calculator converts a hex value into ordinary decimal. You enter a hexadecimal number, using the digits 0 through 9 and the letters A through F, with an optional 0x prefix, and it returns the decimal equivalent. Hex uses sixteen symbols per digit: 0 to 9 for the values zero to nine, and A to F for ten to fifteen. Conversion works by place value, where each position is a power of sixteen, so from right to left the places are 1, 16, 256, 4096, and so on. Each digit is multiplied by its place value and summed. For example, hex FF has two F digits, worth fifteen; the left F is in the sixteens place, so it is fifteen times sixteen, and the right F is fifteen ones, giving 240 plus 15, or 255. Hex is popular in computing because it maps neatly to binary, with each hex digit representing exactly four bits, making it a compact way to write binary data. It appears in web color codes, memory addresses, byte values, and low-level programming. This calculator accepts valid hex characters and an optional 0x prefix. Enter a hexadecimal number to convert it to decimal.
decimal = Σ digitᵢ × 16ⁱ
A hexadecimal number is converted to decimal using place values that are powers of sixteen, increasing from right to left as 1, 16, 256, and so on. The digits A through F represent 10 through 15. Each digit is multiplied by its place value and the results are summed to give the decimal number.
Source:Number systems
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter hexadecimal number.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Decimal value updates instantly as you type — no button to press.
Frequently asked questions
How do you convert hex to decimal?
Assign each hex digit a place value that is a power of sixteen, starting at 1 on the right. Convert letters A through F to 10 through 15, multiply each digit by its place value, and sum. Hex FF is fifteen times sixteen plus fifteen, equaling 255. The calculator does this from your input.
What is hexadecimal?
Hexadecimal is a base-16 number system using sixteen symbols: the digits 0 through 9 and the letters A through F, which stand for 10 through 15. It is widely used in computing because it represents binary data compactly, with each hex digit corresponding to exactly four binary bits.
What do the letters A to F mean in hex?
In hexadecimal, the letters A, B, C, D, E, and F represent the values 10, 11, 12, 13, 14, and 15, which decimal has no single digits for. They extend the digit set beyond 9 so that each hex position can hold sixteen distinct values, from 0 up to 15, as base 16 requires.
Why is hex used in computing?
Hex is used because it maps cleanly to binary: each hex digit equals exactly four bits, so a byte of eight bits is two hex digits. This makes hex a compact, human-readable way to write binary data. It appears in color codes, memory addresses, byte values, and debugging, where raw binary would be long and hard to read.
How are hex color codes related?
Web colors are often written as six hex digits, like FF0000 for red, where each pair of digits gives the red, green, and blue intensity from 0 to 255. Converting a hex pair to decimal with this calculator tells you the intensity of that color channel, since FF is 255, the maximum, and 00 is zero.