Hex to Decimal Converter Online Tool

Hex Number16

Decimal Number10

Octal Number8

Binary Number2

About Hex to Decimal Converter Online Tool:

This online hex to decimal converter tool helps you to convert one input hex number (base 16) into a decimal number (base 10).

Hex Numeral System:

Hex numeral system (also called hexadecimal) has 16 digits, include (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) just like decimal numeral system, plus (a, b, e, d, e, f) 6 additional characters. Which means it's is a number system of base 16. Since Hex numeral system can represent any binary string in a readable way, It is widely used in computer science. The SHA256 hash string is often appears as Hex style string, the Color System used in HTML is also be written down as Hex number, from #000000 (pure black) to #FFFFFF (pure white).

Decimal Numeral System:

Decimal numeral system (also called Hindu-Arabic, or Arabic) has 10 digits, include (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), it's the most used number system in our daily life. Decimal numeral system is also one of the most ancient number system, it's inspired by 10 fingers of human.

comic hex to decimal

How to convert from hex to decimal?

For hex number represents as below (with n digits):

dn-1dn-2...d2d1d0

For each digit in hex numeral system (base 16), equals to each digit multiply by its position power to 16 in decimal numeral system.

Decimal Output = dn-1 × 16n-1 + ... + d1 × 161 + d0 × 160

Example 1: Convert hex number "F4" to decimal number:

Decimal Output = 15 × 161 + 4 × 160 = 244

Example 2: Convert hex number "B29E" to decimal number:

Decimal Output = 11 × 163 + 2 × 162 + 9 × 161 + 14 × 160 = 45726

Example 3: Convert hex number "3.14" to decimal number:

Decimal Output = 3 × 160 + 1 × 16-1 + 4 × 16-2 = 3.078125

Hex to Decimal conversion table:

Hex Decimal Hex Decimal
1 1 20 32
2 2 30 48
3 3 40 64
4 4 50 80
5 5 60 96
6 6 70 112
7 7 80 128
8 8 90 144
9 9 A0 160
A 10 B0 176
B 11 C0 192
C 12 D0 208
D 13 E0 224
E 14 F0 240
F 15 100 256
10 16 200 512
11 17 300 768
12 18 1000 4096
13 19 2000 8192
14 20 3000 12288

More information:

Wikipedia (Hexadecimal): https://en.wikipedia.org/wiki/Hexadecimal

Wikipedia (Decimal): https://en.wikipedia.org/wiki/Decimal

Convert Hex to Decimal with Python:

def hex_to_decimal(hex_str):
    decimal_number = int(hex_str, 16)
    return decimal_number


hex_input = 'ccccccccc'
decimal_output = hex_to_decimal(hex_input)
print('decimal result is:{0}'.format(decimal_output))

-------------------
decimal result is:54975581388

Convert Hex to Decimal with Java:

public class NumberConvertManager {
    public static int hex_to_decimal(String hex_str) {
        return Integer.parseInt(hex_str, 16);
    }

    public static void main(String[] args) {
        String hex_input = "f4";
        int decimal_output = hex_to_decimal(hex_input);
        System.out.println("decimal result is:" + decimal_output);
    }
}

-------------------
decimal result is:244