IP Subnet Calculator
Calculate IPv4 and IPv6 network boundaries, masks, address ranges and exact counts.
Convert hexadecimal to decimal, binary, and octal instantly. Perform hexadecimal addition, subtraction, multiplication, and division with accurate results.
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)
Decimal result: 255
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
Use this reference chart for individual hexadecimal digits. The four-bit binary column retains leading zeros so each row represents a complete nibble.
| Hex | Decimal | Binary (4 bits) | Octal |
|---|---|---|---|
| 0 | 0 | 0000 | 0 |
| 1 | 1 | 0001 | 1 |
| 2 | 2 | 0010 | 2 |
| 3 | 3 | 0011 | 3 |
| 4 | 4 | 0100 | 4 |
| 5 | 5 | 0101 | 5 |
| 6 | 6 | 0110 | 6 |
| 7 | 7 | 0111 | 7 |
| 8 | 8 | 1000 | 10 |
| 9 | 9 | 1001 | 11 |
| A | 10 | 1010 | 12 |
| B | 11 | 1011 | 13 |
| C | 12 | 1100 | 14 |
| D | 13 | 1101 | 15 |
| E | 14 | 1110 | 16 |
| F | 15 | 1111 | 17 |
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.
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.
Hexadecimal is base 16, using 0–9 and A–F. Its place values are powers of sixteen.
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.
FF equals 255: 15 × 16 + 15. Its binary form is 11111111 and its octal form is 377.
Repeatedly divide by sixteen and record each remainder. Convert remainders 10–15 to A–F and read the remainder digits in reverse order.
255₁₀ is FF₁₆. Two divisions by sixteen give remainders of fifteen, corresponding to F and F.
Add digits by place and carry whenever a column reaches sixteen. For example, A + 5 = F and FF + 1 = 100.
Use base-sixteen place values, or convert to decimal, multiply and convert back. A × B = 10 × 11 = 110 decimal = 6E hexadecimal.
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.
0x is a prefix indicating hexadecimal notation. Here, 0xFF and FF both represent 255 when the source is Hexadecimal.
No. A–F and a–f represent the same numeric digits. Results use uppercase for consistency.