InfyCalculator

Hex to Decimal Calculator

Convert a hexadecimal number to decimal, with the binary and octal forms.

Hexadecimal number
Loading calculator…

How it works

decimal = sum of each digit × 16 raised to its position, with A–F standing for 10–15

Hexadecimal is base 16, using the digits 0–9 and then A–F for the values ten through fifteen. Each position is worth 16 times the one to its right, so converting to decimal multiplies each digit by its place value and adds them up. An optional 0x or # prefix is ignored, and the value is also shown in binary and octal.

Worked example

The hex value FF has two F digits, each worth 15. That is 15 × 16 + 15 × 1 = 240 + 15 = 255 in decimal, which is 11111111 in binary and 377 in octal.

Frequently asked questions

What do the letters A–F mean in hexadecimal?

They are the digits for ten through fifteen: A is 10, B is 11, up to F which is 15. Hexadecimal needs sixteen distinct digits, so it borrows letters once 0–9 run out.

What does the 0x or # prefix mean?

Both simply flag that the number is hexadecimal — 0x is common in programming and # in web color codes. This converter accepts either or none, so FF, 0xFF and #FF all read as 255.

Why is hexadecimal so common in computing?

Because it lines up perfectly with binary: each hex digit is exactly four bits. A byte is two hex digits, making long binary values compact and easy to read at a glance.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.