How to calculate a logarithm
- Enter the number, which must be greater than 0.
- Enter the base: 10 for common logs, e for the natural log, 2 for binary logs, or any other positive number except 1.
- Read the result and the check, plus the log in bases 10, e and 2.
Log rules
| Rule | Example |
|---|---|
| log(xy) = log x + log y | log 20 = log 2 + log 10 |
| log(x ÷ y) = log x − log y | log 5 = log 10 − log 2 |
| log(xⁿ) = n log x | log 1000 = 3 log 10 = 3 |
| log_b(b) = 1 | ln(e) = 1 |
| log_b(1) = 0 | log 1 = 0 |
Where logarithms show up
Logarithmic scales compress huge ranges into small numbers. The decibel scale for sound, the pH scale for acidity and the Richter-style magnitude scales for earthquakes are all logarithmic, so one step up means ten times more of something. Log base 2 counts how many times you can halve something, which is why it appears in computing: a number up to 1,000 needs log₂(1000) ≈ 10 bits.