CalcaTools

Hex Calculator | Convert Bases And Perform Hexadecimal Arithmetic

SPONSORED
Add, subtract, multiply and divide hexadecimal numbers, and convert between hex, decimal and binary instantly. Ideal for programmers working with memory addresses, color codes, bit manipulation and embedded systems, with the digit-by-digit working displayed.

Last updated: July 2026 · Free · No sign-up required

SPONSORED
Results

Enter values above and click Calculate to see your result instantly.

Quick reference

Hex to decimal to binary:

HexDecimalBinary
A101010
F151111
1F3111111
FF25511111111
100256100000000

functions Shows the working, not just the answer

For students and teachers, the final number is only half the value. Every math tool here exposes the formula it applied, the intermediate steps, and the rounding rule, so you can follow along, check your homework, or use the answer in a proof or report with confidence.

calculate Accurate to the spec

Calculations use 64-bit floating point with sensible rounding for the domain (currency to 2 decimals, percentages to 4 decimals, algebra to 6 significant figures). Where exact rational arithmetic matters — fractions, factorials, simplification — we use a dedicated BigNumber path so 1/3 + 1/6 returns ½, not 0.49999.

school Free for classroom use

Educators are welcome to link to any math calculator on CalcaTools from a class site, Google Classroom, or worksheet. The pages are mobile-friendly, free, ad-supported (so we can keep them free) and have no sign-up wall — students just click and use them in class or at home.

tips_and_updates Pair with the spoke articles

Below the calculator we link a small set of plain-English explainer pages — "What is a percentage?", "Why does PEMDAS matter?", and so on. They cover the underlying concept in 4–6 short paragraphs. Read those before the calculator if the topic is new, or after if you want the extra context.

Interpretation guide

Where hexadecimal is used:

UseExample
Color codes#FF8800 in CSS
Memory addresses0x7FFE in programming
MAC addresses1A:2B:3C:4D:5E:6F
Byte values0x00 to 0xFF (0–255)

lightbulb Worked example: brightening a hex color

Add #0F0F0F to #1A2B3C to lift each RGB channel by 15. Add per channel in hex with carries at 16: red 1A + 0F → A(10)+F(15) = 25 = 0x19, write 9 carry 1, then 1+0+1 = 2 → 0x29. Green 2B + 0F → 0x3A. Blue 1A + 0F → 0x29. Decimal check: 0x1A2B3C = 1,715,004; 0x0F0F0F = 986,895; sum = 2,701,899 = 0x293A4B.

Result: #1A2B3C + #0F0F0F = #293A4B.

What this means: Each channel rose by exactly 15 (0x0F): red 26→41, green 43→58, blue 60→75. Doing the math in hex keeps the color channels aligned — the decimal sum 2,701,899 gives the same answer but hides the per-channel structure.

Formula & methodology

Formula: Each hex digit is 4 bits; decimal value = sum of digit x 16^position (right to left)

How hex conversion works

Hexadecimal is base 16: digits 0–9, then A–F for values 10–15, each digit holding exactly 4 bits.

Decimal value = Σ digit × 16^position (positions counted right to left from 0)

  • 0x2B = 2 × 16 + 11 = 43; 0xFF = 15 × 16 + 15 = 255.
  • Binary converts in groups of four bits: 0xA5 = 1010 0101.
  • Arithmetic runs directly in hex with carries at 16: 0x1A + 0x2B = 0x45.

Reading the result

Six-digit hex colors split into RGB byte pairs — #293A4B is red 0x29 (41), green 0x3A (58), blue 0x4B (75). Memory addresses print in hex because 8 digits replace 32 binary ones, e.g. 0x7FFF0000.

Authoritative source: Wolfram MathWorld

Frequently asked questions

How do I convert hex to decimal?
Enter the required values into the input fields and press the calculate button. The tool applies the formula Each hex digit is 4 bits; decimal value = sum of digit x 16^position (right to left) and returns the result with a short explanation of each step, so you can check the working yourself.
What does 0x mean before a number?
The Hex Calculator is a free online tool that this hex calculator converts between hexadecimal, decimal, and binary, and performs arithmetic — addition, subtraction, multiplication, division — on hexadecimal values directly. enter numbers in any base and it shows the full conversion working; ideal for. You enter a few values, and it returns an accurate result together with a step-by-step explanation, so it works as both a calculator and a quick reference for the underlying concept.
Why is hex used for color codes?
The Hex Calculator is free, private, and accurate: it runs entirely in your browser (no uploads, no accounts), applies the standard calculation, and explains each step so you can verify the result. This hex calculator converts between hexadecimal, decimal, and binary, and performs arithmetic — addition, subtraction, multiplication, division — on hexadecimal values directly. Enter numbers in any base and it shows the full conversion working; ideal for There is no limit on usage, and it works on any device.
How do I add two hex numbers?
Add the digits from right to left in base 16, carrying when a column reaches 16 instead of 10. For example, 0x2F + 0x1A: F + A = 25 decimal = 0x19, so write 9 and carry 1; 2 + 1 + 1 = 4. The result is 0x49. The calculator does this digit by digit and shows the carries, and it handles subtraction, multiplication, and division the same way.
How many bits is one hex digit?
Exactly 4 bits — because 16 = 2⁴. Each hex digit maps to a 4-bit nibble: 0 is 0000, 5 is 0101, F is 1111. This clean 4-to-1 mapping is why programmers use hex to read binary: an 8-bit byte is exactly two hex digits (like 0xFF), and a 32-bit address is exactly eight. The calculator uses this mapping for its binary-hex conversions.
How does subtraction work in hexadecimal?
Same borrowing as decimal, but a borrow is worth 16. Computing 3A2 − 1FF: in the ones column 2 − F needs a borrow, giving 18₁₆ − F = 3 (18 hex = 16 + 2 = 18 decimal, minus 15 = 3); continue left for 1A3. Programmers often sidestep manual borrows via two's complement — add the complement instead of subtracting — which is what the calculator verifies.
How do you add two hex numbers by hand?
Add digit by digit in base 16, carrying at 16 instead of 10. 0x1A + 0x2B: A(10) + B(11) = 21 = 0x15, write 5 carry 1; 1 + 2 + 1 = 4 — result 0x45. Check in decimal: 26 + 43 = 69 = 0x45. The calculator shows each column's working.
What is 0xFF plus one, and why does it matter?
0x100 = 256 — the value overflows a single byte back to 0x00 in 8-bit arithmetic, which is exactly how byte counters wrap. Programmers meet this in checksums, pixel math, and embedded counters. The calculator flags when results exceed your chosen bit width.
How do you convert a hex color to RGB?
Split the six digits into pairs: #293A4B means red = 0x29 = 41, green = 0x3A = 58, blue = 0x4B = 75. Each pair is one byte (0–255), since two hex digits hold exactly 8 bits. Adding #0F0F0F to #1A2B3C brightens every channel by 15, giving #293A4B.
Why do memory addresses use hex?
Because each hex digit is exactly 4 bits (a nibble), so a 32-bit address fits in 8 hex digits instead of 32 binary ones. 0x7FFF0000 reads instantly as bytes 7F FF 00 00, while the binary equivalent is a wall of digits. Debuggers, dumps, and disassemblers all print addresses in hex for this reason.

Explore the full math toolkit

Every CalcaTools math calculator — algebra, geometry, trigonometry, statistics, sequences, and unit conversions — with step-by-step workings on every result.