Skip to content
ENExplore Calculators

Hex Calculator

Hexadecimal arithmetic and conversion to binary, octal and decimal.

About Hex Calculator

Hexadecimal (base 16) uses digits 0–9 and letters A–F, where A=10, B=11, …, F=15. One hex digit encodes exactly 4 binary bits (a nibble), making hex a compact representation of binary data. A byte (8 bits) is always exactly 2 hex digits. FF in hex = 11111111 in binary = 255 in decimal = 377 in octal. Hex arithmetic works like decimal arithmetic but with base 16 carrying.

Formulas

Hex to decimal

d = Σ hᵢ × 16ⁱ (sum of hex digit values × powers of 16)

Decimal to hex

Repeatedly divide by 16; remainders (read bottom-up) are the hex digits

Worked example

With the default values below, Hex Calculator returns Hex of FF. Change any input above and every figure here is recalculated in your browser.

Inputs used

Modeone of Base Conversion, Hex Arithmetic
Base Conversion
Hex value (without 0x prefix)
FF
Hex value A
1F
Operationone of Add (+), Subtract (−), Multiply (×), Divide (÷ integer)
Add (+)
Hex value B
0A

Results

Hex
FF
Decimal
255
Binary
11111111
Octal
377

Step by step

  1. 1Hex input= 0xFF
  2. 2Decimal (base 10)= 255
  3. 3Binary (base 2)= 11111111
  4. 4Octal (base 8)= 377
  5. 5Breakdown= = 255

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is hexadecimal used in computing?

Each hex digit maps exactly to 4 binary bits, so two hex digits represent a byte. This makes memory addresses, colour values (#RRGGBB), and binary data much more readable. For example, 0xFF = 255 is cleaner than 11111111.

What is 0xFF in decimal?

0xFF = 15×16 + 15 = 240 + 15 = 255. It's the maximum value of an unsigned 8-bit integer, equivalent to 11111111 in binary.

How do I convert a decimal number to hex manually?

Repeatedly divide by 16 and collect the remainders. For 255: 255 ÷ 16 = 15 rem 15 (F); 15 ÷ 16 = 0 rem 15 (F). Reading remainders bottom-up: FF.

Hex Calculator – Calculate Hex & Hex Result | Calcrivo