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

LawRuleExample (base 10)
Productlog(xy) = log x + log ylog(100) = log(10) + log(10) = 2
Quotientlog(x/y) = log x − log ylog(100/10) = 2 − 1 = 1
Powerlog(xⁿ) = n · log xlog(10³) = 3 × 1 = 3
Rootlog(ⁿ√x) = (log x) ÷ nlog(√100) = 2 ÷ 2 = 1
Base of itselflog_b(b) = 1log(10) = 1
Log of 1log_b(1) = 0log(1) = 0
Change of baselog_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

  1. Evaluate log(1000)

    log(1000)

    1. The base is 10 by default, so the question is: 10 to what power gives 1000?
    2. 1000 = 10 × 10 × 10 = 10³.
    3. The exponent is 3.

    = 3

  2. Evaluate log₂(64)

    log(64, 2)

    1. The question is: 2 to what power gives 64?
    2. Doubling from 1: 2, 4, 8, 16, 32, 64 - that is six doublings.
    3. Alternatively use change of base: log(64) ÷ log(2) ≈ 1.80618 ÷ 0.30103.

    = 6

  3. Evaluate log₅(30) using change of base

    log(30, 5)

    1. 30 is not a neat power of 5, so the answer will not be a whole number.
    2. Change of base: log(30) ÷ log(5).
    3. log(30) ≈ 1.47712 and log(5) ≈ 0.69897.
    4. 1.47712 ÷ 0.69897 ≈ 2.11328. Sanity check: 5² = 25 and 5³ = 125, so an answer just above 2 is right.

    = 2.11328275256

  4. Solve 10ˣ = 4500 for x

    log(4500)

    1. Take the base-10 log of both sides: x = log(4500).
    2. 4500 lies between 10³ = 1000 and 10⁴ = 10000, so x is between 3 and 4.
    3. The calculator gives approximately 3.65321.

    = 3.65321251378

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

xlog₁₀(x)ln(x)
100
20.3010300.693147
30.4771211.098612
e ≈ 2.718280.4342941
50.6989701.609438
1012.302585
10024.605170
1,00036.907755
1,000,000613.815511
Values rounded to six decimal places. See the natural log calculator for the ln column in more depth.

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.