EasyUnitConverter.com

Logarithm Calculator — Calculate log_b(x)

Calculate the logarithm of any number with any base. Supports natural log (ln), log base 2, log base 10, and custom bases. See also Exponent Calculator and Scientific Notation Calculator.

Quick base:

How to Calculate Logarithms

A logarithm answers the question: "To what power must the base be raised to produce a given number?" For example, log₁₀(100) = 2 because 10² = 100. Enter the number and base, then click Calculate. Use the quick buttons to switch between common bases: natural log (base e ≈ 2.718), binary log (base 2), and common log (base 10). You can also enter any custom base.

Logarithm Formula

log_b(x) = y means b^y = x

Change of base formula:

log_b(x) = ln(x) / ln(b) = log(x) / log(b)

Key properties:

log_b(1) = 0

log_b(b) = 1

log_b(x × y) = log_b(x) + log_b(y)

log_b(x / y) = log_b(x) − log_b(y)

log_b(x^n) = n × log_b(x)

Example

log₁₀(100) = ?

We need: 10^? = 100

10^2 = 100

Therefore log₁₀(100) = 2

Frequently Asked Questions

What is the difference between log and ln?

"log" typically refers to the common logarithm (base 10), while "ln" is the natural logarithm (base e ≈ 2.71828). In some contexts (especially pure math), "log" means natural log. This calculator lets you specify any base explicitly.

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

In real numbers, logarithms are only defined for positive values. There is no real number y such that b^y equals a negative number (when b > 0). Logarithms of negative numbers exist in complex analysis but are beyond this calculator's scope.

Why can't the base be 1?

Because 1 raised to any power is always 1. So log₁(x) is undefined for x ≠ 1, and indeterminate for x = 1 (any exponent works). The base must be positive and not equal to 1.

What is log base 2 used for?

Log base 2 (binary logarithm) is fundamental in computer science. It measures the number of bits needed to represent a number, appears in algorithm complexity analysis (e.g., binary search is O(log₂ n)), and is used in information theory.

How do I convert between log bases?

Use the change of base formula: log_b(x) = log_c(x) / log_c(b). For example, log₂(8) = ln(8) / ln(2) = 2.079 / 0.693 = 3.

Solved Examples — Logarithms

Example: Calculate log₂(32)

Solution:

Step 1: We need 2^? = 32

Step 2: 2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16, 2⁵ = 32

Step 3: Therefore log₂(32) = 5

Answer: 5

Example: Solve for x: log₃(x) = 4

Solution:

Step 1: Convert to exponential form: 3⁴ = x

Step 2: Calculate 3⁴ = 81

Answer: x = 81

Example: Use log properties to simplify log₁₀(500) + log₁₀(2)

Solution:

Step 1: Product rule: log(a) + log(b) = log(a × b)

Step 2: log₁₀(500) + log₁₀(2) = log₁₀(500 × 2) = log₁₀(1000)

Step 3: 10³ = 1000, so log₁₀(1000) = 3

Answer: 3

Example: An earthquake measures 6.0 on the Richter scale. How many times more intense is it than a 4.0 earthquake?

Solution:

Step 1: Richter scale is logarithmic (base 10): difference = 6.0 − 4.0 = 2.0

Step 2: Intensity ratio = 10² = 100

Answer: 100 times more intense

Practice Questions

Try these on your own:

  1. Calculate log₁₀(10,000) (Answer: 4)
  2. Find ln(e⁵) (Answer: 5)
  3. Solve: log₅(125) (Answer: 3)
  4. Simplify log₂(16) − log₂(4) (Answer: 2)
  5. Convert log₃(7) to base 10 (Answer: log(7)/log(3) ≈ 1.771)
  6. If sound level increases by 20 dB, by what factor does intensity increase? (Answer: 100×)

Common Mistakes to Avoid

The most common mistake is thinking log(a + b) = log(a) + log(b) — this is WRONG. The product rule states log(a × b) = log(a) + log(b), not addition inside the log. Similarly, log(a − b) ≠ log(a) − log(b). Another frequent error is confusing log bases: on most scientific calculators, "log" means base 10, while "ln" means base e — mixing these up gives completely different answers. Students also forget that logarithms are undefined for zero and negative numbers in real math. When using the change of base formula, make sure both logs use the same new base. Finally, remember that log₁₀(1) = 0 for ANY base (since any number raised to 0 equals 1), and log_b(b) = 1 always.

Key Takeaways

  • A logarithm answers: "To what power must the base be raised to get this number?"
  • Product rule: log(a × b) = log(a) + log(b). Quotient rule: log(a/b) = log(a) − log(b).
  • Power rule: log(aⁿ) = n × log(a). This makes logs powerful for simplifying exponential expressions.
  • Change of base: log_b(x) = log_c(x) / log_c(b) — convert any log to a base your calculator supports.
  • Logarithmic scales (Richter, decibels, pH) compress huge ranges into manageable numbers.
  • ln (natural log, base e) appears throughout calculus, physics, and continuous growth/decay models.

Related Calculators: