What is a hexadecimal number in decimal?
Turn a hex number such as FF or 1A3 into an ordinary decimal number.
What you enter stays on your device while you use this tool. Opening a shared link sends the settings in its address to HowToolbox to prepare the page.
In decimal
255
2 digits in base 16
The same number in other bases
- In binary
- 11111111
- In octal
- 377
- In hexadecimal
- ff
Turn a hex number such as FF or 1A3 into an ordinary decimal number.
How to use
- Type the hexadecimal number, with or without a 0x in front. Letters can be upper or lower case.
- Leave the target on decimal and read the number.
- Use the same field to check a colour code or a memory address piece by piece.
Hexadecimal to decimal
FF, one full byte, is 255.
How it works
Hex digits run from 0 to 9 and then A to F for ten to fifteen. Each place is worth 16 times the one to its right, so a three-digit hex number has places worth 256, 16 and 1.
For 1F4 that means 1 × 256 + 15 × 16 + 4 × 1, which is 500. The letter F counts as fifteen, so it is the largest single digit.
Hex turns up wherever bytes are written out: colour codes such as #FF8800, memory addresses, error codes and MAC addresses. Two hex digits are one byte, so a pair always lies between 0 and 255.
Another example: 3A7 is 3 × 256 + 10 × 16 + 7 × 1, which is 935. A colour such as #FF8800 is three pairs: FF is 255, 88 is 136 and 00 is 0. Four hex digits cover 0 to 65,535. Programmers often write hex with a 0x prefix, as in 0x1F4, to show that the digits are not decimal.
Worked example
What is the hexadecimal number 1F4 in decimal?
- Its digits are worth 1, 15 and 4 (F is fifteen), in places of 256, 16 and 1.
- 1 × 256 + 15 × 16 + 4 × 1 = 500
1F4 in hexadecimal is 500 in decimal.
Method
No outside data is used: the result is worked out directly from the formula explained under How it works.
Frequently asked questions
What is FF in decimal?
255: F is fifteen, and 15 × 16 + 15 = 255. It is the largest value one byte can hold.
What do the two hex digits of a colour mean?
Each pair is one colour channel (red, green or blue) from 00 to FF, that is 0 to 255 in decimal.
Is 0x10 sixteen or ten?
Sixteen. The 0x prefix says the digits are hexadecimal, and 10 in hex is 1 × 16 + 0.
How many values can four hex digits hold?
65,536, from 0000 to FFFF, which is 0 to 65,535 in decimal. Each hex digit holds 16 values, and 16 × 16 × 16 × 16 is 65,536.
Next you might need
More in Math & numbers
- Percentage calculator, private, runs on your device
- Area of shapes, private, runs on your device
- Combinations and permutations calculator, private, runs on your device
- Complex number calculator, private, runs on your device
- Confidence interval calculator, private, runs on your device
- Correlation and regression calculator, private, runs on your device





