Log Calculator
A logarithm answers one question: what power do I raise this base to, to get this number? Everything else about logs follows from that.
Last updated: August 2026 · Written and verified by Akash Pandey
Calculate a logarithm
log base 10
This runs the same calculation engine as the main scientific calculator, entirely in your browser. Nothing you type is sent anywhere.
The definition
A logarithm is the inverse of exponentiation. Where 2^6 = 64 asks "what do I get?", log₂(64) = 6 asks "what power was used?". The two statements carry exactly the same information.
log_b(x) = n ⟺ bⁿ = x
- b is the base, which must be positive and not equal to 1
- x is the argument, which must be strictly positive
- n is the logarithm - the power the base is raised to
The log laws
| Law | Rule | Example (base 10) |
|---|---|---|
| Product | log(xy) = log x + log y | log(100) = log(10) + log(10) = 2 |
| Quotient | log(x/y) = log x − log y | log(100/10) = 2 − 1 = 1 |
| Power | log(xⁿ) = n · log x | log(10³) = 3 × 1 = 3 |
| Root | log(ⁿ√x) = (log x) ÷ n | log(√100) = 2 ÷ 2 = 1 |
| Base of itself | log_b(b) = 1 | log(10) = 1 |
| Log of 1 | log_b(1) = 0 | log(1) = 0 |
| Change of base | log_b(x) = log(x) ÷ log(b) | log₂(8) = log(8) ÷ log(2) = 3 |
The product law is the reason logarithms were invented. Before electronic calculators, turning a hard multiplication into an easy addition - by looking up two logs, adding them, and looking up the antilog - was the fastest way to multiply large numbers, and it is the principle a slide rule is built on.
Worked examples
Evaluate log(1000)
log(1000)
- The base is 10 by default, so the question is: 10 to what power gives 1000?
1000 = 10 × 10 × 10 = 10³.- The exponent is 3.
= 3
Evaluate log₂(64)
log(64, 2)
- The question is: 2 to what power gives 64?
- Doubling from 1: 2, 4, 8, 16, 32, 64 - that is six doublings.
- Alternatively use change of base:
log(64) ÷ log(2) ≈ 1.80618 ÷ 0.30103.
= 6
Evaluate log₅(30) using change of base
log(30, 5)
- 30 is not a neat power of 5, so the answer will not be a whole number.
- Change of base:
log(30) ÷ log(5). log(30) ≈ 1.47712andlog(5) ≈ 0.69897.1.47712 ÷ 0.69897 ≈ 2.11328. Sanity check: 5² = 25 and 5³ = 125, so an answer just above 2 is right.
= 2.11328275256
Solve 10ˣ = 4500 for x
log(4500)
- Take the base-10 log of both sides:
x = log(4500). - 4500 lies between 10³ = 1000 and 10⁴ = 10000, so x is between 3 and 4.
- The calculator gives approximately 3.65321.
= 3.65321251378
- Take the base-10 log of both sides:
Why logs of zero and negatives are undefined
Ask what power of 10 gives 0, and there is no answer - 10ⁿ gets closer and closer to 0 as n becomes more negative, but never arrives. So log(0) has no value; the calculator reports an undefined result rather than returning negative infinity. Negative arguments fail for a similar reason: no real power of a positive base ever produces a negative number.
Bases are restricted too. A base of 1 fails because 1ⁿ is always 1, so it can never reach any other number. Negative bases fail because their powers oscillate in sign rather than covering a continuous range.
Common logarithm values
| x | log₁₀(x) | ln(x) |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 0.301030 | 0.693147 |
| 3 | 0.477121 | 1.098612 |
| e ≈ 2.71828 | 0.434294 | 1 |
| 5 | 0.698970 | 1.609438 |
| 10 | 1 | 2.302585 |
| 100 | 2 | 4.605170 |
| 1,000 | 3 | 6.907755 |
| 1,000,000 | 6 | 13.815511 |
Frequently Asked Questions
Does "log" mean base 10 or base e?
On this calculator, and on scientific calculators generally, log means base 10 and ln means base e. In higher mathematics and in most programming languages a bare log means the natural logarithm, so always check the convention of whatever source you are reading.
How do I calculate a logarithm with an unusual base?
Use the change of base formula: log_b(x) = log(x) ÷ log(b). Any consistent base works for the two logs on the right. The "log with any base" mode above does this for you.
Why is log(0) undefined?
Because no power of 10 produces exactly 0. As the exponent becomes more negative the result approaches 0 without ever reaching it, so there is no value to return. The calculator reports an undefined result.
Can a logarithm be negative?
Yes. The logarithm of any number between 0 and 1 is negative, because it takes a negative power to get there: log(0.01) = −2. What cannot be negative is the argument.
What is an antilog?
The antilogarithm undoes a logarithm. For base 10 it is simply 10ˣ. If log(x) = 3, the antilog of 3 is 1000.
What are logarithms actually used for?
Any scale that spans many orders of magnitude - decibels for sound, pH for acidity, the Richter scale for earthquakes, and stellar magnitude in astronomy. They also turn multiplication into addition, which is how slide rules worked, and they appear throughout the analysis of algorithms.
Why is the logarithm of a negative number undefined?
Because no positive base raised to any real power produces a negative result. 10ˣ is always positive for any real x, so there is no real logarithm of a negative number. In advanced mathematics, complex logarithms handle this, but they fall outside the scope of this calculator.
How do I convert between logarithm bases without a dedicated button?
Use the change of base formula: log_b(x) = log(x) / log(b). You can use any base for both logs on the right, as long as they match. For instance, log₂(8) = log(8) / log(2) = 3.