Log Calculator

Work out the logarithm of any number in base 10, e, 2 or a base you choose, or find the antilog, with the working shown.

Result–

Log Calculator: Find the Logarithm of Any Number

A logarithm answers one simple question: what power do I need to raise the base to, to get this number? For example, log₁₀(1000) = 3, because 10 × 10 × 10 = 1000.

That’s really all a log is. The tricky part is doing it for awkward numbers like log₅(37) or ln(0.0042), and that’s what this calculator is for.

Choose a base (10, e, 2 or any base you like) and type in your number. You get the answer straight away, along with the common log, natural log and binary log of the same number.

The working uses the change-of-base formula, and there’s a check that raises the base to the answer to get back to your number.

The Antilog tab goes the other way: give it a base and an exponent and it works out the number.

How to Use the Log Calculator

  • Logarithm tab: pick the base, then enter the number x. The result is logb(x).
  • Custom base: choose “Custom base” and enter any positive base except 1, such as 3, 5, 1.5 or 16.
  • Antilog tab: enter the exponent y and you’ll get x = by. This is how you “undo” a log.

Negative numbers and zero don’t have real logarithms, so the calculator will tell you if you enter one. The base also has to be positive and can’t be 1, because 1 raised to any power is always 1.

What Is a Logarithm?

Logs and exponents are two ways of writing the same fact:

logb(x) = y  means exactly the same as  by = x

So log₂(8) = 3 because 2³ = 8, and log₁₀(0.01) = −2 because 10⁻² = 0.01. When the number is smaller than 1, the log comes out negative.

When the number equals the base, the log is always 1. The log of 1 is always 0 in every base, because anything raised to the power 0 is 1.

The Three Bases You’ll See Most

NameWritten asBaseWhere it’s used
Common loglog or log₁₀10pH, decibels, the Richter scale, scientific notation
Natural loglne ≈ 2.71828Growth and decay, compound interest, calculus, statistics
Binary loglog₂ or lb2Computing, bits, algorithms, doubling time

On most calculators the “log” button means base 10 and the “ln” button means base e. In some university maths and science courses, “log” on its own means the natural log, so check which one your course uses.

Change of Base Formula

Most calculators only have log and ln buttons, so how do you work out log₅(37)? You use the change of base formula:

logb(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b)

For log₅(37): ln(37) ÷ ln(5) = 3.6109 ÷ 1.6094 ≈ 2.2436. You can check it: 52.2436 ≈ 37. The calculator shows this working for every answer, so you can copy the method into homework.

Worked Examples

Example 1: log₁₀(1000)

10³ = 1000, so the answer is 3. Every whole power of 10 has a whole-number log: log₁₀(100) = 2, log₁₀(10) = 1, log₁₀(0.1) = −1.

Example 2: natural log of 20

ln(20) ≈ 2.9957. That means e2.9957 ≈ 20.

Example 3: log₂(1024)

2¹⁰ = 1024, so log₂(1024) = 10. This is why 1024 bytes make a kilobyte in binary: it’s 2 to the power 10.

Example 4: a negative answer

log₅(0.04) = −2, because 5⁻² = 1 ÷ 25 = 0.04.

Example 5: antilog

The antilog of 2.5 in base 10 is 102.5 ≈ 316.23. In chemistry, that’s how you turn a pH or a log value back into a real concentration.

Log Rules Worth Remembering

  • Product rule: log(a × b) = log(a) + log(b)
  • Quotient rule: log(a ÷ b) = log(a) − log(b)
  • Power rule: log(an) = n × log(a)
  • Log of 1: logb(1) = 0
  • Log of the base: logb(b) = 1
  • Inverse: blogb(x) = x, and logb(bx) = x

These rules are what made logs so useful before electronic calculators existed. Multiplying two big numbers becomes adding their logs, and that’s how slide rules and printed log tables worked.

Where Logarithms Show Up in Real Life

  • Sound: decibels are a log scale. Every extra 10 dB is ten times the sound intensity, so 80 dB is 100 times more intense than 60 dB.
  • Earthquakes: each whole number on the magnitude scale is about 10 times bigger in measured amplitude, and roughly 32 times more energy.
  • Chemistry: pH = −log₁₀[H⁺]. A pH of 3 is ten times more acidic than a pH of 4.
  • Money: to find how long savings take to double at 5% a year, work out ln(2) ÷ ln(1.05) ≈ 14.2 years. You can test growth scenarios with our Compound Interest Calculator.
  • Computing: log₂ tells you how many bits you need, or how many steps a binary search takes. Searching a million items takes only about 20 steps.

Frequently Asked Questions

Can you take the log of a negative number?

Not with real numbers. No real power of a positive base gives a negative result or zero, so log(x) only exists for x greater than 0. (Complex numbers do allow it, but that’s beyond a standard calculator.)

What’s the difference between log and ln?

log usually means base 10 and ln means base e (about 2.71828). They differ by a fixed factor: ln(x) = 2.302585 × log₁₀(x).

What is the antilog?

It’s the reverse of a log. If log₁₀(x) = 2.5, then x = antilog(2.5) = 102.5 ≈ 316.23. On a phone or scientific calculator it’s usually the 10x or ex button.

How do I solve an equation like 3x = 50?

Take logs of both sides: x = log₃(50) = ln(50) ÷ ln(3) ≈ 3.5609. Choose a custom base of 3 and enter 50.

How accurate is this calculator?

Results are worked out to about 12 significant figures, which is more than enough for school, university and engineering work. Whole-number answers like log₂(1024) = 10 are shown exactly.

For very large or very small results, it also gives the answer in scientific notation.

More free tools from our Math Calculators collection:

Tahir Mehmood

About the author

Tahir Mehmood

Tahir Mehmood is the founder of Digital Designs SEO LTD, a UK company, with five years of hands-on experience in SEO, content writing and web development. He builds and maintains the calculators on All in Calculators and keeps them up to date. Spotted an error? Contact us and we will fix it.

Last updated: 27 November 2026