Log Calculator

Calculate logarithms with any base

Solve logarithmic equations by finding the logarithm value, or determine unknown variables

Frank Zhao - Creator
CreatorFrank Zhao

The number for which you want to find the logarithm. Must be positive. Type "e" for Euler's number.

The base of the logarithm. Common bases: 10 (common log), 2 (binary), or type "e" for natural log (e ≈ 2.71828)

← Calculating this

The result of the logarithm operation (the exponent). Type "e" for Euler's number.

What is a Logarithm?

A logarithm answers the question: "What power do I need to raise a base to, to get a certain number?"

If you've ever wondered "2 to what power gives me 8?" — that's a logarithm. The answer is 3, because 2³ = 8. We write this as log2(8) = 3.

The relationship between logarithms and exponents:

logb(x) = y  ⟺  by = x

Logarithms are everywhere — from measuring earthquake intensity (Richter scale) to calculating compound interest, analyzing algorithms in computer science, and even determining how loud a sound is (decibels).

How to Use This Calculator

This calculator handles three scenarios. Just pick what you want to find:

📊 Find the Logarithm (y)

You have a number and a base, and want to find the log value.

Example: What is log2(32)?

→ Enter Number (x) = 32, Base (b) = 2

→ Result: 5 (because 2⁵ = 32)

🔢 Find the Number (x)

You know the base and the log result, and want to find the original number.

Example: If log10(x) = 3, what is x?

→ Enter Base (b) = 10, Logarithm (y) = 3

→ Result: 1000 (because 10³ = 1000)

📐 Find the Base (b)

You have a number and know the log result, and need to find the base.

Example: logb(81) = 4. What is the base?

→ Enter Number (x) = 81, Logarithm (y) = 4

→ Result: 3 (because 3⁴ = 81)

💡 Pro tip: Type "e" in the base field to use the natural logarithm (base e ≈ 2.71828), commonly used in calculus, physics, and exponential growth problems.

Common Types of Logarithms

Common Log (base 10)

Written as log(x) or log10(x)

Used in: pH calculations, decibels, Richter scale, scientific notation

Natural Log (base e)

Written as ln(x) or loge(x)

Used in: Compound interest, population growth, radioactive decay, calculus

Binary Log (base 2)

Written as log2(x) or lb(x)

Used in: Computer science, algorithm analysis, information theory, music (octaves)

Real-World Examples

🌍

Earthquake Magnitude

A magnitude 6 earthquake releases about 31.6 times more energy than a magnitude 5. That's because the Richter scale uses log10. Each whole number increase means 10× more ground motion and roughly 31.6× more energy.

💰

Investment Doubling Time

Want to know when your investment doubles? With 7% annual return, it takes about ln(2) / ln(1.07) ≈ 10.24 years. This uses the natural log to solve exponential growth problems.

💻

Binary Search Efficiency

Searching through 1 million sorted items using binary search takes at most log2(1,000,000) ≈ 20 comparisons. That's why programmers love logarithms — they turn huge problems into manageable ones.

Quick Reference: Log Properties

Handy rules for simplifying logarithmic expressions

Product Rule

logb(xy) = logb(x) + logb(y)

Multiply inside → Add outside

Quotient Rule

logb(x/y) = logb(x) − logb(y)

Divide inside → Subtract outside

Power Rule

logb(xn) = n · logb(x)

Exponent inside → Multiply outside

Change of Base

logb(x) = logc(x) / logc(b)

Convert any base using this formula

Log of 1

logb(1) = 0

Any base, always zero (b⁰ = 1)

Log of Base

logb(b) = 1

Base to itself, always one (b¹ = b)

Frequently Asked Questions

?Why can't I take the log of a negative number?

No positive base raised to any power gives a negative result. For example, 2¹ = 2, 2⁰ = 1, 2⁻¹ = 0.5 — always positive! In complex numbers it's possible, but this calculator works with real numbers only.

?What's special about base e (≈ 2.71828)?

The number e appears naturally in continuous growth — bacteria populations, radioactive decay, compound interest. Fun fact: Jacob Bernoulli discovered it in 1683 while studying compound interest!

?Why do calculators have LOG and LN buttons?

LOG = log₁₀ (common log, used in science)
LN = logₑ (natural log, used in calculus)
These two are so common they get dedicated buttons.

?What does log(1) always equal?

Zero — always, no matter the base. Why? Because any number raised to the power of 0 equals 1. So b⁰ = 1 means logb(1) = 0. Try it yourself!

?How accurate are the results?

This calculator uses double-precision math with 15-17 significant digits of accuracy. More than enough for homework, engineering, or scientific research.

?Can I use this for homework?

Absolutely! But don't just copy — understand why log₂(8) = 3. Hint: 2 × 2 × 2 = 8. Understanding beats memorizing, and your test scores will thank you.