# log() Function & Examples

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

## log

#### log(x)

#### log(x, base)

Try it yourself:

```calculio
log(3.5)
a = log(2.4)
exp(a)
10 ^ 4
log(10000, 10)
log(10000) / log(10)
b = log(1024, 2)
2 ^ b
```

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

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

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

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

---

## log(): Natural Logarithm

**log()** returns the natural logarithm, the exponent to which e must be raised to obtain the input. It is fundamental in growth models, likelihoods, information theory, and reversing exponential processes.

## Domain and scale

For real arithmetic, log(x) requires x > 0. log(1) is zero, and values between zero and one have negative logs. Use [exp()](https://calcul.io/function/exp/index.md) to reverse it and [log1p()](https://calcul.io/function/log1p/index.md) for accurate log(1+x) when x is small.

For another base, use [log10()](https://calcul.io/function/log10/index.md) or [log2()](https://calcul.io/function/log2/index.md). Normalize physical quantities before logarithms: their arguments should be positive and dimensionless.

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