Add, subtract, multiply or divide octal numbers exactly – carries and borrows happen at 8, and the decimal equivalents are shown so every step can be checked.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Arithmetic at base eight
Octal arithmetic carries and borrows at 8 — 7+1 writes 0 carry 1 — and otherwise mirrors decimal method exactly. The living application is permission-mask maths: umask subtractions and capability additions are octal operations on octal quantities.
All four operations run exactly here, with decimal restatement for checking.
Worked example
755 + 22 5+2 = 7 5+2 = 7 7+0 = 7 Sum: 777 (493 + 18 = 511 ✓) — adding group-write and other-write yields rwxrwxrwx
umask, computed
Default file mode = 666 AND NOT umask; directories use 777. A umask of 022 therefore yields 644/755 — subtractions and masks in octal that this calculator makes checkable. Permission bugs are almost always arithmetic bugs in base 8.
Guarding the digits
Any 8 or 9 aborts with a positional error, catching decimal values pasted into octal contexts — the most common octal accident. Prefix 0o is accepted; 0x and 0b are redirected.
Privacy
Computed locally, never transmitted.
Carries at eight, and why admins still care
Octal columns carry at eight, so 7₈ + 1₈ is 10₈, and digits above seven simply do not exist — a common source of typos this calculator rejects outright. The one place octal arithmetic still appears daily is Unix permissions: adding 22₈ to 755₈ gives 777₈, and the classic umask relationship 777₈ − 022₈ = 755₈ works digit by digit with no borrows because each octal digit is an independent 3-bit permission group. The decimal equivalents shown with every result let you verify each step.
How to use the Octal Calculator
- Enter two octal numbers (digits 0-7).
- Pick the operation.
- Click "Calculate" – octal results with decimal verification.
- Carries and borrows happen at 8.
Frequently asked questions
How does arithmetic differ in base 8?
Carries fire at eight: 7+1 writes 0 carry 1 (7+1 = 0o10). In 755 + 22: 5+2=7, 5+2=7, 7+0=7 → 777. Same algorithms as decimal, different threshold – the calculator's cross-check keeps you honest.
Why is 755 + 22 = 777 a neat permissions example?
It adds group-write and other-write (022) to rwxr-xr-x, yielding rwxrwxrwx – everything for everyone. Octal arithmetic ON permission masks is how umask calculations work: 777 minus umask gives default modes.
What does an 8 or 9 in my input trigger?
A named, positioned error – those digits do not exist in octal. This catches decimal numbers pasted into octal contexts, the most common octal mistake.
Are the four operations all supported?
Yes – add, subtract (negatives allowed), multiply, and divide with quotient and remainder, all BigInt-exact.
When would anyone compute IN octal now?
Permission and umask arithmetic is the living case; beyond that, maintenance of legacy systems documented in octal, and coursework – the mental workout generalises to every base.
How do I sanity-check an octal sum?
Mod-8 on the last digits: (5+2) mod 8 = 7 matches. Then the decimal line verifies the whole: 493 + 18 = 511 = 0o777.
Processed on-device?
Yes – nothing about your operands leaves the browser.