Loading page...
Loading page...
Add, subtract, multiply, and divide hexadecimal numbers. Convert between hex, decimal, binary, and octal instantly. Essential for programmers and web developers.
Everything you need to know
Hexadecimal (base-16) is the preferred number system for programmers, web developers, and digital designers. Unlike binary's long strings of 0s and 1s, hex compresses data into a more readable format while maintaining a direct relationship with binary (each hex digit represents exactly 4 bits).
Our hex calculator lets you:
Hex uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15).
| Hex | Decimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
Add digit by digit, carrying when the sum reaches 16:
Example: A3F + 2B5
¹ ¹ (carries)
A3F (2623 in decimal)
+ 2B5 (693 in decimal)
-----
CF4 (3316 in decimal)
Step by step:
Example: CF4 - A3F
CF4 (3316 in decimal)
- A3F (2623 in decimal)
-----
2B5 (693 in decimal)
Multiply each digit by 16 raised to its position power:
Example: Convert 2A7F to decimal
Divide by 16 repeatedly and record remainders:
Example: Convert 3500 to hex
Read remainders bottom to top: DAC
CSS color codes use hex to represent RGB values:
| Color | Hex Code | RGB |
|---|---|---|
| Red | #FF0000 | rgb(255, 0, 0) |
| Green | #00FF00 | rgb(0, 255, 0) |
| Blue | #0000FF | rgb(0, 0, 255) |
| White | #FFFFFF | rgb(255, 255, 255) |
| Black | #000000 | rgb(0, 0, 0) |
| Gray | #808080 | rgb(128, 128, 128) |
Example: Convert rgb(173, 216, 230) to hex
| Application | Example |
|---|---|
| Memory addresses | 0x7FFF5E2C (RAM location) |
| MAC addresses | 00:1A:2B:3C:4D:5E |
| IPv6 addresses | 2001:0db8:85a3::8a2e:0370:7334 |
| Unicode | U+1F600 (😀 emoji) |
| Error codes | 0x80070005 (Windows access denied) |
| File signatures | 0x89504E47 (PNG file header) |
| Assembly language | MOV AX, 0x4C00 |
Different languages and systems denote hex differently:
| Prefix/Suffix | Used In |
|---|---|
0x | C, C++, Java, Python, JavaScript |
&H | Visual Basic |
# | HTML/CSS colors |
$ | Pascal, some assemblers |
0h | Some calculators |
h suffix | Assembly language |
To master this calculator and its underlying concepts, it's important to understand the broader mathematical principles at work.
Key Learning Points:
When using mathematical calculators, understanding the fundamental concepts behind the calculations helps you:
Building Problem-Solving Skills:
Effective problem-solving with mathematical tools involves:
Consider these realistic scenarios where mathematical calculators prove invaluable:
In Academic Settings:
In Professional Contexts:
In Personal Projects:
When working with mathematical calculations:
Input Errors:
Misunderstanding the Result:
Incorrect Application:
Overlooking Related Concepts:
Mathematical understanding grows through consistent practice:
Building Competence:
Resources for Deeper Learning:
Developing Mathematical Intuition:
Convert decimal 255 to hexadecimal.
Solution:
Convert hexadecimal 1A to decimal.
Solution:
Decimal = (d₀ × 2⁰) + (d₁ × 2¹) + (d₂ × 2²) + ... + (dₙ × 2ⁿ)
Where each d is either 0 or 1.
Repeatedly divide by 2 and record remainders, then read remainders from bottom to top.
Each hexadecimal digit represents 4 binary digits (bits).
Each octal digit represents 3 binary digits (bits).
Hex is more compact and readable. One hex digit represents 4 binary digits, so FF is much easier to read than 11111111.
Decimal is base-10 (digits 0-9) which humans use daily. Hex is base-16 (digits 0-9, A-F) which aligns perfectly with binary and is used in computing.
A byte is 8 bits, which equals exactly 2 hex digits (since each hex digit = 4 bits).
FFFFFFFF = 4,294,967,295 (unsigned) or -1 (signed two's complement).
Yes. a3f and A3F represent the same value. Uppercase is more common in programming.
This calculator is provided for informational and educational purposes only. Results are calculated based on standard mathematical formulas and your inputs. While we strive for accuracy, we do not guarantee that results are error-free. Always verify important calculations independently. Users are responsible for the accuracy of their inputs and should consult appropriate references or professionals for critical applications. We are not liable for any decisions made based on these calculations.
Binary addition, subtraction, multiplication, division.
Advanced math operations.
Convert numbers to scientific notation.
Convert numbers to Roman numerals.