Hex Calculator

Base 16 result

D

Decimal result

13

All results
Calculator inputs
?

Arithmetic uses both operands in the page’s base. Conversion uses only the first entry; select decimal input before entering a base-10 value.

?

Signed hexadecimal integer in arithmetic/to-decimal mode; signed decimal integer in from-decimal mode. Up to 256 digits; optional 0x prefix only for base-16 entries.

?

Division returns a quotient truncated toward zero, a signed remainder, and a separate fractional expansion. Signed inputs are mathematical integers, not fixed-width machine bit patterns.

?

Second signed base-16 integer. For division it must be nonzero. Spaces, fractional points and thousands separators are not accepted.

A hex digit packs four bits

Read each digit with its place weight. Contributions add to the signed integer result shown beside the form.

Addition columns and carries

Columns run from the units place upward. For same-sign negative addition, this is the magnitude sum and the negative sign applies afterward.

Addition columns and carries
PowerLeft digitRight digitCarry inResult digitCarry out
0A30D0

Base-16 place-value ledger

Complete result decomposition. Decimal contributions sum to the integer result; a negative sign applies to the magnitude as a whole.

Base-16 place-value ledger
Power kDigit16^k (decimal)Signed decimal contribution
0D113

Repeated division by 16

Read remainders from bottom to top for the magnitude. The sign is retained separately.

Repeated division by 16
Current magnitude (decimal)Quotient (decimal)Remainder (base 16)
130D

Binary, hexadecimal and decimal reference

Computed conversion table; leading zeroes here show a four-bit group rather than a machine word width.

Binary, hexadecimal and decimal reference
DecimalBinary (4 places)Hex
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
Rows 1–12 of 16

Hexadecimal digit multiplication table

Exact products from 0 through F. Products above F need two hex digits; for example F × F = E1.

Hexadecimal digit multiplication table
×0123456789ABCDEF
00000000000000000
10123456789ABCDEF
202468ACE10121416181A1C1E
30369CF1215181B1E2124272A2D
4048C1014181C2024282C3034383C
505AF14191E23282D32373C41464B
606C12181E242A30363C42484E545A
707E151C232A31383F464D545B6269
8081018202830384048505860687078
909121B242D363F48515A636C757E87
A0A141E28323C46505A646E78828C96
B0B16212C37424D58636E79848F9AA5
Rows 1–12 of 16

How to use the Hex Calculator

Perform exact hexadecimal integer arithmetic and convert to or from decimal. Inspect place values, calculation steps and division remainders without losing large-integer digits.

  1. 1. Enter your inputs

    Start with Calculate, First integer, Operation, Second integer. Use the units shown beside each field and open the field help when you need its assumptions.

  2. 2. Read the results

    Results update as you enter valid values. Review Base 16 result, Decimal result. Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    Signed integers only; at most 256 input digits per operand. Fractional input and fixed-width machine encodings are outside scope. Exact results are exported as strings; spreadsheets should import these columns as text.

    See the worked example and method

Understanding the Hex Calculator: uses, inputs and results

The Hex Calculator supports exact base-16 integer arithmetic without converting large values through an imprecise floating-point approximation.

What do A through F mean in hexadecimal?

Hexadecimal has sixteen digit values. The symbols 0–9 retain their usual values; A, B, C, D, E and F stand for decimal 10 through 15. Positions are powers of sixteen, so 2F means 2 × 16 + 15 = 47, not two separate decimal digits.

The Hex Calculator accepts uppercase or lowercase letters and shows canonical uppercase output. Its reference table pairs every hex digit with a four-bit binary group. Leading zeroes in those groups preserve the group width without changing the represented magnitude.

How do I convert hexadecimal to decimal and back?

For hex to decimal, multiply each digit by its place weight and add the contributions. For 3A7, that gives 3 × 256 + 10 × 16 + 7 = 935. The place-value ledger retains every contribution, including zero digits when they occur.

For decimal to hex, repeatedly divide by sixteen and record the remainders. Decimal 935 gives remainders 7, A and 3; reading them upward gives 3A7. Select the conversion direction before entering a value: the string 10 means decimal ten in from-decimal mode and decimal sixteen as a hex operand.

Further reading: Python documentation: integer conversion and number formatting · ECMAScript: exact BigInt division and remainder

What do the Hex Calculator inputs mean?

Calculate
Arithmetic uses both operands in the page’s base. Conversion uses only the first entry; select decimal input before entering a base-10 value.
First integer
Signed hexadecimal integer in arithmetic/to-decimal mode; signed decimal integer in from-decimal mode. Up to 256 digits; optional 0x prefix only for base-16 entries.
Operation
Division returns a quotient truncated toward zero, a signed remainder, and a separate fractional expansion. Signed inputs are mathematical integers, not fixed-width machine bit patterns. This field applies when Calculate is set to Arithmetic.
Second integer
Second signed base-16 integer. For division it must be nonzero. Spaces, fractional points and thousands separators are not accepted. This field applies when Calculate is set to Arithmetic.
Maximum fractional digits
Maximum base-16 digits after the point in division, from 0 to 64. A cycle in parentheses repeats indefinitely; an ellipsis means a truncated preview, not a rounded result. This field applies when Operation is set to Integer divide.

When is the Hex Calculator useful?

Check hexadecimal operations

Enter hexadecimal integers and choose an arithmetic operation.

Inspect a decimal equivalent

Compare the displayed decimal interpretation when checking addresses, constants or number-base exercises.

Hex Calculator: a practical reference

The fixed “Ten plus three” example on this page produces the results below. It illustrates the stated model; your live results above use your current inputs.

Calculate
Arithmetic
First integer
A
Operation
Add
Base 16 result
D
Decimal result
13
Review the example inputs and calculation

Use the result in context

Signed integers only; at most 256 input digits per operand. Fractional input and fixed-width machine encodings are outside scope. Exact results are exported as strings; spreadsheets should import these columns as text.

Try the Hex Calculator·Read the subject guide·Explore a related calculator

Worked example: Hex Calculator

Ten plus three. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.

View the example inputs
Calculate
Arithmetic
First integer
A
Operation
Add
Second integer
3
Calculated results for the fixed example
Calculated quantityExample result
Base 16 resultD
Decimal result13

Hex Calculator: read base sixteen through digits and four-bit groups

What do A through F mean in hexadecimal?

Hexadecimal has sixteen digit values. The symbols 0–9 retain their usual values; A, B, C, D, E and F stand for decimal 10 through 15. Positions are powers of sixteen, so 2F means 2 × 16 + 15 = 47, not two separate decimal digits.

The Hex Calculator accepts uppercase or lowercase letters and shows canonical uppercase output. Its reference table pairs every hex digit with a four-bit binary group. Leading zeroes in those groups preserve the group width without changing the represented magnitude.

Python documentation: integer conversion and number formatting

How do I convert hexadecimal to decimal and back?

For hex to decimal, multiply each digit by its place weight and add the contributions. For 3A7, that gives 3 × 256 + 10 × 16 + 7 = 935. The place-value ledger retains every contribution, including zero digits when they occur.

For decimal to hex, repeatedly divide by sixteen and record the remainders. Decimal 935 gives remainders 7, A and 3; reading them upward gives 3A7. Select the conversion direction before entering a value: the string 10 means decimal ten in from-decimal mode and decimal sixteen as a hex operand.

How do addition and multiplication work in hex?

Carry when a column reaches sixteen, rather than ten. F + 1 becomes 10, and 2F + 1 becomes 30. Each carry represents one unit in the next power-of-sixteen position. The addition table separates the incoming carry from the written digit.

Multiplication follows the same positional rule. F × F is decimal 225, written E1 because 14 × 16 + 1 = 225. The computed multiplication table covers every single-digit pair from 0 through F, and the partial-product ledger expands a larger multiplication by the multiplier’s places.

How should I interpret a hex quotient and remainder?

An integer quotient stops before fractional positions. A3 ÷ 10 gives integer quotient A and remainder 3: decimal 163 = 16 × 10 + 3. The separate fractional quotient is A.3 because its final digit contributes 3/16.

A nonterminating fractional expansion may repeat. The tool records remainders to detect the cycle; parentheses mark the recurring digits. If the cycle exceeds the selected limit, the preview ends with an ellipsis and is labeled truncated. Signed remainders follow the dividend, rather than being silently replaced with a different modulo convention.

ECMAScript: exact BigInt division and remainder

Can I use this Hex Calculator for colors or memory addresses?

It can convert the integer written in hex, but it does not infer the structure of that integer. In an RGB color, FF0000 usually represents three separate byte channels; in another context the same six digits may be a single value. Remove a color’s # prefix before using this integer parser.

Likewise, a memory address is not automatically a signed integer. This calculator has no implicit byte order, address width or wraparound. Use the exact integer result as one part of your analysis, then apply the field widths and interpretation required by the system you are studying.

How do I keep long hexadecimal results exact?

Enter integer operands as strings and keep the output as text when moving it into another tool. Up to 256 input digits per operand are accepted, and multiplication can naturally produce a longer result. No intermediate conversion through decimal floating point is required.

The diagram previews the rightmost six result places when the number is long; the ledger and CSV keep every place. API clients must quote integer operands beyond the safe-number range. A spreadsheet may need explicit text import for long decimal results even though the exported digits themselves are exact.

Formula and calculation method

Base 16 uses place weights 16^k. Conversion changes notation, not numerical value. Inputs and integer results use exact BigInt arithmetic.

Integer division truncates toward zero. The remainder has the dividend’s sign and satisfies a = b × q + r with |r| < |b|.

Fractional division is separate from the integer quotient. Parentheses mark a detected repeat; an ellipsis marks the requested digit limit. No fixed word width, overflow wraparound or two’s-complement interpretation is assumed.

Scope and Limitations

  • Signed integers only; at most 256 input digits per operand. Fractional input and fixed-width machine encodings are outside scope. Exact results are exported as strings; spreadsheets should import these columns as text.

Reference Sources

Frequently asked questions

Are lowercase hex letters accepted?

Yes. Letters a–f are accepted and output uses uppercase A–F.

Can I use an 0x prefix?

Yes, for hexadecimal operands, optionally preceded by a sign. Decimal conversion input uses decimal digits.

Why is F × F equal to E1?

F is decimal 15. Its square is 225 = 14 × 16 + 1, written E1 in hexadecimal.

Does a negative result wrap to a fixed width?

No. It retains a mathematical minus sign; no implicit word width or unsigned wraparound is applied.

Can I enter a fractional hex operand?

No. Integer operands are supported; division can produce a separate fractional quotient.