Add, subtract, multiply, divide, or take remainders with a base calculator that accepts bases 2 to 36, mixed source bases, exact integer arithmetic.
Last updated
Number-systems worksheet
Add, subtract, multiply, divide, or take remainders across bases 2 to 36. This worksheet accepts signed integers, strips matching 0b, 0o, and 0x prefixes, and keeps the arithmetic exact with integer-safe base conversion.
Exact integer arithmetic Use this base calculator for whole numbers only. Division returns an integer quotient plus remainder, and modulo returns the same remainder directly.
Inputs
Enter each operand in its own base, then choose the output base you want for the final answer.
Digits may use 0-9 and A-Z. Matching prefixes are accepted for binary, octal, and hexadecimal, and spaces, underscores,
and apostrophes are ignored before validation.
Base calculator for exact integer arithmetic from binary to base 36
Use the base calculator to add, subtract, multiply, divide, or take remainders across bases 2 to 36 without converting everything by hand first. It accepts signed integers, lets each operand use its own radix, and returns the exact result in your chosen output base plus common cross-checks in binary, octal, decimal, and hexadecimal.
What this base calculator does
A number base, or radix, tells you how many distinct digit symbols a positional system uses before carrying to the next place. Base 10 uses 0 through 9, base 2 uses 0 and 1, base 16 uses 0 through F, and this page extends the same positional rule all the way up to base 36 by using letters A through Z after 9.
The important point is that arithmetic does not become a different kind of maths when you change the base. Addition, subtraction, multiplication, division, and remainder still follow the same place-value structure. What changes is the carry threshold and the set of allowed symbols. That is why a strong base calculator should validate digits carefully, show the exact integer answer, and then help you verify the result in familiar checkpoints like decimal, binary, octal, and hex.
This worksheet also lets Number A and Number B come from different bases. That is useful when you are checking mixed representations such as a binary mask against a decimal constant, a hexadecimal memory value against a decimal offset, or a base-36 identifier against a decimal counter.
value = Σ(digit_i × base^power_i)
Every positional number system is read by multiplying each digit by a power of its base and summing the contributions.
a = b × q + r
For integer division, the dividend equals the divisor times the quotient plus the remainder.
How arithmetic across bases works
To evaluate a mixed-base expression, the calculator first reads each operand in its own source base using exact positional arithmetic. Once both operands are represented as integers, the operation is performed once on those exact values. Only after the calculation is complete does the page rebuild the result in the selected output base and the common audit bases.
That sequence matters because it keeps the answer exact. A thin implementation that depends on JavaScript floating-point numbers or plain parseInt arithmetic can silently lose precision on large values. This page instead treats the operands as integers throughout, which is the right model for a base arithmetic calculator used for coding, exam practice, networking, electronics, or number-systems teaching.
Division and modulo deserve special attention. Integer division returns a quotient with any leftover part recorded separately as a remainder. Modulo returns that remainder directly. If the dividend is negative, the quotient here follows truncation toward zero and the remainder keeps the dividend's sign, which matches normal JavaScript integer semantics and many programming-language expectations.
Worked examples: hex plus binary and binary division
Take FF in base 16 and 1010 in base 2. FF₁₆ equals 255 in decimal and 1010₂ equals 10. Adding them gives 265, which becomes 109 in hex, 411 in octal, and 100001001 in binary. That one example shows why a base calculator is useful: you can start in two different radices, perform the arithmetic once, and immediately verify the same integer in multiple output systems.
Now take 1011₂ ÷ 10₂. In decimal that is 11 ÷ 2, so the integer quotient is 5 and the remainder is 1. In base 2, the identity becomes 1011 = 10 × 101 + 1. A calculator that exposes that quotient-and-remainder identity is more trustworthy than one that only prints the quotient and leaves you to infer the leftover amount.
Modulo uses the same information from a different angle. With 1A₁₆ mod 5₁₀, the decimal check is 26 mod 5 = 1. In hex the result is still 1, and the hidden quotient is 5 because 26 = 5 × 5 + 1. That is why remainder arithmetic is valuable for wraparound counts, indexing, divisibility checks, and grouped-cycle problems.
Choosing source bases, output bases, and valid digits
The source base belongs to the number you entered, not to the result you want. If Number A is FF, its source base should be 16. If Number B is 1010 and you mean the binary value ten, its source base should be 2. The output base is a separate choice that controls how the final answer is displayed after the arithmetic has already been performed.
A number base calculator also needs to make valid digits obvious. Base 2 only permits 0 and 1, base 8 permits 0 through 7, base 10 permits 0 through 9, base 16 permits 0 through 9 plus A through F, and base 36 permits 0 through 9 plus A through Z. The digit-check panel on this page is there to catch a common error: typing a digit that looks normal in decimal but cannot exist in the selected source base.
Use the swap operands control when you are testing whether an operation should change after the inputs trade places. Addition and multiplication should produce the same value when the operands are swapped, while subtraction, division, and modulo usually will not. That makes operand swapping a quick sanity check for classroom arithmetic, code review, and mixed-radix debugging.
What this page handles and what it does not
This base calculator is intentionally scoped to whole integers. It accepts optional leading plus or minus signs, strips matching 0b, 0o, and 0x prefixes when they agree with the chosen source base, and ignores readability separators such as spaces, underscores, and apostrophes. Those conveniences help when you paste code-style values or grouped classroom examples directly into the form.
It does not handle fractional radix-point values, repeating expansions, floating-point machine formats, fixed-width signed encodings such as two's complement, or semantic parsing rules from a specific language or file format. If you need those, use a converter or decoder that explicitly models bit width, signedness, or fractional notation rather than assuming this general integer worksheet should infer them.
The result tables are also interpretation aids, not proof that one notation is better than another. Binary, octal, decimal, hexadecimal, and other radices are simply different views of the same integer. The practical value comes from using the form that best matches the task you are working on.
Frequently asked questions
Can I use different bases for the two operands?
Yes. That is one of the main advantages of this page. Number A and Number B are read in their own selected bases first, then the operation is carried out on the exact integer values. This is useful when you are comparing or combining values that naturally arrive in different notations, such as a binary bit pattern and a decimal constant or a hexadecimal value and a decimal offset.
Does this base calculator support negative numbers and prefixes like 0x or 0b?
Yes, for integer inputs. A leading plus or minus sign is accepted, and the calculator also strips matching prefixes such as 0b for base 2, 0o for base 8, and 0x for base 16 when they agree with the base you selected. It also ignores spaces, underscores, and apostrophes used only for readability. The page does not, however, interpret fixed-width signed storage formats such as two's complement automatically.
Why does division show a remainder instead of a decimal fraction?
Because this worksheet is an integer base calculator, not a floating-point or fraction calculator. Integer division returns a quotient and any leftover amount that does not divide evenly. That remainder is often the most useful part of the answer in programming and number theory, and it also makes the identity a = b × q + r visible so you can verify the result manually.
Will large values lose precision?
Not for integer inputs on this page. The calculator uses exact integer arithmetic rather than ordinary floating-point numbers, so large values can be added, multiplied, divided, and converted across bases without the silent rounding that would happen in a thin Number-based implementation. The main limit is scope, not precision: this page stays focused on integers and does not attempt fractional radix-point arithmetic.
Which digits are valid in bases above 10?
Bases above 10 use letters after the ordinary decimal digits. In base 16, A through F represent digit values 10 through 15. In base 36, A through Z represent digit values 10 through 35. The calculator shows the valid digit set for each selected source base so you can catch mistakes before trusting the result.
When should I use the base calculator instead of the base converter?
Use this base calculator when you need arithmetic: add, subtract, multiply, divide, or take a remainder after reading numbers in their own bases. Use the base converter when you only need to change one value from one radix to another, especially if the value includes a fractional radix point.