The calculators below add, subtract, multiply, and divide hexadecimal numbers, and convert values between the hexadecimal (base-16) and decimal (base-10) number systems.
The hex calculator on this page does two jobs. First, it performs arithmetic — addition, subtraction, multiplication, and division — directly on hexadecimal numbers, showing both the hexadecimal answer and the decimal equivalent of every step. Second, it converts values in both directions between the hexadecimal (base-16) and decimal (base-10) number systems. Whether you are a programmer decoding a memory address, a student learning number bases, or a designer working with color codes, these tools take the tedium and error out of working in hex.
Hexadecimal is everywhere in computing, yet it is awkward to compute by hand because our intuition is built around base 10. This calculator lets you work in hex as naturally as you would with ordinary numbers, and by displaying the decimal translation alongside every result, it doubles as a learning aid for understanding how the two systems relate.
The hexadecimal system functions virtually identically to the decimal and binary systems, except that instead of using a base of 10 or 2, it uses a base of 16. It uses sixteen distinct symbols to represent values: the digits 0 through 9 for values zero to nine, and the letters A, B, C, D, E, and F for values ten to fifteen. So A is 10, B is 11, C is 12, D is 13, E is 14, and F is 15.
Just as each position in a decimal number represents a power of 10, each position in a hexadecimal number represents a power of 16. Reading from the right, the positions are worth 1 (16&sup0;), 16 (16¹), 256 (16²), 4096 (16³), and so on. The hex number 8AB, for example, means 8×256 + 10×16 + 11×1 = 2048 + 160 + 11 = 2219 in decimal.
Computers work in binary — strings of 1s and 0s — but binary is unwieldy for humans to read and write because the numbers get long very quickly. Hexadecimal is the perfect shorthand, because one hex digit corresponds exactly to four binary digits (bits). A single byte, which is eight bits, is represented by exactly two hex digits, ranging from 00 to FF (0 to 255 in decimal). This clean mapping makes hex far more compact and readable than binary while preserving the underlying structure.
You will encounter hexadecimal in many places: memory addresses in programming and debugging, color codes in web design and graphics (like #FF5733), MAC addresses that identify network hardware, error codes, character encodings such as Unicode code points, and the raw contents of files viewed in a hex editor. Understanding hex is a foundational skill for anyone working close to the machine.
Arithmetic in hexadecimal follows exactly the same rules as decimal arithmetic — you just carry and borrow in groups of 16 instead of 10. When adding, if a column sum reaches 16 or more, you carry 1 to the next column. When subtracting, borrowing brings 16 from the next column rather than 10. Multiplication and division work the same way conceptually, though they are more tedious by hand, which is exactly why a calculator helps.
Our calculator handles all four operations. For addition, 8AB + B78 = 1423 (or 2219 + 2936 = 5155 in decimal). For subtraction, results can be negative, shown with a minus sign. For multiplication, the numbers can grow large quickly. For division, because hexadecimal integer division works like whole-number division, the calculator returns both a quotient and a remainder — for example, B78 ÷ 8AB = 1 remainder 2CD.
To convert a hex number to decimal, multiply each digit by its positional value (a power of 16) and add the results. For DAD: D is 13, A is 10, D is 13, so 13×256 + 10×16 + 13×1 = 3328 + 160 + 13 = 3501. The calculator does this instantly for numbers of any size.
To convert a decimal number to hex, repeatedly divide by 16 and record the remainders, reading them from last to first. For 170: 170 ÷ 16 = 10 remainder 10 (A), and 10 ÷ 16 = 0 remainder 10 (A), giving AA. Again, the calculator handles this automatically, including very large values.
Hex input is not case-sensitive — you can type either uppercase or lowercase letters. The calculators work with integer values; hexadecimal, like binary, is typically used for whole numbers in computing contexts.
One of the most common places non-programmers meet hexadecimal is in web and graphic design. Colors are frequently written as six-digit hex codes preceded by a hash, such as #1A73E8. The six digits break into three pairs, each representing the intensity of red, green, and blue from 00 (none) to FF (maximum, or 255 in decimal). So #FF0000 is pure red, #00FF00 is pure green, and #0000FF is pure blue. Converting these pairs to decimal with this calculator tells you the exact RGB values — FF becomes 255, 1A becomes 26, and so on — which is handy when moving between design tools that use different color formats.
Understanding hexadecimal is easier when you see how the three main number systems relate. Decimal (base 10) is what humans use daily, with digits 0–9. Binary (base 2) is what computers use internally, with just 0 and 1. Hexadecimal (base 16) is the bridge between them, chosen precisely because 16 is a power of 2 (24), so each hex digit maps cleanly onto a group of four binary bits. This clean grouping is the whole reason hex exists as a convenience layer: it compresses long binary strings into something short and readable without losing the underlying bit structure.
For example, the decimal number 202 is 11001010 in binary. Splitting that binary into two four-bit groups gives 1100 and 1010, which are C and A in hex — so 202 is CA in hexadecimal. Notice how the eight binary digits collapse into just two hex digits. This is why programmers reach for hex constantly: reading "CA" is far less error-prone than reading "11001010", yet both describe exactly the same value.
While the idea of a base-16 system is old, hexadecimal came into its own with the rise of digital computing in the mid-twentieth century. Early computers organized memory into bytes of eight bits, and engineers needed a compact way to write byte values. Since one byte splits neatly into two groups of four bits, and each four-bit group has exactly sixteen possible values, base 16 was the natural fit. The convention of using the letters A through F for the values ten through fifteen was adopted so that each hex digit could be written as a single character, and it has been standard ever since. Today, hexadecimal notation is woven into nearly every corner of computing, from assembly language and memory dumps to web colors and cryptographic keys.
Because two hex digits represent exactly one byte (eight bits), hexadecimal is the natural language for describing data at the byte level. A single byte ranges from 00 to FF, or 0 to 255 in decimal. Larger values simply use more hex digit pairs: a 16-bit value (two bytes) spans 0000 to FFFF (0 to 65,535), and a 32-bit value uses eight hex digits. This is why memory addresses and data sizes are so often quoted in hex — the notation aligns perfectly with how computers group bits into bytes and words. When you see an address like 0x1A2B3C4D, the "0x" prefix simply signals that what follows is hexadecimal, a convention used in many programming languages.
Although this calculator does the work instantly, understanding the manual process builds intuition. To go from hex to decimal, write each digit's value and multiply by the appropriate power of 16, then sum — the rightmost digit is the ones place (160), the next is the sixteens place (161), and so on. To go from decimal to hex, repeatedly divide the number by 16, writing down each remainder; the remainders read from bottom to top give the hex digits, with remainders 10–15 written as A–F. A handy shortcut for converting through binary is to translate each hex digit into its four-bit pattern (or vice versa), since the four-bit groupings never cross digit boundaries.
It is fair to ask why computing bothers with hexadecimal at all when everyone already knows decimal. The answer is alignment: decimal does not map cleanly onto binary, because 10 is not a power of 2. A decimal digit can require an awkward, variable number of bits, and the boundaries between decimal digits do not line up with the boundaries between bits. Hexadecimal, being base 16 (24), lines up perfectly — every hex digit is exactly four bits, and every byte is exactly two hex digits, with no ragged edges. That makes hex the ideal human-friendly window onto binary data, combining the compactness computers need with the readability people want. Decimal remains best for everyday counting and math, but for anything close to the hardware, hex wins.
Hexadecimal is a base-16 number system that uses sixteen symbols: the digits 0–9 and the letters A–F, where A–F represent the decimal values 10–15. Each position represents a power of 16.
Because one hex digit maps exactly to four binary bits, hexadecimal is a compact, human-readable shorthand for the binary data computers actually use. Two hex digits represent one byte, which makes memory addresses, color codes, and raw data much easier to read than long binary strings.
Multiply each hex digit by its positional value (1, 16, 256, 4096, … from right to left) and add the products. For example, 1F = 1×16 + 15×1 = 31. The hex-to-decimal tool above does this for you.
Because the calculator performs integer (whole-number) division, just as it would with ordinary integers. The result is a quotient plus a remainder — for instance, B78 ÷ 8AB = 1 remainder 2CD — rather than a fractional value.
No. You can enter the letters A–F in uppercase or lowercase; the calculator treats them the same. Results are displayed in uppercase by convention.
The calculators handle very large values with full precision, well beyond what everyday use requires, so you can compute with long hex strings and big decimal numbers without losing accuracy.
This Hex Calculator is provided for educational and general informational purposes. It performs integer hexadecimal arithmetic and base conversion. Always double-check critical values in professional or safety-sensitive contexts.