Hex to Decimal: Convert Base 16 into Base 10
Hexadecimal and decimal are two ways to write the same numeric value. Decimal uses ten symbols, 0 through 9. Hexadecimal, often shortened to hex, uses sixteen: 0 through 9 followed by A through F. The SnapZain hex to decimal converter changes a non-negative whole-number value from base 16 to its familiar base-10 form. Enter one value or several values separated by spaces, then select Convert.
For example, hex 1A equals decimal 26. The digit A represents ten, so the value is one sixteen plus ten. This page also accepts lowercase letters and an optional 0x prefix. It supports up to 13 hexadecimal digits per value and up to 500 input characters in total.
Whether you are converting hex to decimal, or looking up how to convert hex to decimal by hand, the same base-16 place-value rule applies. To change hex to decimal, this calculator takes hexadecimal as input and returns decimal; a search such as “convert to hex to decimal” can be unclear about direction. Use the linked Decimal to HEX tool when your input is decimal and your desired result is hexadecimal.
Quick answer: hexadecimal 10 is decimal 16, hexadecimal 1F is decimal 31, and hexadecimal 80 is decimal 128.
Hexadecimal Digits and Their Decimal Values
Each hex digit has a value from zero to fifteen. The letters continue counting after 9: A means 10, B means 11, and so on through F, which means 15. Hex is positional, just like decimal, but each place represents a power of 16 instead of a power of 10.
| Hex digit | Decimal value | Four-bit binary |
|---|---|---|
| 0–9 | 0–9 | 0000–1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
The chart is useful when reading one digit, but a multi-digit value also depends on each digit’s position. In 2B, B is in the ones place and 2 is in the sixteens place. Therefore, the value is 2 × 16 + 11, or decimal 43. The place value—not just the digit itself—determines the final answer.
Hex to Decimal Formula and Place Values
To convert hexadecimal to decimal, multiply each digit by 16 raised to the position of that digit, counting from zero at the right. Then add the products. For a four-digit value ABCD, the formula is A × 16³ + B × 16² + C × 16¹ + D × 16⁰, after replacing each letter with its decimal digit value.
| Position from right | Power of 16 | Decimal place value |
|---|---|---|
| 0 | 16⁰ | 1 |
| 1 | 16¹ | 16 |
| 2 | 16² | 256 |
| 3 | 16³ | 4,096 |
| 4 | 16⁴ | 65,536 |
Zeros still hold a place even though their multiplication contributes nothing. In 405, the middle zero means there are no sixteens, while the 4 remains in the 256s place. Removing that zero would create 45, a different value. Leading zeros, on the other hand, do not change the number because they add zero-valued positions to the left.
How to Convert Hex to Decimal by Hand
Follow these steps to convert a value manually or check a result from a hex to decimal calculator:
- Read the digits from right to left. Label the rightmost position 0, the next position 1, and continue.
- Translate letters. Replace A with 10, B with 11, C with 12, D with 13, E with 14, and F with 15.
- Find each place value. Use 16 raised to the position number: 1, 16, 256, 4,096, and onward.
- Multiply and add. Multiply each digit’s decimal value by its place value, then sum all products.
- Check the result. Convert the decimal number back to hexadecimal or compare it with a second trusted method.
This method works because a positional numeral is a sum of digit-times-place-value contributions. It is not necessary to memorize a separate rule for every length of number; the power of 16 advances one position at a time.
Worked Hex to Decimal Examples
1A hex to decimal
In 1A, the 1 occupies the sixteens place and A is 10 in the ones place. Calculate 1 × 16 + 10 × 1 = 26. Therefore, 1A hex to decimal is 26.
C hex to decimal
A single hex digit has no higher place to account for. Since C represents decimal 12, C hex to decimal is 12.
10 hex to decimal
The 1 in 10 is in position 1; the 0 is in position 0. Calculate 1 × 16 + 0 × 1 = 16. Thus, 10 hexadecimal equals 16 decimal.
1F hex to decimal
F represents 15. The expansion is 1 × 16 + 15 × 1, which gives 31. As a useful boundary check, the next hexadecimal number, 20, equals decimal 32.
80 hex to decimal
In 80, 8 is in the sixteens place and 0 is in the ones place. So 8 × 16 + 0 = 128, meaning 80 hex to decimal is 128.
A longer example: 2B7
For 2B7, B is 11. Multiply each digit by its place: 2 × 256 + 11 × 16 + 7 × 1. The products are 512, 176, and 7; their sum is 695. A written expansion helps prevent confusion between the digit value and its position.
Using the Online Hexadecimal Converter
The calculator is designed for quick conversions while keeping its input rules straightforward:
Use this page to convert from hex to decimal. People searching for a “convert hex to decimal calculator” are looking for this base-16-to-base-10 operation; enter a value in the form above to get its decimal result.
- Enter digits 0–9 and letters A–F; lowercase a–f also work.
- Include
0xor0Xbefore a value if that is how it is written, or leave the prefix out. - For multiple conversions, separate complete values with spaces, such as
1A 10 80. - Select Convert or press Ctrl+Enter while the input has focus.
- Use Copy to clipboard to copy the decimal output, or Clear to start over.
The converter returns one decimal result per space-separated input value, preserving their order. A value like 0x1F is treated as one number. Do not separate a single hexadecimal number into individual digits with spaces unless you intend to convert each digit as a separate value.
Input Limits and Common Errors
The form accepts up to 500 characters in total and up to 13 hex digits in each value, excluding an optional prefix. This per-value cap keeps every accepted integer within JavaScript’s safe integer range. The calculator handles whole numbers only; minus signs, decimal points, commas, and letters outside A–F are not valid input.
| Input | Status | Reason |
|---|---|---|
1A | Accepted | Valid hexadecimal digits. |
0x1F | Accepted | Optional hexadecimal prefix is supported. |
ff 80 | Accepted | Lowercase digits and space-separated values are supported. |
1G | Rejected | G is not a hexadecimal digit. |
1A, 2B | Rejected | Comma separators are not supported; use spaces only. |
-1A or 1.A | Rejected | Signed values and fractions are outside this calculator’s scope. |
If a conversion fails, first check for hidden punctuation copied with the value. Confirm each character belongs to the hexadecimal set, remove commas, and make sure separate values have spaces between them. For long input, check both limits: the total character count and the length of each individual hexadecimal value.
Hex to Decimal Conversion Table
This compact hex to decimal table shows common single-digit values and examples. The letter values are useful for quickly checking the A–F portion of a hex to decimal chart; the multi-digit examples demonstrate positional multiplication.
“A hexadecimal digit tells you its value; its position tells you how much that value contributes.”
| Hexadecimal | Decimal | Calculation |
|---|---|---|
| A | 10 | 10 |
| B | 11 | 11 |
| C | 12 | 12 |
| D | 13 | 13 |
| E | 14 | 14 |
| F | 15 | 15 |
| 10 | 16 | 1 × 16 + 0 |
| 1A | 26 | 1 × 16 + 10 |
| 1F | 31 | 1 × 16 + 15 |
| 80 | 128 | 8 × 16 + 0 |
A table is a quick reference, while the formula handles values that are not listed. For any longer number, expand each digit across its corresponding power of 16. The same method applies whether the input is written in uppercase, lowercase, or with a supported prefix.
Hexadecimal, Decimal, and Binary
Hexadecimal is convenient in computing because each hex digit maps neatly to four binary bits. For example, hex 2B maps to 0010 1011. That binary string has decimal value 43, which is also the result of the place-value calculation 2 × 16 + 11. These are different written forms of one value—not separate data or a security transformation.
If you need the binary representation directly, convert each hex digit to four bits and remove leading zeros from the complete number when a standard compact binary form is desired. A hex to decimal to binary workflow can use the decimal result as an intermediate, or you can map the hex digits directly to four-bit groups. A bare string such as 10 can mean ten in decimal or sixteen in hexadecimal, depending on the base.
Choose the next tool based on the direction you need: Binary to Decimal converts base 2 into base 10; Decimal to Binary converts base 10 into base 2; and Decimal to HEX converts decimal values into hexadecimal. This page handles the reverse direction from hex to decimal.
Hex to Decimal in Excel
To convert hex to decimal in Excel, use the HEX2DEC function with a hexadecimal value stored as text. For a value in cell A1, enter =HEX2DEC(A1) in another cell. Check the function’s documented input range and signed-number conventions for your Excel version, especially when working with ten-character two’s-complement values. Those spreadsheet rules are separate from this page’s calculator, which accepts up to 13 hex digits as non-negative whole numbers.
For a manual spreadsheet audit or a programming exercise, the positional formula remains dependable: map A–F to 10–15, multiply by powers of 16, and sum. Do not paste a large hex string into a spreadsheet without confirming that the cell is treated as text; automatic formatting can change how a value is stored or displayed.
Conclusion: Convert Hex Values with Place Values
To convert hex to decimal, interpret A–F as 10–15, multiply each digit by its power-of-16 place value, and add the products. The worked examples are 1A = 26, C = 12, 10 = 16, 1F = 31, and 80 = 128. Use the calculator for a quick answer, or apply the same formula to verify a result by hand.
Remember the supported input rules: digits 0–9 and A–F, optional 0x prefix, space-separated values, a 500-character total limit, and at most 13 hex digits per value. For related base conversions, use the linked binary and decimal converters and label each number’s base so the same digits are not mistaken for the same value.