Home Math Hex Calculator

Hex Calculator

Add, subtract and multiply hexadecimal numbers, with the decimal answer beside it.

Advertisement

How it works

Work in hex directly: enter both numbers with digits 0-9 and letters A-F, pick the operation, and read the answer in hex and decimal at once. Hex is just base 16, where each digit is exactly four bits, which is why programmers think in it: a byte is always two digits, and memory addresses stay short.

Advertisement

Formula

Each hex digit is worth 0 to 15, each position a power of 16.
Arithmetic follows the same carrying rules as decimal, but carrying at 16.

Example

Example in plain words. 7EA plus FF.

In decimal that is 2026 + 255 = 2281.

In hex: 8E9, because 2026 + 255 carries twice past 16.

Frequently asked questions

Can the result be negative?

Yes, subtraction shows it with a leading minus. Programmers also meet negative hex as two complement values; this page shows the plain mathematical sign instead.

Why not just convert to decimal?

Converting back and forth invites slips. Patterns like F0 and FF00 stay readable when you stay in hex.

Advertisement

Related calculators

Percentage Calculator

Find a percent of a number, what percent one number is of another, and percent change, all at once.

Fraction Calculator

Add, subtract, multiply and divide fractions, with the answer simplified.

Scientific Calculator

Online scientific calculator with trig, logs, powers, roots, factorial and degree or radian mode.

Quadratic Formula Calculator

Solve ax² + bx + c = 0, with the discriminant and the vertex.