Hex subtraction example showing C7 minus 3D equals 8A in hexadecimal, with the borrow from the second column shown step by step

Hex Subtraction: How to Subtract Hexadecimal Numbers with Examples

By ProURLMonitor Team

Hex subtraction works like ordinary column subtraction, but hexadecimal is base 16. Digits A-F stand for decimal 10-15, and when a column's top digit is too small, it borrows from the next column to the left — and that borrow is worth decimal 16, not decimal 10. That single difference is the entire trick to subtracting hexadecimal numbers by hand.

This guide covers the hex digit values, the borrowing rule that drives every hex subtraction, and several worked examples verified column by column, from a simple subtraction with no borrowing to a multi-digit case with cascading borrows.

What Is Hex Subtraction?

Hex subtraction is arithmetic performed in base 16, where every number is written using sixteen digit symbols: 0 through 9, then A through F for the values a single 0-9 digit can't hold.

Hex digitDecimal value
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15

Each position in a hex number represents a power of 16 — 1, 16, 256, 4096, and so on — the same positional-notation idea decimal uses with powers of 10. Subtraction proceeds one column at a time, right to left, exactly like decimal. The only change is what happens when a column runs short: it borrows a unit worth 16 instead of a unit worth 10. For the full place-value breakdown behind this, see how to convert hex to decimal.

Hexadecimal Subtraction Rules

The core hexadecimal subtraction rules:

  1. Align the two hex numbers by their rightmost (least significant) digit.
  2. Work from right to left, one column at a time.
  3. If the top digit is greater than or equal to the bottom digit, subtract normally and write the result.
  4. If the top digit is smaller than the bottom digit, borrow 1 from the next column to the left.
  5. One borrowed hexadecimal unit adds decimal 16 to the current column before subtracting.
  6. Reduce the column that was borrowed from by 1, then continue processing the remaining columns the same way.
  7. Convert any result from 10-15 back into A-F before writing it down.

That's the complete method — the same shape as decimal subtraction, with one borrowed unit worth 16 instead of 10.

How Borrowing Works in Hex Subtraction

This is the one idea worth understanding well, because it's where hex subtraction actually differs from decimal.

In decimal, borrowing 1 from the next column adds 10 to the current column, because each decimal column is worth 10 times the one to its right. In hexadecimal, each column is worth 16 times the one to its right, so borrowing 1 from the next column adds 16 — not 10 — to the current column.

Take a single column where the top digit is 7 and 13 (D in hex) needs to be subtracted from it. Since 7 is smaller than 13, that column borrows:

7 + 16 = 23 decimal
23 - 13 = 10 decimal = A hexadecimal

The column that lent the borrow is then reduced by 1 before it does its own subtraction. Here's that exact situation worked as a full two-digit example, C7₁₆ − 3D₁₆:

  C7
- 3D
----
  8A
  • Rightmost column: 7 − D (13). Since 7 is smaller, borrow: 7 + 16 = 23, then 23 − 13 = 10 decimal = A. Write A, and reduce the next column by 1.
  • Next column: C (12) becomes B (11) after the borrow. B − 3 = 8. Write 8.

Result: 8A₁₆.

Decimal check: C7₁₆ = (12 × 16) + 7 = 199. 3D₁₆ = (3 × 16) + 13 = 61. 199 − 61 = 138. And 8A₁₆ = (8 × 16) + 10 = 128 + 10 = 138. Both totals agree: C7₁₆ − 3D₁₆ = 8A₁₆.

How to Subtract Hexadecimal Numbers Step by Step

Putting the rules into a repeatable process for numbers of any length:

  1. Write the two hex numbers with their rightmost digits aligned, larger number on top.
  2. Start at the rightmost column. Convert any A-F digits to their decimal values.
  3. If the top digit is greater than or equal to the bottom digit, subtract directly and write the hex digit.
  4. If the top digit is smaller, add 16 to it, subtract the bottom digit, and write the hex digit for the result (converting 10-15 back to A-F).
  5. Reduce the next column's top digit by 1 to account for the borrow.
  6. Move one column left and repeat, including any borrow already applied.
  7. Continue until every column has been processed.

Hex Subtraction Without Borrowing

5A₁₆ − 23₁₆

  5A
- 23
----
  37
  • Rightmost column: A (10) − 3 = 7. No borrowing needed.
  • Next column: 5 − 2 = 3. No borrowing needed.

Result: 37₁₆.

Decimal check: 5A₁₆ = (5 × 16) + 10 = 90. 23₁₆ = (2 × 16) + 3 = 35. 90 − 35 = 55. And 37₁₆ = (3 × 16) + 7 = 48 + 7 = 55. Both totals match, confirming 5A₁₆ − 23₁₆ = 37₁₆.

Hex Subtraction With Borrowing

The C7₁₆ − 3D₁₆ = 8A₁₆ example above already walks through a single borrow column by column. The pattern to remember: whenever the top digit is smaller than the bottom digit, add 16 to it before subtracting, then subtract 1 from the next column before processing it.

Multi-Digit Hexadecimal Subtraction Example

Longer numbers can trigger more than one borrow in a row. Here's 3B4₁₆ − 1F7₁₆, which borrows twice:

  3B4
- 1F7
-----
  1BD

Working through it column by column:

ColumnTop digitBottom digitBorrow inResultBorrow out
Rightmost47none4 + 16 − 7 = 13 = Dyes
MiddleB (11), reduced to A (10)F (15)from rightmost10 + 16 − 15 = 11 = Byes
Leftmost3, reduced to 21from middle2 − 1 = 1none
  • Rightmost column: 4 − 7. Since 4 is smaller, borrow: 4 + 16 = 20, 20 − 7 = 13 decimal = D. Reduce the middle column by 1.
  • Middle column: B (11) is reduced to A (10) by the borrow. A − F (15) is still too small, so borrow again: 10 + 16 = 26, 26 − 15 = 11 decimal = B. Reduce the leftmost column by 1.
  • Leftmost column: 3 is reduced to 2 by the second borrow. 2 − 1 = 1.

Reading the columns left to right gives 1BD₁₆.

Decimal check: 3B4₁₆ = (3 × 256) + (11 × 16) + 4 = 768 + 176 + 4 = 948. 1F7₁₆ = (1 × 256) + (15 × 16) + 7 = 256 + 240 + 7 = 503. 948 − 503 = 445. And 1BD₁₆ = (1 × 256) + (11 × 16) + 13 = 256 + 176 + 13 = 445. Both totals agree: 3B4₁₆ − 1F7₁₆ = 1BD₁₆.

This example shows why borrows can cascade: the rightmost column's borrow left the middle column too small as well, which forced a second borrow into the leftmost column.

Hexadecimal Subtraction Examples

A few more verified examples, from simple to borrow-heavy:

Hex subtractionDecimal checkResult
5A₁₆ − 23₁₆90 − 35 = 5537₁₆
A0₁₆ − 5F₁₆160 − 95 = 6541₁₆
C7₁₆ − 3D₁₆199 − 61 = 1388A₁₆
FF₁₆ − 1₁₆255 − 1 = 254FE₁₆
100₁₆ − 1₁₆256 − 1 = 255FF₁₆

The last row is worth a closer look: subtracting 1 from 100₁₆ borrows through two zero columns in a row, since neither can lend on its own until the leftmost column lends first.

How to Check Hex Subtraction Using Decimal

The most reliable way to verify a hex subtraction is to redo it in decimal:

  1. Convert each hex operand to decimal.
  2. Subtract the decimal values.
  3. Convert your hex result to decimal (or the decimal difference back to hex).
  4. Confirm both totals match.

Using the earlier example:

C716 = 199
3D16 = 61
199 - 61 = 138
8A16 = 138

Both sides equal 138, confirming C7₁₆ − 3D₁₆ = 8A₁₆. For longer numbers, the Hex to Decimal Converter and Decimal to Hex Converter make this check quick without doing the place-value math by hand.

Common Hex Subtraction Mistakes

  • Borrowing 10 instead of 16. A habit carried over from decimal — a hex borrow always adds decimal 16 to the current column, not 10.
  • Forgetting that A-F stand for 10-15. Subtracting hex digits as letters instead of converting them to their decimal values first.
  • Forgetting to reduce the column that was borrowed from. Once a column lends a borrow, it must be processed as 1 less than its original value — skipping this changes every column after it.
  • Not chaining a borrow through a zero column. As in 100₁₆ − 1₁₆, a zero column can't lend on its own; it must first borrow from the column to its left before it can lend anything to the right.
  • Misaligning place values. Numbers of different lengths must be lined up by their rightmost digit, not their leftmost one.
  • Mixing decimal and hexadecimal notation. Writing a column's decimal working value (like 23) directly into the answer instead of converting the final result back to a single hex digit.
  • Forgetting to convert 10-15 back to A-F. A column result of 10 needs to be written as A, not left as the number 10.

Hex Addition vs Hex Subtraction

Both operations use the same base-16 place-value system; they just move in opposite directions when a column overflows.

Hex AdditionHex Subtraction
Base1616
Digits available0-9, A-F0-9, A-F
Overflow directionCarries into the next columnBorrows from the next column
Triggers atColumn total of 16 or moreTop digit smaller than bottom digit
Adjustment valueAdds/carries 16Adds 16 to current column, subtracts 1 from next

If addition's carrying rule isn't already familiar, hex addition covers it with the same kind of verified, column-by-column examples used here.

Hex Subtraction and Number Base Converters

Working through borrowing by hand is the best way to actually understand hexadecimal place value, but for longer numbers or a quick double-check, a converter is faster than redoing the column math. Convert both operands to decimal with the Hex to Decimal Converter, subtract, and convert the answer back with the Decimal to Hex Converter — or use the Hex Converter for quick lookups between bases while you check your work.

Frequently Asked Questions

What is hex subtraction?

Hex subtraction is column subtraction performed in base 16 (hexadecimal), the number system that uses sixteen digits: 0-9 and A-F, where A-F stand for decimal 10-15. It works like decimal subtraction, except when a column needs to borrow, it borrows decimal 16 from the next column instead of decimal 10.

How do you subtract hexadecimal numbers?

Align the two hex numbers by their rightmost digit, then subtract column by column from right to left. If the top digit is greater than or equal to the bottom digit, subtract directly. If it's smaller, borrow 1 from the next column to the left (which adds decimal 16 to the current column), subtract, and reduce that next column by 1 before processing it.

How does borrowing work in hexadecimal subtraction?

When a column's top digit is smaller than the digit being subtracted, one unit is borrowed from the column immediately to its left. Because each column represents a power of 16, that borrowed unit is worth decimal 16 in the current column — not 10, as it would be in decimal. The column that was borrowed from is then reduced by 1 before its own subtraction is performed.

Why do you borrow 16 in hexadecimal subtraction?

Hexadecimal is a base-16 positional system, so each column is worth 16 times the column to its right. Borrowing 1 from a column always adds the value of that column's own base to the column being borrowed into — 16 in hex, the same way decimal borrowing always adds 10.

Can hexadecimal subtraction be checked using decimal?

Yes. Convert both hex operands to decimal, subtract the decimal values, then convert your hex answer to decimal (or the decimal difference back to hex) and compare. If both match, the subtraction is correct. The Hex to Decimal Converter and Decimal to Hex Converter make this quick for longer numbers.

What is the difference between hex addition and hex subtraction?

Both use the same base-16 place-value system. Hex addition carries 1 into the next column when a column's total reaches decimal 16. Hex subtraction borrows 1 from the next column, adding decimal 16 to the current column, whenever the top digit is smaller than the digit being subtracted.

Try Our Free SEO Tools

Put what you learned into action with our free SEO analysis tools.