Developer · Hexadecimal

Hex calculator.

Add, subtract, multiply or divide two hexadecimal numbers and see the answer in hex, decimal, binary and octal. Division gives the quotient and the remainder. You can switch the base to binary, octal or decimal. Whole numbers of up to 300 digits are exact. Runs in your browser; nothing is sent.

1A × 2B in hex is 45E, which is 26 × 43 = 1,118 in decimal. FF + 1 = 100 (255 + 1 = 256). FF ÷ 10 = F remainder F (255 ÷ 16 = 15 remainder 15).

Digits 0-9 and A-F (A = 10 ... F = 15)Exact up to 300 digitsOpened sources 8 October 2026

Advertisement

Your numbers

Whole numbers only. A 0x prefix and a minus sign are allowed.

Your answer

Fill the form and press Calculate.

How hexadecimal arithmetic works

Hexadecimal is base 16: the digits are 0 to 9 and then A to F for the values 10 to 15. Arithmetic follows the same rules as decimal, with carries at 16 instead of 10. Adding F + 1 gives 10 in hex (15 + 1 = 16, which is one sixteen and no ones), so FF + 1 = 100. A reliable way to check any answer is to convert both numbers to decimal, do the sum there, and convert back, which is exactly what this calculator shows in its extra output boxes.

Subtraction and division

Subtracting a larger number from a smaller one gives a negative result shown with a minus sign (5 − A = −5), not as a two’s complement bit pattern; for fixed-width signed values use the two’s complement calculator. Division is whole-number division: the quotient is rounded toward zero and the remainder is shown, so FF ÷ 10 is F remainder F. For fractional results use the number base converter on the decimal answer.

Worked examples

Add: FF + 1 = 100, since 255 + 1 = 256. Multiply: 1A × 2B: 1A is 26 and 2B is 43, 26 × 43 = 1,118, and 1,118 is 4 × 256 + 5 × 16 + 14, so 45E. Divide: FF ÷ 10: 255 ÷ 16 = 15 remainder 15, so quotient F and remainder F. Subtract: 5 − A = −5, because 5 − 10 = −5.

Sources, opened 8 October 2026: Wikipedia, Hexadecimal (hexadecimal is base 16 with the digits 0 to 9 and the letters A to F for the values 10 to 15); Wikipedia, Positional notation (positional notation and conversion between bases); MDN Web Docs, Number.prototype.toString() (bases 2 through 36 as the supported radix range in JavaScript).

Note: Educational tool. It works on whole numbers of up to 300 digits and does not model fixed-width overflow, so results can be larger than a 32-bit or 64-bit register would hold.

Frequently asked questions

How do you add hexadecimal numbers?

Add digit by digit from the right, carrying 1 whenever the column total reaches 16. For FF + 1: F is 15, 15 + 1 = 16, which is 0 carry 1, and the carry runs through the next digit, giving 100.

How do you multiply in hexadecimal?

Convert to decimal, multiply and convert back, or multiply column by column with carries at 16. 1A x 2B is 26 x 43 = 1,118 in decimal, which is 45E in hex.

What do the letters A to F mean in hex?

They are the digits for 10 to 15: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.

Can this hex calculator handle negative numbers?

Yes. A negative result is shown with a minus sign. It is not shown as a two's complement bit pattern, so there is no fixed width or overflow.

How does hex division work here?

It is whole-number division. You get the quotient, rounded toward zero, and the remainder. FF divided by 10 in hex is F with a remainder of F.

Can it work in binary, octal or decimal too?

Yes. Pick the number base and the digits you may use change with it: 0 and 1 for binary, 0 to 7 for octal, 0 to 9 for decimal.

Advertisement
Advertisement