One Calculator Logo One Calculator
Mathematics & Statistics • Formulas shown

Hex Calculator

Quick Answer

Hexadecimal uses digits 0 to 9 and letters A to F (10 to 15), with each position worth a power of 16. 1A3F + FF = 1B3E in hex, which is 6,719 + 255 = 6,974 in decimal.

Digits 0 to 9 and A to F.
Result

Result in hexadecimal: 1B3E

Binary1101100111110
Octal15476
Decimal6974
Hexadecimal1B3E
Step-by-step calculation
  1. Convert to decimal: 1A3F₍16₎ = 6719, FF₍16₎ = 255
  2. Operate in decimal: 6719 + 255 = 6974
  3. Convert back to base 16: 1B3E

About the Hex Calculator

Hex is a compact way to write binary: one hex digit equals four bits. It appears in colour codes (#FF8800), memory addresses, MAC addresses and low-level programming.

Enter hex numbers (with or without a 0x prefix), choose an operation and read the result in hexadecimal, decimal, binary and octal. The steps show the decimal values used so you can verify the work.

How to Use the Hex Calculator

  1. Enter the first hex number.
  2. Choose an operation or Convert only.
  3. Read the result in each base.

Formula and Method

Place values

…4096, 256, 16, 1

Powers of 16.

Digits

A=10, B=11, C=12, D=13, E=14, F=15

Worked Example

Adding hex values

Input: 1A3F + FF

  • 0x1A3F = 6,719; 0xFF = 255
  • 6,719 + 255 = 6,974
  • 6,974 = 0x1B3E

Result: 1B3E.

Frequently Asked Questions

How do I convert hex to decimal?

Multiply each digit by its power of 16 and add. FF = 15 × 16 + 15 = 255.

What does 0x mean?

A prefix that marks a number as hexadecimal in many programming languages.

Why do programmers use hex?

It is shorter than binary: a byte is just two hex digits.

How do colour codes use hex?

A code like #FF8800 stores red, green and blue as three bytes.

Related Calculators

All Math & Statistics Calculators →

Sources and Further Reading

Accuracy and Scope

Results use standard IEEE-754 double-precision arithmetic and are rounded for display. For exam, engineering or research work, verify critical values with a second method. See our full disclaimer.