# oct() Function & Examples

Use the oct() utils function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## oct

#### oct(value)

Try it yourself:

```calculio
oct(56)
```

[bin](https://calcul.io/function/bin/index.md)

[hex](https://calcul.io/function/hex/index.md)

---

## oct(): display an integer in octal

**oct(x)** represents an integer in base 8, using digits 0 through 7. Octal is compact for groups of three binary bits and remains useful in some permissions and legacy-system contexts.

## Example

`oct(64)` produces an octal representation of 100 because 1×8² equals 64. The notation prefix identifies the base and avoids confusing an octal result with decimal text.

## Related bases

Use [bin()](https://calcul.io/function/bin/index.md) for base 2 and [hex()](https://calcul.io/function/hex/index.md) for base 16. Inspect bit masks using [bitAnd()](https://calcul.io/function/bitAnd/index.md) or [bitOr()](https://calcul.io/function/bitOr/index.md). Use [isInteger()](https://calcul.io/function/isInteger/index.md) to validate input.

## Caveat

Supply integers. Fractional values require an intentional conversion rule and are not simply octal integers.

[All functions](https://calcul.io/functions/index.md)
