Math

Hex to Decimal Converter

Convert hexadecimal numbers to decimal, with binary and octal equivalents.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Decimal 255
Results

About this calculator

Hexadecimal uses sixteen symbols, so each digit carries four bits of information. Memory addresses, colour codes and byte dumps are all written in hex for exactly that reason.

Worked example

calculated with the default values below

Hexadecimal number FF Decimal 255 · Binary 11111111 · Octal 377 · Hex digits 2 · Bytes 1

General background references

Disclaimer

These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

n = Σ d_k×16^k; bytes = ceil(hex_digits/2)

d_k
hex digit value (0–15)
k
position from the right, starting at 0
digits
number of hex digits

Decimal value is parsed exactly within JavaScript’s safe integer range. Hex digits count includes leading zeros; whole-byte capacity = ceil(digits/2).

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why is byte count rounded up for an odd number of hex digits?

Each hex digit is a 4-bit nibble and a stored byte holds 8 bits. The calculator reports whole bytes as the ceiling of digit count divided by two: F needs one byte, and FF needs one byte. Leading zero digits count toward the entered width.

Which hexadecimal input is accepted?

Enter hexadecimal digits (0–9, A–F) with an optional 0x prefix. Other characters, empty input, and integers above JavaScript’s exact integer range are rejected so the decimal result is not silently altered.