← All calculatorsGeneral & Scientific

Hex Calculator

A hexadecimal workbench: convert to and from decimal, binary and octal, and do arithmetic without leaving base 16 — built for colour codes, memory addresses and byte-level debugging.

Decimal
500
Binary
111110100
Octal
764
Hexadecimal
1F4

How to use the Hex Calculator

  1. Set the base selector to hex.
  2. Enter your hexadecimal value; case does not matter.
  3. Pick an operation and second operand if you need arithmetic.
  4. Read the decimal, binary and octal equivalents together.

How the calculation works

Hexadecimal packs four bits into one character, which is why it dominates anywhere raw bytes are displayed. One byte is exactly two hex digits, spanning 00 to FF (0–255). A memory address, a hash digest, a MAC address and a CSS colour are all just byte sequences written in hex because the alternative — long strings of ones and zeros — is unreadable.

Colour codes make the structure obvious: #FF7A00 is three bytes, red FF (255), green 7A (122), blue 00 (0). Halving a channel means halving its byte value, and the shorthand #F70 form expands by doubling each digit rather than padding with zeros.

Arithmetic carries at sixteen instead of ten, so F + 1 is 10 in hex, meaning sixteen. When debugging offsets, remember that a jump of 0x10 is sixteen bytes, not ten — an off-by-six error that catches everyone at least once.

Formula
value = Σ dᵢ × 16ⁱ ; one byte = two hex digits = 8 bits, range 00–FF

Source: Base-16 positional notation; byte and RGB colour encoding conventions.

Worked example

Darkening the brand colour #FF7A00 by 20% for a hover state.

  1. Red FF = 255 → 255 × 0.8 = 204 → CC.
  2. Green 7A = 122 → 122 × 0.8 = 98 → 62.
  3. Blue 00 stays 00.

#CC6200 — the same hue, one step darker.

Frequently asked questions

Does letter case matter in hex?+

No. FF and ff are identical, though uppercase is conventional in documentation.

What does the 0x prefix mean?+

It marks a literal as hexadecimal in most programming languages. It is notation, not part of the value.

How do I convert hex to binary quickly?+

Expand each digit to four bits independently — no arithmetic required.

What is the largest two-digit hex value?+

FF, which is 255 in decimal — the maximum value of a single byte.

Last reviewed September 1, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in General & Scientific