Logarithm Calculator
Calculate the logarithm of a number to any base.
Calculator Inputs
Your Result
Enter your details and press Calculate to see your result.
Formula
How it works
- Enter a positive number.
- Enter the base (or leave as 0 for the natural logarithm).
- View the logarithm.
Share on Social Media:
A logarithm answers the question: what power do I raise the base to, to get this number? logb(x) = y means bʸ = x. For example, log₁₀(1000) = 3 because 10³ = 1000. Enter a positive number and a base to get the result to 6 decimal places. Enter 0 as the base for the natural logarithm, ln.
How it's calculated
Using the change-of-base formula: logb(x) = ln(x) ÷ ln(b).
Examples
| Input | Result | Because |
|---|---|---|
| log₁₀(1000) | 3 | 10³ = 1000 |
| log₂(1024) | 10 | 2¹⁰ = 1024 |
| ln(10) | 2.302585 | e^2.302585 ≈ 10 |
| log₁₀(0.01) | −2 | 10⁻² = 0.01 |
Common bases
- Base 10 (common log): used for decibels, the pH scale and the Richter magnitude scale.
- Base e ≈ 2.71828 (natural log, ln): used for growth and decay, compound interest and calculus.
- Base 2 (binary log): used in computing. log₂(n) is roughly the number of bits needed, or the steps in a binary search.
Logarithm rules
- Product: log(xy) = log(x) + log(y)
- Quotient: log(x/y) = log(x) − log(y)
- Power: log(xⁿ) = n × log(x)
- logb(1) = 0 and logb(b) = 1
Valid inputs
The number must be greater than 0: there's no real power of a positive base that gives zero or a negative number. The base must be positive and not equal to 1 (1 raised to any power is still 1). Bases between 0 and 1 are allowed and give negative results for numbers above 1.
Related: Root Calculator, Scientific Notation Calculator.