Hex Subtraction Calculator

Subtract hexadecimal integers and inspect each borrow in base 16. The calculator handles negative differences honestly and verifies the final result with decimal arithmetic.

Written and checked by TheToolNet Editorial Team · Last reviewed: September 19, 2026 · How we check arithmetic tools

Borrow rule
10₁₆ − 1₁₆ = F₁₆

A borrow from the next hex column is worth 16 in the current column, not 10.

Subtract hexadecimal numbers with steps

How hex subtraction works

  1. Align the two hex numbers by the rightmost digit.
  2. Subtract from right to left.
  3. If the top value is too small, borrow 1 from the next column. The borrowed unit adds 16 decimal, written 10₁₆, to the current place.
  4. Reduce the next column by one before subtracting there.

Worked example: 502 − 1A7

In the right column, 2 is smaller than 7, so borrow 1: 18 decimal − 7 = 11, or B. The middle column has been reduced; borrowing continues across the zero as needed. The exact result is 35B₁₆. In decimal, 1282 − 423 = 859, and 859 decimal is 35B hex.

What if the second hex number is larger?

The calculator returns a negative mathematical result. For example, 2F₁₆ − A0₁₆ = −71₁₆. A computer register may instead wrap around according to a chosen bit width, but that is a separate fixed-width rule. This page does not assume an 8-, 16-, 32-, or 64-bit register.

Common hex subtraction mistakes

  • Treating a borrow as 10 decimal instead of 16 decimal.
  • Forgetting to reduce the column that supplied the borrow.
  • Assuming every negative difference should wrap around.
  • Using letters after F, which are not valid base-16 digits.

Use the hexadecimal addition calculator to check a difference: difference + subtrahend should recover the minuend.

Frequently asked questions

How does borrowing work in hexadecimal?

Borrowing 1 from the next position adds 16 decimal to the current digit because every place is worth 16 times the place to its right.

What is 10 hex minus 1?

The answer is F hex, equivalent to 16 − 1 = 15 in decimal.

Does this tool use two's complement?

No. It performs ordinary signed integer subtraction. Two's-complement wraparound requires a specified bit width.

References