Adding hex: 1F + 2A
1F = 31, 2A = 42. Sum: 31 + 42 = 73 = 49₁₆. Or in hex: 1F + 2A: F+A=19, write 9 carry 1; 1+2+1=4. Result: 49₁₆. Common operation in CPU adders.
Add, subtract, multiply or divide hexadecimal numbers and convert between hex, decimal, binary and octal. Hex is the standard notation for memory addresses, colour codes and binary data because each hex digit maps to exactly 4 bits.
Digits 0-9, A-F (case-insensitive)
Digits 0-9, A-F (case-insensitive)
A in decimal
255
B in decimal
26
Result (hex)
119
Decimal
281
Binary
100011001
Octal
431
Hexadecimal (base 16) is the compact notation programmers use for binary data. Memory addresses (0x7FFE3F2A), MAC addresses (00:1A:2B:3C:4D:5E), CSS colour codes (#FF5733), Bitcoin transaction hashes, JavaScript Object IDs, UUIDs - all use hex. Why hex over decimal? Because one hex digit equals exactly 4 binary bits - clean mapping that makes byte-level work fast and readable. Two hex digits = one byte = values 0-255. Four hex digits = 16 bits = 0-65,535. Eight hex digits = 32 bits = a memory address on a 32-bit system.
This calculator handles all four arithmetic operations on hex numbers plus modulo, with results shown in hex, decimal, binary and octal simultaneously. Indian B.Tech CSE/IT/ECE students study hex in digital electronics, computer organisation, and embedded systems courses. Software engineers use hex constantly when debugging memory issues, reading hex dumps, working with byte arrays, computing colour codes, or working with cryptographic hashes. The BigInt backend means you can compute on hex values of arbitrary length without overflow - useful for very large numbers like SHA-256 hashes (64 hex digits).
Enter two hexadecimal numbers (0-9, A-F).
Pick an operation: +, −, ×, ÷, mod.
See the result in hex, decimal, binary and octal.
Hex inputs are validated and parsed digit by digit. Each position is worth 16^n. The arithmetic happens in BigInt for accuracy, then the result is formatted in all four bases.
Hex uses base 16: digits 0-9 then A=10, B=11, …, F=15. FF₁₆ = 15×16¹ + 15×16⁰ = 255
Hex uses 16 digits: 0-9 followed by A, B, C, D, E, F (or lowercase a-f, equivalent). Each position represents a power of 16. Right to left: position 0 worth 1 (16⁰), position 1 worth 16 (16¹), position 2 worth 256 (16²), position 3 worth 4,096 (16³). So FF₁₆ = F×16 + F×1 = 15×16 + 15 = 255 in decimal.
Conversion between hex and binary is mechanical: each hex digit maps to exactly 4 bits. 0=0000, 1=0001, 2=0010, ..., 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. So 3FA₁₆ = 0011 1111 1010₂. Reverse: group binary into 4-bit chunks from the right and convert each. This mapping is why programmers prefer hex - converting between hex and binary is trivial; between decimal and binary requires division.
Common uses: CSS colours use 6 hex digits (RRGGBB) representing 24-bit RGB - e.g., #FF5733 means red=FF (255), green=57 (87), blue=33 (51). Memory addresses on 64-bit systems use 16 hex digits (0x0000000000000000 to 0xFFFFFFFFFFFFFFFF). MAC addresses use 12 hex digits in 6 colon-separated pairs. UUIDs use 32 hex digits in 8-4-4-4-12 pattern. Each context just adopts hex for its byte-level convenience.
1F = 31, 2A = 42. Sum: 31 + 42 = 73 = 49₁₆. Or in hex: 1F + 2A: F+A=19, write 9 carry 1; 1+2+1=4. Result: 49₁₆. Common operation in CPU adders.
Red: 4A₁₆ = 74. Green: 90₁₆ = 144. Blue: E2₁₆ = 226. In CSS: rgb(74, 144, 226). Reverse: any RGB tuple converts to a hex colour code.
DEADBEEF₁₆ = 3,735,928,559 decimal = 11011110101011011011111011101111₂. Classic 'magic number' used by programmers to mark allocated memory. 32 bits = 8 hex digits.
Hex is a compact way to write binary. 8 bits (one byte) takes 8 binary digits but only 2 hex digits. Memory dumps and colour codes use hex for compactness.
CSS colours like #FF5733 are 3 bytes - RR (red), GG (green), BB (blue), each 0-255 (00-FF in hex).
Yes - a-f and A-F are equivalent. The calculator normalises both to uppercase in the result.
C/C++/JavaScript prefix 0x marks a hex literal. The calculator accepts hex digits directly without the prefix.
Replace each hex digit with its 4-bit binary equivalent. F = 1111, A = 1010. So FA = 11111010.
Compact binary representation. A 48-bit MAC address would be unwieldy in binary (50 chars) but fits neatly in 12 hex digits.
From simple percentages to scientific notation, statistics, geometry and big-number arithmetic - every common math problem you'd reach for a calculator for, runs in your browser with no installs. The fraction calculator preserves exact rationals, the big-number calculator uses BigInt for hundreds of digits without precision loss, and the scientific calculator's expression evaluator is a hand-written shunting-yard parser (no eval) that supports trig, log, factorial and parentheses.
If you're a student, double-check your work without paying for a graphing calculator. If you're a professional, use these tools as a sanity check on spreadsheet formulas. Every result is shown alongside its formula and inputs, so the math is always auditable.
The Hex Calculator is part of the Math suite on Online Calculator Tools, alongside 6 related calculators. All tools share the same UI patterns, the same privacy-first rendering (nothing is sent to a server), and the same commitment to showing the formula and assumptions behind every result.