Skip to main content
Computers & TechnologyExact integer resultsPrivate · Runs in your browser

Hexadecimal Calculator

Convert hexadecimal to decimal, binary, and octal instantly. Perform hexadecimal addition, subtraction, multiplication, and division with accurate results.

Instant updates · Integer numbers onlyJump to results ↓

Convert a number

Example loaded: FF in hexadecimal is 255 in decimal.

Optional sign and matching 0x, 0b or 0o prefix. Up to 4,096 bits per input; results remain exact.

Your entries stay in this tab. Copy, print and export happen only when you choose them.

Decimal result

255₁₀

FF (base 16) = 255 (base 10)

Hexadecimal
FF
Decimal
255
Binary
11111111
Octal
377

Show step-by-step calculation
  1. 15 × 16^1 = 240
  2. 15 × 16^0 = 15
  3. Sum of place values = 255 in decimal.

Decimal result: 255

On this page

What Is a Hexadecimal Calculator?

A hexadecimal calculator works with integers written in base 16. Use the converter to translate a value into decimal, binary or octal, or open Hexadecimal Calculator for addition, subtraction, multiplication and integer division.

The default hex-to-decimal converter shows all four representations together. For example, FF in hex, 255 in decimal, 11111111 in binary and 377 in octal describe the same quantity. Changing the notation does not change the value.

What Is the Hexadecimal Number System?

Base 16 uses the ten digits 0–9 and the letters A–F. A means ten, B eleven, C twelve, D thirteen, E fourteen and F fifteen. After F comes 10, which means sixteen rather than decimal ten.

Digit letters are case-insensitive: FF and ff both equal 255. The optional programming prefix 0x identifies a hexadecimal value; it is not an extra digit. This tool accepts it only with hexadecimal selected as the source. Binary can use 0b, and octal can use 0o.

Hexadecimal gives a compact way to write binary values: each hex digit corresponds to four bits. That makes it useful for memory values, byte displays and IPv6 notation.

How to Use the Hexadecimal Converter

  1. Choose the source number system, then type or paste an integer.
  2. Select the target base. The main answer updates immediately.
  3. Read the equivalent values below, or copy an individual value.
  4. Open the steps to inspect the conversion. Swap direction moves the converted value into the input and exchanges the bases.

Reset restores the labeled FF example and clears arithmetic edits. Inputs support signs and leading zeros, but not decimal fractions, commas, separators or expressions. For example, enter FF and 1 in the math fields rather than typing FF + 1 into one field.

How to Convert Hex to Decimal

Give each digit its decimal value, multiply it by the power of sixteen for its position, then add the products. Start counting positions at zero on the right.

For 2AF, the digits mean 2, 10 and 15. The calculation is 2 × 256 + 10 × 16 + 15 × 1 = 512 + 160 + 15 = 687. Similarly, ABC = 10 × 256 + 11 × 16 + 12 = 2748.

If you are looking for a hexadecimal-to-denary converter, denary is another name for decimal. Choose Decimal (Base 10) as the target.

Hexadecimal to Decimal Formula

Decimal value = Σ(digit value × 16position)

The rightmost place has weight 16⁰ = 1, followed by 16¹ = 16, 16² = 256 and 16³ = 4096. For FF, this gives 15 × 16 + 15 = 255.

A minus sign applies to the whole magnitude. Thus −2AF equals −687; it does not change the positional weights or imply any particular storage width. The expandable calculation shows each place-value term for short inputs.

How to Convert Decimal to Hexadecimal

Divide the nonnegative decimal integer by sixteen, recording the quotient and remainder. Repeat with the quotient until it becomes zero. Read the remainder digits from the last division back to the first.

  1. 255 ÷ 16 = 15, remainder 15 → F.
  2. 15 ÷ 16 = 0, remainder 15 → F.
  3. Read upward: 255₁₀ = FF₁₆.

For a negative integer, convert its magnitude and restore the minus sign. Zero converts to 0 in every base. Choose Decimal as the source and Hexadecimal as the target for the reverse converter.

Hexadecimal Addition and Subtraction

Hexadecimal addition carries at sixteen. A + 5 equals F because decimal 10 + 5 = 15. F + 1 reaches sixteen, so write 0 and carry 1 into the next column: F + 1 = 10.

Adding one to FF carries twice and produces 100. Subtraction works in reverse: borrowing one from the next place supplies sixteen units to the current place, so 100 − 1 = FF.

The math mode supports negative results: 1 − 100 = −FF. It does not silently wrap the result into an unsigned byte or discard a carry beyond a chosen width.

How to Multiply Hexadecimal Numbers

Multiply using base-sixteen place values, or convert the operands to decimal, multiply exactly and convert the product back. The two methods yield the same integer.

For A × B, the decimal operands are 10 and 11. Their product is 110. Dividing 110 by sixteen gives 6 remainder 14, and 14 is E, so A × B = 6E.

Multiplying by 10 in hexadecimal shifts the digits left one place, because 10₁₆ represents sixteen. For example, 2A × 10 = 2A0.

How to Divide Hexadecimal Numbers

This calculator uses integer division and reports the quotient and remainder separately. For FF ÷ A, decimal 255 ÷ 10 gives quotient 25 and remainder 5. In hexadecimal the quotient is 19 and the remainder is 5.

The identity is dividend = divisor × quotient + remainder: FF = A × 19 + 5. A division with remainder is not an exact fractional result, so the calculator does not label the quotient as the full rational answer.

With negative operands, the quotient truncates toward zero and a nonzero remainder has the dividend’s sign. For −FF ÷ A, the quotient is −19 and the remainder is −5. Division by zero is rejected.

Hexadecimal to Binary and Octal Conversion

Replace each hexadecimal digit with its four-bit binary form: A → 1010 and C → 1100, so AC₁₆ = 10101100₂. In reverse, group binary digits into sets of four from the right, padding the first group on the left if needed.

Octal groups binary digits in sets of three instead. FF₁₆ = 11111111₂ = 011 111 111₂ = 377₈. Choose any source and target among the four bases to convert directly.

Results use the shortest magnitude notation, so leading zeros are removed. Negative binary and octal outputs use a leading minus sign; they are not fixed-width two’s-complement bit patterns.

Hexadecimal Conversion Chart

Use this reference chart for individual hexadecimal digits. The four-bit binary column retains leading zeros so each row represents a complete nibble.

Hex digit values in decimal, binary and octal
HexDecimalBinary (4 bits)Octal
0000000
1100011
2200102
3300113
4401004
5501015
6601106
7701117
88100010
99100111
A10101012
B11101113
C12110014
D13110115
E14111016
F15111117

Decimal vs Binary vs Hexadecimal

Decimal uses ten symbols and powers of ten. Binary uses two symbols and powers of two. Hexadecimal uses sixteen symbols and powers of sixteen. Octal uses eight symbols and powers of eight.

For example, 100 means one hundred in decimal, four in binary, sixty-four in octal and two hundred fifty-six in hex. Always identify the base when sharing a bare sequence of digits.

IPv6 writes address groups in hexadecimal. The IP Subnet Calculator uses those groups to find IPv6 network boundaries, while this tool converts integer representations.

Large Integers, Signs and Precision

All conversion and arithmetic values use exact integer operations, including values above the range where JavaScript’s floating-point Number can represent every integer. Each input supports up to 4,096 bits, equivalent to 1,024 hexadecimal digits; multiplication may produce a larger exact result.

That limit keeps interactive work responsive. Digit-by-digit steps are limited to short results, while full values remain available to copy and export. The calculator does not interpret signed storage formats: FF means 255, and a negative value must carry an explicit minus sign.

Frequently Asked Questions

What is hexadecimal?

Hexadecimal is base 16, using 0–9 and A–F. Its place values are powers of sixteen.

How do I convert hexadecimal to decimal?

Multiply each digit’s decimal value by sixteen raised to its position, counted from zero on the right, then add the products. For 2AF, the sum is 512 + 160 + 15 = 687.

What is FF in decimal?

FF equals 255: 15 × 16 + 15. Its binary form is 11111111 and its octal form is 377.

How do I convert decimal to hexadecimal?

Repeatedly divide by sixteen and record each remainder. Convert remainders 10–15 to A–F and read the remainder digits in reverse order.

What is 255 in hexadecimal?

255₁₀ is FF₁₆. Two divisions by sixteen give remainders of fifteen, corresponding to F and F.

How do I add hexadecimal numbers?

Add digits by place and carry whenever a column reaches sixteen. For example, A + 5 = F and FF + 1 = 100.

How do I multiply hexadecimal values?

Use base-sixteen place values, or convert to decimal, multiply and convert back. A × B = 10 × 11 = 110 decimal = 6E hexadecimal.

Can hexadecimal numbers be negative?

Yes. This tool accepts a leading minus sign, such as −FF (type the ordinary keyboard minus). It does not assume that FF is signed 8-bit −1.

What does 0x mean?

0x is a prefix indicating hexadecimal notation. Here, 0xFF and FF both represent 255 when the source is Hexadecimal.

Is hexadecimal case-sensitive?

No. A–F and a–f represent the same numeric digits. Results use uppercase for consistency.