Perform hexadecimal calculations instantly — add, subtract, multiply, and divide hex numbers. Convert between hex, decimal, and binary with step-by-step solutions. Free online hex calculator for programmers and students.
Hexadecimal Calculation—Add, Subtract, Multiply, or Divide
The hexadecimal number system (hex) functions virtually identically to the decimal and binary systems. Instead of using a base of 10 or 2 respectively, it uses a base of 16. Hex uses 16 digits including 0-9, just as the decimal system does, but also uses the letters A, B, C, D, E, and F (equivalent to a, b, c, d, e, f) to represent the numbers 10-15. Every hex digit represents 4 binary digits, called nibbles, which makes representing large binary numbers simpler. For example, the binary value of 1010101010 can be represented as 2AA in hex. This helps computers to compress large binary values in a manner that can be easily converted between the two systems.
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
So you've got a hex calculator in front of you. Maybe you're staring at a bunch of letters and numbers like A3F or 1C4 and thinking, "What in the world is this?"
Don't worry. You're not alone.
Hexadecimal (or hex for short) looks weird at first. But once you get the hang of it, it's actually pretty simple. And our free hex calculator is here to do all the heavy lifting for you.
Whether you need to add, subtract, multiply, or divide hex numbers, or just convert them to decimal or binary, this tool has you covered.
A hex calculator is a tool that works with hexadecimal numbers. Instead of the regular 0-9 you're used to, hex uses 0-9 and the letters A through F.
Here's the deal:
That's it. That's the whole secret. Once you know that A through F are just numbers 10 through 15, hex starts making a lot more sense.
Good question. You might be thinking, "Why can't I just use a regular calculator?"
Here's the thing: hex is everywhere in computing. If you're a programmer, a web designer, or just someone who likes to tinker with computers, you'll run into hex all the time.
Ever seen something like #FF5733? That's a hex color code. The first two digits (FF) tell you how much red is in the color. The next two (57) tell you how much green. The last two (33) tell you how much blue. Our hex calculator can help you figure out what those numbers mean.
When you're debugging code or working with computer memory, addresses are almost always shown in hex. It's just easier to read than a long string of 1s and 0s.
Every device that connects to the internet has a unique MAC address. And yep, it's written in hex.
If you're learning how computers actually work at the hardware level, you'll be living in hex world.
Using our calculator is super straightforward. Here's how:
Say you want to add A3 and 1F.
First, let's convert them to decimal so you can see what's happening:
Now convert 194 back to hex. 194 ÷ 16 = 12 remainder 2. 12 in hex is C. So the answer is C2.
Type A3 + 1F into our hex calculator and you'll get C2 instantly. No mental math required.
Okay, so you want to understand the math behind the calculator. Smart move. Here's how hex arithmetic works in plain English.
Adding hex numbers is just like adding regular numbers, except you have to remember that A through F are numbers too.
Here's a quick example: 7 + 8 = ? In decimal, 7 + 8 = 15. But in hex, 15 is written as F. So 7 + 8 = F in hex.
Another one: 9 + A = ? 9 + 10 = 19 in decimal. 19 ÷ 16 = 1 remainder 3. So in hex, it's 13 (that's 1 sixteen and 3 ones).
See? Not so scary.
Subtraction works the same way, but you might need to borrow. And borrowing in hex can trip people up.
Let's say you want to subtract 1A from 3C. Start from the right: C (12) minus A (10) = 2. Easy. Now the left: 3 minus 1 = 2. So 3C - 1A = 22 in hex. That's 34 in decimal.
But what if you need to borrow? Say 21 - 1A. Right column: 1 minus A (10). You can't do that without borrowing. So you borrow 1 from the 2 in the left column. That borrowed 1 is worth 16 in the right column. Now the right column is 1 + 16 = 17. 17 minus 10 (A) = 7. Left column: 1 minus 1 = 0. So 21 - 1A = 7 in hex.
That borrowing part is where most people get confused. Our hex calculator handles all that for you.
Multiplication in hex is trickier because you're working with bigger numbers. The calculator is your best friend here.
But here's a simple one: 5 × 3 = ? 5 × 3 = 15 in decimal. 15 in hex is F. So 5 × 3 = F.
Another: A × 2 = ? 10 × 2 = 20 in decimal. 20 ÷ 16 = 1 remainder 4. So in hex, it's 14.
Division works the same way as in decimal, but again, you're working with base 16. Our calculator handles this easily.
Our hex calculator doesn't just do arithmetic. It also converts between number systems.
To convert hex to decimal, multiply each digit by 16 raised to its position (starting from 0 on the right).
Example: Convert 2F to decimal.
To convert decimal to hex, divide by 16 repeatedly and keep the remainders.
Example: Convert 47 to hex.
Each hex digit represents exactly 4 binary digits (bits).
Example: Convert A3 to binary.
This is why computers love hex. It's a shortcut for writing long binary numbers.
I've seen these mistakes over and over. Here's what to watch out for:
Mistake #1: Forgetting that A-F are numbers. When you see "A" in a hex number, don't think of it as a letter. Think of it as the number 10.
Mistake #2: Messing up the borrow in subtraction. When you borrow in hex, you're borrowing 16, not 10. That's the most common error.
Mistake #3: Confusing hex with decimal. The number 10 in hex is not the same as 10 in decimal. 10 in hex equals 16 in decimal.
Mistake #4: Forgetting to convert back. If you're working on a problem and get an answer like "1A," make sure you know whether that's in hex or decimal.
Use the conversion feature to check your work. If you're doing hex arithmetic by hand, convert your answer to decimal and see if it makes sense.
Remember that hex is just a different way to write the same number. The quantity doesn't change. 10 apples is still 10 apples whether you write it as 10 in decimal or A in hex.
Practice with small numbers first. Start with single-digit hex numbers (0-F) before moving to two-digit numbers.
Use the calculator for big numbers. Once you get past two digits, doing hex arithmetic in your head gets really hard. That's what the calculator is for.
Here's something cool: the word "hexadecimal" comes from "hexa" (Greek for six) and "decimal" (Latin for ten). So it literally means "six and ten" - which makes sense because it's base 16.
Also, did you know that early computer programmers used hex because it was easier to read than binary? A single hex digit represents four binary digits. So instead of writing 111100001010, you can just write F0A. Way easier to read, right?
You're learning how hex works. The practice helps it stick.
You need the answer fast, you're working with big numbers, or you just want to double-check your work.
There's no shame in using a calculator. Even professional programmers use them all the time.
Computers work in binary (1s and 0s), but binary numbers get really long really fast. Hexadecimal is a shortcut. One hex digit equals four binary digits, so it's much easier for humans to read and write. Plus, hex maps perfectly to bytes (two hex digits = one byte), which makes it super useful for memory addresses and color codes.
Just enter your first hex number, click the plus sign, enter your second hex number, and hit equals. Our hex calculator handles everything automatically. If you're doing it by hand, remember that A=10, B=11, C=12, D=13, E=14, and F=15. Add column by column from right to left, and carry over when you hit 16.
Decimal is base 10 (uses digits 0-9). Hex is base 16 (uses digits 0-9 and letters A-F). In decimal, when you get to 9, the next number is 10. In hex, when you get to F (which is 15), the next number is 10 (which equals 16 in decimal). Same quantity, different way of writing it.
Multiply each hex digit by 16 raised to its position (starting from 0 on the far right). For example, to convert 2F: 2 × 16¹ = 32, plus F × 16⁰ = 15, equals 47. It's that simple. Just remember that A=10, B=11, C=12, D=13, E=14, and F=15.
When you subtract and the top digit is smaller than the bottom digit, you borrow from the next column to the left. In hex, when you borrow, you're borrowing 16 (not 10 like in decimal). For example, in 21 - 1A, you borrow from the 2 to make the 1 into 17, then subtract A (10) to get 7.