Logarithm Calculator
Calculate common logarithms (log₁₀), natural logarithms (ln), and logarithms with any custom base. See the inverse verification for every result.
How to Calculate Logarithms
- Enter the positive number x you want to take the logarithm of.
- Choose the mode: log₁₀ (common), ln (natural), or custom base.
- For custom base, enter the base value b (must be positive and not equal to 1).
- Click Calculate — the result and inverse verification (b^result = x) are shown.
Quick Reference
| From | To |
|---|---|
| log₁₀(100) | 2 |
| log₂(8) | 3 |
| ln(e) | 1 |
| log₁₀(1000) | 3 |
| log₂(16) | 4 |
| ln(1) | 0 |
Use Cases
- •Science — use log₁₀ to compute the pH of a solution or the Richter scale magnitude.
- •Finance — apply ln to model continuous compound interest and exponential growth.
- •Computer science — calculate log₂ to determine the number of bits needed to represent n values.
Formula
log_b(x) = y means b^y = x. Common log: log₁₀(x). Natural log: ln(x) = log_e(x). Change of base: log_b(x) = ln(x) / ln(b).
Frequently Asked Questions
What is the difference between log and ln?
log (or log₁₀) uses base 10 — common in engineering and sciences. ln uses base e ≈ 2.718 — the natural logarithm used in calculus, physics, and exponential growth/decay models.
Why can't you take the logarithm of zero or a negative number?
In real numbers, b^y is always positive for positive base b. Therefore, there is no real number y such that b^y = 0 or b^y < 0. Logarithms of non-positive numbers require complex numbers.
How does the change-of-base formula work?
To compute log_b(x) with any base b, use log_b(x) = ln(x) / ln(b) (or equivalently log₁₀(x) / log₁₀(b)). This lets you use a calculator that only has ln or log₁₀.