Conversion

Hexadecimal to decimal converter

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is the decimal number system?

The decimal number system, also known as the base-10 system, is the most common numeral system used in everyday life. It consists of ten digits — from 0 to 9 — and each digit’s position determines its value based on powers of ten. For instance, in the number 523, the digit 5 is in the hundreds place, which equals 5×102=5005 \times 10^2 = 500; the digit 2 is in the tens place, 2×101=202 \times 10^1 = 20; and the digit 3 is in the ones place, 3×100=33 \times 10^0 = 3. Thus, adding these values together gives 500+20+3=523500 + 20 + 3 = 523.

This positional value system is straightforward because it matches how human understanding of number counting originated — using ten digits corresponding to ten fingers.

What is the hexadecimal number system?

The hexadecimal number system, or base-16 system, is widely used in computing and digital electronics because of its close relationship with binary code. Instead of ten symbols, it uses sixteen. The first ten symbols are the same as in the decimal system (0–9), but to represent values from ten to fifteen, letters A–F are added:

DecimalHexadecimal
00
11
22
33
44
55
66
77
88
99
10A
11B
12C
13D
14E
15F

Hexadecimal is particularly useful for human readability of binary data. One hexadecimal digit corresponds directly to four binary digits, also called bits. This means converting between binary and hexadecimal is simple — each group of four bits directly translates to one hexadecimal digit.

Step-by-step conversion process

  1. Write down the hexadecimal number.
  2. Assign each digit its decimal equivalent.
  3. Multiply each digit by 16 raised to the power of its positional index, starting from 0 at the rightmost position.
  4. Add all the results together.

This step-by-step manual method is precisely what an automatic converter performs instantly.

Examples

Example 1

Convert hexadecimal 101 to decimal.

Break down: 10116=(1×162)+(0×161)+(1×160)101_{16} = (1 \times 16^2) + (0 \times 16^1) + (1 \times 16^0)

so (1×162)+(0×161)+(1×160)=256+0+1=257(1 \times 16^2) + (0 \times 16^1) + (1 \times 16^0) = 256 + 0 + 1 = 257.

Therefore, 10116=25710101_{16} = 257_{10}.

Example 2

Convert octal number FF to decimal.

FF16=(15×161)+(15×160)=240+15=255FF_{16} = (15 \times 16^1) + (15 \times 16^0) = 240 + 15 = 255

So FF16=25510FF_{16} = 255_{10}.
In binary, this also equals 11111111, which represents one byte of maximum value in 8-bit systems.

Example 3

Convert decimal number 513 to hexadecimal.

Decimal to hexadecimal:

Division by 16QuotientRemainder
513 ÷ 16321
32 ÷ 1620
2 ÷ 1602

So, 51310=20116513_{10} = 201_{16}.

Historical background

The idea of hexadecimal notation appeared with the development of digital computers in the mid-20th century. Because binary numbers, consisting only of 0s and 1s, are cumbersome for human processing, engineers introduced base-16 as an efficient shorthand. Early programming languages and computer systems — for example, IBM mainframes and later C-based languages — adopted hex representation for addresses, machine instructions, and color codes.

In modern computing, hexadecimal notation is standard in web design (for example, #FF5733) and in debugging tools, firmware development, and memory addressing.

Conversion in everyday context

While hexadecimal values might seem abstract, they appear frequently:

  • Color codes in web design: #FFFFFF (white) or #000000 (black). Each pair of characters corresponds to a color intensity for red, green, and blue channels.
  • Computer memory addresses: such as 0x1A3F.
  • Error codes from hardware or software diagnostics. Understanding how to interpret or convert them can make troubleshooting and data analysis more intuitive.

Frequently asked questions

How to convert the hexadecimal value 3e7 to decimal?

3e716=(3×162)+(14×161)+(7×160)=(3×256)+(14×16)+(7×1)=768+224+7=9993e7_{16} = (3 \times 16^2) + (14 \times 16^1) + (7 \times 16^0) = (3 \times 256) + (14 \times 16) + (7 \times 1) = 768 + 224 + 7 = 999.
Therefore, 3e716=999103e7_{16} = 999_{10}.

How many decimal numbers correspond to hexadecimal digits A through F?

The letters A to F represent decimal numbers from 10 to 15. Thus, six decimal values (10, 11, 12, 13, 14, 15) correspond to hexadecimal A–F.

Why is hexadecimal used in programming?

Because one hexadecimal digit equals exactly four binary bits, it simplifies how binary sequences are represented, read, and debugged. For example, 11111111 in binary can easily be written as FF in hexadecimal.

How to check the correctness of a hexadecimal to decimal conversion?

After calculating the decimal value, convert it back into hexadecimal by repeatedly dividing by 16 and recording remainders. If you return to your original hex digits, the conversion is correct.

2022 from decimal to hexadecimal

Let’s convert the decimal number 2022 to hexadecimal.

Division by 16QuotientRemainder
2022 ÷ 161266
126 ÷ 16714 (E)
7 ÷ 1607

The remainders from bottom to top give: 202210=7E6162022_{10} = 7E6_{16}.

Report a bug

This field is required.