Hex Calculator | Best Calculator

Hex Calculator

Hex value:
0

Decimal value:
0
Formula: Hex → Decimal
Decimal = (hn × 16n) + ... + (h0 × 160)

Example: Convert 2F to Decimal
2F = (2 × 16) + (F × 1) = 32 + 15 = 47
Copied!

What is the Hexadecimal Number System?

The hexadecimal (hex) number system is a base-16 system, unlike the decimal (base-10) or binary (base-2) systems. Hex uses 16 unique symbols: numbers 0–9 and letters A–F, where A through F represent decimal values 10 through 15.

Each hex digit corresponds to 4 binary digits (bits), making it easier to convert and compress binary data. For instance, the binary number 1010101010 is equal to 2AA in hex, providing a simpler representation for computers and programmers.

Hex to Decimal and Binary Conversion Table

Here’s a quick reference table for converting between hex, binary, and decimal values:

HexBinaryDecimal
000
111
2102
3113
41004
51015
61106
71117
810008
910019
A101010
B101111
C110012
D110113
E111014
F111115
141010020
3F11111163

How to Convert Hex to Decimal

To convert a hexadecimal number to decimal, multiply each hex digit by 16 raised to its position power, starting from the right (position 0). Remember: A = 10, B = 11, and so on.

Example: Convert 2AA to decimal

2AA = (2 × 16²) + (A × 16¹) + (A × 16⁰)
= (2 × 256) + (10 × 16) + (10 × 1)
= 512 + 160 + 10 = 682

How to Convert Decimal to Hex

To convert from decimal to hex:

  1. Find the largest power of 16 less than or equal to your number.

  2. Determine how many times it fits into your number.

  3. Multiply and subtract to find the remainder.

  4. Repeat for the next smaller power of 16.

  5. Replace values above 9 with corresponding hex letters (A–F).

Example: Convert 1500 to hex

1500 ÷ 256 (16²) = 5 → remainder: 220
220 ÷ 16 (16¹) = 13 → remainder: 12
Hex digits: 5 (16²), D (13), C (12)
Answer: 1500 = 5DC (hex)

Hex to Decimal Conversion (Another Example)

Example: Convert 1024 (hex) to decimal

= (1 × 16³) + (0 × 16²) + (2 × 16¹) + (4 × 16⁰)
= 4096 + 0 + 32 + 4 = 4132

Hex Addition Explained

Adding hex numbers follows the same principle as decimal addition, but includes A–F digits. You can convert to decimal, perform the addition, and convert back to hex if needed.

Example:

18 1A B
+ B 7 8
———————–
1 4 2 3

Explanation:

  • B (11) + 8 = 19 → 1 carry, 3

  • 1 (carry) + A (10) + 7 = 18 → 1 carry, 2

  • 1 (carry) + 8 + B (11) = 20 → 1 carry, 4
    Final result: 1423 (hex)

    Hex Subtraction Explained

    Hex subtraction is also similar to decimal subtraction, with one key difference: borrowing involves 16 instead of 10. When subtracting and a smaller number is above a larger one, you borrow 16 from the next digit.

    Example:

    5 D 1C
    – 3 A F
    ——————-
    2 2 D
    • C (12) – F (15): Borrow from D → becomes C (12), gives 16 + 12 – 15 = 13 → D

    • C (now) – A = 12 – 10 = 2

    • 5 – 3 = 2
      Answer: 22D

    If subtracting a larger number from a smaller one, simply swap and place a negative sign in the result.

    Hex Multiplication

    Hex multiplication works like decimal but requires converting to and from hex during steps. Use a hex multiplication table if needed.

    Example:

    F A
    × C 3
    ————-
    2 E E (3 × FA)
    + B B 8 (C × FA)
    ————-
    B E 6 E

    Steps include converting values to decimal, multiplying, adding carryovers, and converting results back to hex.

    Hex Division

    Hex division is very similar to long division in decimal. You divide, multiply, and subtract using hex values. You can also convert to decimal, do the division, and convert the result back to hex.

    For example-based division and visual understanding, using a hex division table or calculator is highly recommended.

    Example:

    D E F
    ┌────────────
    12 ) F A C E
    – E A
    ——-
    1 0 C
    – F C
    ——-
    1 0 E
    – 1 0 E
    ———
    0

    Checks:
    12 × D = EA
    FA − EA = 10
    12 × E = 10C
    10C − FC = 10
    12 × F = 10E
    10E − 10E = 0

    Final Result: FACE ÷ 12 = DEF (all in hexadecimal)

    Hexadecimal Multiplication Table
    hexadecimal multiplication table