Log Calculator

Calculate logarithms in any base. Supports log base 10, natural log (ln), log base 2, or any custom base. Also computes antilogarithms instantly.

Share:
Log Calculator

Must be greater than 0

log_10(100) = ?

log_10(100)

2

All Common Bases
log₁₀(100)2
ln(100) — natural log4.605170186
log₂(100)6.64385619

Verification:

10^2100

What Is a Logarithm?

A logarithm answers the question: to what power must a base be raised to produce a given number? If 10² = 100, then log₁₀(100) = 2. The logarithm and the exponent are inverse operations, just as division undoes multiplication.

Logarithms compress large ranges of numbers into manageable scales. The Richter scale for earthquakes, the decibel scale for sound, and the pH scale for acidity all use logarithms. They also appear throughout calculus, statistics, information theory, and algorithm analysis.

What This Calculator Does

This calculator computes logarithms in any base, including the most common bases (10, e, and 2). It also calculates antilogarithms, which reverse the log operation by computing the base raised to a given power. Results for all three common bases are shown simultaneously for easy comparison.

  • Inputs: A positive number, a base (preset or custom), and a choice of log or antilog mode
  • Outputs: The logarithm result for the chosen base, plus log₁₀, ln, and log₂ for reference

How the Calculation Works

The Logarithm Definition

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

If b is the base and x is the number, the logarithm y is the exponent that makes b^y equal x. For any base b, you can compute log_b(x) using natural log: log_b(x) = ln(x) / ln(b). This change-of-base formula is how calculators and software handle arbitrary bases.

Common Logarithm (log₁₀)

Base 10 is the most familiar. log₁₀(1000) = 3 because 10³ = 1000. Written simply as "log" without a base in most scientific contexts, it is used in pH calculations, the Richter scale, and decibel measurements.

Natural Logarithm (ln)

The natural log uses the mathematical constant e ≈ 2.71828 as its base. ln(x) appears naturally in calculus, exponential growth models, probability theory, and finance. The derivative of ln(x) is 1/x, which makes it especially useful in integration.

Binary Logarithm (log₂)

Base 2 is the foundation of computer science. log₂(n) tells you how many bits are needed to represent n states. It appears in the analysis of algorithms, data compression, and information theory.

How to Use the Calculator

  1. Select Logarithm mode to compute log_b(x), or Antilogarithm to compute b^y
  2. Choose a preset base (log₁₀, ln, log₂) or enter a custom base
  3. Enter the number you want to take the log of (must be greater than zero)
  4. The result appears instantly, along with results for all three common bases
  5. For antilog mode, enter the exponent and read b^y directly

Example Calculations

Example 1: Common Log

log₁₀(1000) = 3, because 10³ = 1000. log₁₀(0.01) = -2, because 10^(-2) = 0.01. Negative log values mean the input is between 0 and 1.

Example 2: Natural Log

ln(e) = 1. ln(1) = 0, because e⁰ = 1. ln(7.389) ≈ 2, because e² ≈ 7.389. The natural log grows slowly, which is why it models gradual processes like compound interest decay.

Example 3: Custom Base

log₅(125) = 3, because 5³ = 125. Enter 5 as the base and 125 as the number to verify this. The change-of-base formula confirms: ln(125) / ln(5) = 4.828 / 1.609 ≈ 3.

Real-World Scenarios

Sound and Decibels

Sound intensity is measured in decibels using the formula dB = 10 × log₁₀(I / I₀). A 10 dB increase represents a 10-fold increase in intensity. A sound at 80 dB is 10 times as intense as one at 70 dB, even though the numbers appear to differ by only 10.

Finance and Continuous Compounding

The time to double an investment at continuous compounding rate r is ln(2) / r ≈ 0.693 / r. This is the continuous version of the Rule of 72. Natural log appears throughout options pricing and bond yield calculations.

Computer Science and Algorithm Complexity

Binary search has O(log₂ n) complexity. Searching 1,024 items requires at most log₂(1024) = 10 comparisons. Knowing how to compute and interpret logarithms helps programmers assess how algorithms scale with input size.

Why This Calculation Matters

Logarithms allow us to work with quantities that span many orders of magnitude. From measuring the acidity of a solution to calculating the complexity of algorithms and modeling population growth, logarithms are one of the most frequently used mathematical tools across science, technology, and finance.

Common Mistakes to Avoid

  • Taking the log of zero or a negative number: Logarithms are only defined for positive numbers. log(0) is negative infinity and log of a negative number is not a real number
  • Confusing log and ln: In many textbooks and calculators, "log" without a base means log₁₀. In mathematics and programming, "log" sometimes means natural log. Always check which convention is being used
  • Using base 1: A base of 1 is not valid because 1 raised to any power always equals 1, making the logarithm undefined
  • Misapplying log rules: log(a + b) does not equal log(a) + log(b). The product rule says log(a × b) = log(a) + log(b), not addition inside the log

Frequently Asked Questions

Embed This Calculator

Log Calculator

Calculate
Reset