---
slug: octal-to-decimal-calculator
title: "Octal to Decimal Converter"
category: developer
updated: 2026-11-17
canonical: https://calcseed.com/c/developer/octal-to-decimal-calculator/
html: /c/developer/octal-to-decimal-calculator/
---

# Octal to Decimal Converter

Convert an octal number to decimal by multiplying each digit by its power of eight. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (17), the decimal is **15**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| Octal | 17 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Decimal | 15 |  |

## Formula

```text
decimal = d&#8320; × 8&#8319; + &hellip; + d&#8321; × 8&sup1; + d&#8320; × 8&#8304;
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| Octal | number |  | 17 |

## Outputs

| Result | Format |
| --- | --- |
| Decimal | primary |
| Decimal | number |
| Hex | text |

## How it works

### What the converter returns

Enter an octal string using only the digits 0 through 7 and the tool returns its decimal value plus the same value in hex. The default is **17**, which is one group of eight plus seven units, so the output is **15** in decimal and **F** in hex. Any digit of 8 or 9 makes the whole input invalid, and the converter returns blank rather than a partial answer.

### How the positional weights work

Octal is base 8, so the weight of each position is a power of eight: 1, 8, 64, 512, 4096 and so on from the right. Multiply each digit by its weight and add the products. Unlike base 10, a digit of 7 in the second spot is worth 56, not 70, because the weight is 8 rather than 10.

The running-total method in the code is equivalent and easier to do without paper: start at 0, and for each digit multiply the total by 8 and add the digit. For the default input 17 that is 0 × 8 + 1 = 1, then 1 × 8 + 7 = 15. Both methods give 15, and the running total never needs you to know the string length in advance.

#### Valid digits only 0 through 7

A base-8 system has only eight symbols, so 8 and 9 do not exist in it. Typing 89 or 128 makes the input invalid, and the calculator stops and returns an empty result instead of skipping the bad digit. That is deliberate: silently dropping a digit would produce a number that looks plausible and is wrong.

### Worked example at the default

The default input is 17. Written out by weight, that is 1 × 8^1 + 7 × 8^0 = 8 + 7 = 15. The hex output is F, since 15 is the largest single hex digit.

Try 100 instead. Three digits mean weights of 64, 8 and 1, so 1 × 64 + 0 × 8 + 0 × 1 = 64. The result is 64 decimal and 40 in hex, not 100. This is the jump that surprises people most: octal 100 is decimal 64, a gap of 36.

The maximum the field accepts is 7777777. Seven sevens give 8^7 − 1 = 2,097,151 in decimal and 1FFFFF in hex, which is 21 bits of value spread across seven octal digits.

| Octal | Decimal | Hex | Typical use |
| --- | --- | --- | --- |
| 1 | 1 | 1 | Single permission bit |
| 7 | 7 | 7 | Three permission bits, all set |
| 10 | 8 | 8 | One full group of eight |
| 17 | 15 | F | The default input |
| 100 | 64 | 40 | One power step up |
| 755 | 493 | 1ED | chmod file permissions |
| 1000 | 512 | 200 | One more power step |
| 7777 | 4,095 | FFF | Twelve bits, all set |

The chmod row is the one people meet most often. Octal 755 is three digits, one per permission triad: owner 7 (read, write, execute), group 5 (read and execute), others 5 (read and execute). As a single decimal number it is 493, which is why scripts that store permissions as integers show 493 rather than 755.

Within each digit the bits are ordered read = 4, write = 2, execute = 1, so the three values sum to the digit: 4 + 2 + 1 = 7, 4 + 1 = 5, 4 + 2 = 6. That is why 644 means owner read-write, group read-only and others read-only, and why 600 locks a private key down to its owner. The octal digit is the three permission bits written as one character.

### Why base 8 exists at all

- Three bits fit one octal digit exactly, because 8 = 2^3, so binary groups cleanly into threes
- Unix file permissions use three octal digits for owner, group and other, each 0 to 7
- Early machines with 12, 24 or 36-bit words used octal because the word split into groups of three
- Some legacy file formats and device numbers still print in octal, often with a leading zero

Hex won out for most modern work because bytes are 8 bits and split evenly into two hex digits, while three bits do not divide 8. That leaves octal strongest in permission strings, where the three-bit grouping matches the three permission flags per triad.

### Common mistakes

- Treating 755 as decimal: in octal it is 493, and 7 × 64 + 5 × 8 + 5 only works in base 8
- Passing octal to parseInt without a radix: parseInt(&rsquo;08&rsquo;) returns 8 in modern JavaScript, and older engines returned 0
- Assuming a leading zero is harmless: in many languages a literal like 010 is octal 8, not decimal 10
- Using 8 or 9 inside an octal literal, which is a syntax error in strict mode and a silent zero in older parsers
- Confusing the digit count with the bit count: seven octal digits hold 21 bits, not 7

#### Octal versus hex for the same value

Decimal 255 is 377 in octal and FF in hex. The octal form needs three digits and the hex form needs two, because each hex digit carries four bits against three for octal. Neither is more accurate; they simply pack the same binary value at different widths. Use octal when the grouping is by three bits, as with permissions, and hex when it is by byte.

### Precision and range

Every value in this range is an exact integer well below 2^53, so no rounding can occur at the default limits. The only precision risk comes later, if you extend the same running-total loop past 15 octal digits: a 53-bit double holds about 17 octal digits, and beyond that the low digits start to vanish. Keep long octal strings as text or BigInt rather than converting them to a number first.

## FAQ

### How do I convert octal to decimal?

Multiply each digit by 8 raised to its position from the right and add the results. Octal 17 is 1 × 8 + 7 = 15, and octal 100 is 1 × 64 = 64.

### What digits are valid in octal?

Only 0 through 7. Any input containing 8 or 9 is not octal, and this calculator returns a blank result instead of guessing what you meant.

### Why would I need octal to decimal?

Unix permissions are written in octal, so chmod 755 corresponds to decimal 493 and chmod 644 to 420. Storing or comparing those permissions as integers requires the decimal form.

### What is octal 755 in decimal?

493. The arithmetic is 7 × 64 + 5 × 8 + 5 = 448 + 40 + 5, and the hex form is 1ED.

### Is octal 100 equal to decimal 100?

No. Octal 100 is decimal 64 and hex 40. The digits look the same but the position weight is 64 rather than 100, so the values diverge as soon as you pass one digit.

### How many bits does one octal digit represent?

Three. Because 8 = 2^3, each octal digit covers exactly eight patterns, and binary can be grouped in threes to read or write octal directly.

### Why does parseInt return the wrong value for 08?

Without a radix some engines treat a leading zero as octal, where 8 is invalid, and return 0 or NaN. Always pass the radix: parseInt(value, 8) for octal or parseInt(value, 10) for decimal.

### What is the largest octal value this tool accepts?

7777777, which equals 2,097,151 in decimal and 1FFFFF in hex. That is 21 bits, since seven digits × 3 bits each.

### How do I convert decimal back to octal?

Divide by 8 repeatedly and read the remainders from last to first. 493 ÷ 8 = 61 remainder 5, 61 ÷ 8 = 7 remainder 5, 7 ÷ 8 = 0 remainder 7, giving 755.

## Method and sources

Methodology: Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: 2026-11-17.
- Octal positional notation: value = sum of digit × 8^position.
