Skip to main content

DigitalCalculators.net

Log Calculator

Find the logarithm of a number in any base, with the natural log, log base 10 and log base 2.

Results

ItemValue

Steps

StepWorking
The number must be above 0. The base must be above 0 and cannot be 1. Answers are rounded to 6 decimal places.

Quick Answer

A logarithm answers the question: what power of the base gives this number? Log base 10 of 1,000 is 3, because 10³ = 1,000. To find a log in any base, divide natural logs: log b (x) = ln(x) ÷ ln(b).

Last updated: 2 November 2026 ·How we calculate this: the change of base formula

Table of Contents

How This Log Calculator Works

Enter a number and a base. The calculator finds the logarithm in that base, and also shows the natural log, log base 10 and log base 2, so you can compare them.

Quick explanation: if b^y = x, then log b (x) = y.

  • Base 10: the common logarithm.
  • Base e: the natural logarithm, written ln.
  • Base 2: often used in computing.

How to Use the Log Calculator

  1. Enter the number you want the logarithm of. It must be greater than zero.
  2. Enter the base, such as 10, 2 or 2.718281828 for e.
  3. Press Calculate.
  4. Read the log in your base, plus the natural log, log base 10 and log base 2.
  5. Check the steps to see the change-of-base working.

Core Formulas

  • Change of base: log b (x) = ln(x) ÷ ln(b)
  • Product rule: log(xy) = log(x) + log(y)
  • Quotient rule: log(x ÷ y) = log(x) − log(y)
  • Power rule: log(x^k) = k × log(x)

Key Terms

  • Logarithm: the power a base must be raised to in order to give a number.
  • Base: the number being raised to a power, such as 10 or 2.
  • Common log: log base 10.
  • Natural log (ln): log base e, where e is about 2.71828.
  • Change of base: log_b(x) = ln(x) ÷ ln(b), used to find logs in any base.
  • Antilog: the reverse of a log: raising the base to the log value.

Worked Example

Find log base 2 of 32.

  • ln(32) = 3.465736
  • ln(2) = 0.693147
  • 3.465736 ÷ 0.693147 = 5
  • Check: 2⁵ = 32

Real-Life Examples

  • pH of a solution: pH = −log₁₀ of the hydrogen ion concentration. A concentration of 0.0000001 (10⁻⁷) gives a pH of 7, which is neutral.
  • Sound level: decibels = 10 × log₁₀(power ratio). A sound with 100 times the power is 20 dB louder.
  • Doubling time: money growing 7% a year doubles in ln(2) ÷ ln(1.07) = 10.24 years.
  • Computer science: log₂ of 1,024 is 10, so a binary search through 1,024 sorted items needs about 10 steps.
  • Orders of magnitude: log₁₀ of 3,500,000 is about 6.54, so the number has 7 digits before the decimal point.

Log vs Ln

  • log: usually means log base 10, also called the common log. Used for pH, decibels and orders of magnitude.
  • ln: the natural log, base e (about 2.71828). Used for growth, decay and calculus.
  • Converting: ln(x) = log₁₀(x) × 2.302585, and log₁₀(x) = ln(x) ÷ 2.302585.
  • Watch out: some programs and textbooks write log to mean ln, so check the base.

Common Logarithm Values

ExpressionValue
log₁₀(1)0
log₁₀(10)1
log₁₀(100)2
log₁₀(2)0.30103
ln(e)1
ln(2)0.693147
ln(10)2.302585
log₂(8)3
log₂(1,024)10

Common Mistakes

  • Log of zero or a negative: this is not defined for real numbers.
  • Base of 1: this is not allowed, because 1 to any power is 1.
  • Mixing up log and ln: log usually means base 10, and ln means base e.

Frequently Asked Questions

It is the power you raise a base to in order to get a number. Log base 10 of 100 is 2, because 10² = 100.

Log often means base 10, and ln means base e, which is about 2.718.

Divide the natural log of the number by the natural log of the base.

It is 0 in any allowed base, because any such base to the power 0 is 1.

Not with real numbers. The input must be greater than zero.

Raise the base to the log value. If log₁₀(x) = 3, then x = 10³ = 1,000.

It is common in computing, for example to find how many bits are needed or how many times a number can be halved.

It is undefined. As a number gets closer to 0, its log heads toward negative infinity.

Take logs of both sides: x = ln(50) ÷ ln(2), which is about 5.644.

It is 3, because 10³ = 1,000.

Yes. The log of any number between 0 and 1 is negative. For example, log₁₀(0.01) = −2.

Use base 10 for everyday scales, base e for growth and calculus, and base 2 for computing.

e is a constant, about 2.71828, that appears naturally in continuous growth and compound interest.

Magnitude scales are logarithmic, so each whole number step means a much bigger quake: about 10 times larger in measured wave size.

log(ab) = log a + log b, log(a ÷ b) = log a − log b, and log(aⁿ) = n × log a.

References & Sources

SourceUsed ForLink
Wikipedia, Logarithm Definition, rules and change of base. https://en.wikipedia.org/wiki/Logarithm