Type a tool name, for example "keyword density" or "transcript".
Enter two hexadecimal values and select an operation to calculate the result in hex, decimal, binary and octal.
This hex calculator lets you add, subtract, multiply, divide and run bitwise operations on two hexadecimal numbers. It is made for programmers, students and web developers who need a fast answer. Every result appears in hex, decimal, binary and octal at the same time, and you do not need to sign in.
Hexadecimal is a base-16 number system that uses the digits 0 to 9 and the letters A to F, where A is 10 and F is 15. Each position in a hex number is worth a power of 16, just as each position in a decimal number is worth a power of 10.
To convert a hex number to decimal by hand, multiply each digit by its place value and add the results. For 1A2F, the calculation is 1 × 4096 + 10 × 256 + 2 × 16 + 15 = 6703. The same number written in decimal is 6703.
Programmers like hex because one hex digit equals exactly four binary digits, so one byte is always two hex digits. FF is 255, the largest value a byte can hold. That is why you see hex in memory addresses, file signatures, network masks, error codes and web color codes such as #FF8800. The prefix 0x marks a number as hex in many programming languages, and the calculator shows it beside each input so you only type the digits.
You can finish a calculation in four short steps: enter value A, pick an operation, enter value B and read the results.
You can type lowercase letters, because the fields convert them to uppercase. Any character that is not 0 to 9 or A to F is removed as you type, so a stray space or a pasted 0x prefix will not break the calculation.
Adding 1A2F and FF gives 1B2E in hex, which is 6958 in decimal. Here is what you see and why it is correct.
Now try the same inputs with XOR. 1A2F XOR FF flips the lowest eight bits of A, so the result is 1AD0 (6864 in decimal). The top byte, 1A, is untouched because B has zeros there. That is the pattern behind many masking and toggling tasks.
Each result line answers a different question, so choose the one that matches your task. Hexadecimal is the answer in the same notation you typed. Decimal is the everyday number, useful for sanity checks. Binary shows the individual bits, and octal is handy for Unix file permissions and older systems.
| Operation | Example | Result |
|---|---|---|
| Add | FF + 01 | 100 |
| AND | FF AND 0F | F |
| Shift Left | 1 << 4 | 10 |
AND keeps only the bits that are set in both values, which is how you isolate a field or apply a mask. OR sets a bit if it is set in either value. XOR sets a bit only when the two values differ. Shift Left by n moves the bits n places up, which doubles the value for each step. Shift Right moves them down, which halves the value for each step and drops any remainder.
A hexadecimal calculator saves time whenever you work with values that are written in base 16 but need arithmetic or bit logic.
If you want to practice the same operations in base 2, the binary calculator works the same way, and the binary translator turns binary into readable text.
Most surprising results come from one of a few input habits, and each has a quick fix.
The calculator is designed for everyday programming and learning tasks, and a few limits apply to very large numbers. Values with more than about 13 hex digits can lose precision, especially after multiplication or a large power. Bitwise operations and shifts work on 32-bit numbers, so a result above FFFFFFFF will not be reliable. The binary line also shows only the low 32 bits for large or negative results.
The tool accepts hexadecimal input only, so it will not turn a decimal number into hex on its own. It also does not handle fractions or hex digits after a point. For long hashes or cryptographic work, use a dedicated big-number library instead.
Enter your two values above, choose an operation and press Calculate to see the answer in four number systems. For more utilities like this one, browse the full online calculators and utilities collection.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market