Sumivo · Mathematics
Octal Calculator
Add, subtract, multiply and divide two octal numbers, with every result shown in both octal and decimal. Exact arithmetic on whole octal numbers.
01 / inputs
02 / result
A + B (OCT)
304
- A (decimal)
- 165
- B (decimal)
- 31
- Sum (A + B)
- 304₈ = 196
- Difference (A − B)
- 206₈ = 134
- Product (A × B)
- 11773₈ = 5115
- Quotient (A ÷ B)
- 5₈ r 12₈ = 5 r 10
Calculation trace
- 245₈ = 165₁₀0Operand A to decimal
- 37₈ = 31₁₀0Operand B to decimal
- 165 + 31 = 196 = 304₈0Add
- 165 − 31 = 134 = 206₈0Subtract
- 165 × 31 = 5115 = 11773₈0Multiply
- 165 ÷ 31 = 5 remainder 10 = 5₈ r 12₈0Divide (integer)
How it works
Each octal digit is a power of eight, so 245 in base 8 is 2×64 + 4×8 + 5×1 = 165 in base 10 (octal uses only the digits 0–7). The tool reads both operands that way, does the arithmetic on the whole numbers, and converts the answer back to octal. Addition, subtraction, and multiplication follow the ordinary rules on the decimal values; division is integer division, giving a whole-number quotient and a separate remainder (for example 245 ÷ 37 is 165 ÷ 31 = 5 remainder 10, shown as quotient 5 and remainder 12 in octal). All of this runs on exact big integers, so results stay precise no matter how large the numbers get, unlike ordinary floating-point which loses precision past 2^53.
Assumptions & limits
- Operands must contain only the octal digits 0–7 (an optional 0o prefix and leading zeros are allowed); anything else, including the digits 8 and 9, is rejected.
- Division is integer division: it returns a quotient and a remainder, not an octal fraction.
- A − B can be negative; it is shown with a minus sign rather than a two’s-complement pattern, because two’s complement needs a fixed bit width that a plain calculator does not assume.
- Inputs are capped at 43 octal digits each (about 128 bits) to keep the page responsive.
FAQ
- How do I add two octal numbers?
- Enter both numbers in octal and read the Sum row. For example 245 + 37 = 304, which is 165 + 31 = 196 in decimal. The tool shows every result in both octal and decimal.
- How does octal division work here?
- It is integer division. 245 ÷ 37 is 165 ÷ 31 = 5 with remainder 10, shown as quotient 5 and remainder 12 in octal. It does not produce an octal fraction.
- Why are the digits 8 and 9 rejected?
- Octal is base 8, so it uses only the digits 0 through 7. There is no single octal digit for eight or nine — eight is written 10 in octal — so an 8 or 9 in the input is not a valid octal number and is rejected.
- Is the result exact for very large octal numbers?
- Yes. The arithmetic uses arbitrary-precision integers, so a 64-bit or 128-bit operand is computed exactly — no rounding of the kind ordinary floating-point introduces beyond 2^53.
Related calculators
SOURCES
- OpenStax, Rice UniversityContemporary Mathematics — 4.3 Converting with Base Systems ↗
Base-8 (octal) positional notation and converting between base systems
Accessed 2026-09-22