CalculatorSwitch
Calculator Switch
Math

Logarithm Calculator

Last updated:

How to Use This Calculator

Step 1: Enter the value (must be positive).

Step 2: Enter the base — use 10 for common log, 2.71828 for natural log (ln), or 2 for binary logarithm.

Step 3: Click Calculate. The result shows the log in your chosen base, plus ln and log₁₀ for comparison.

What Is a Logarithm?

A logarithm answers the question: 'What exponent do I need to apply to the base to get this value?' For example, log base 10 of 1,000 equals 3, because 10 to the 3rd power equals 1,000.

Logarithms are the inverse operation of exponents. Wherever exponents compress repeated multiplication into a simpler notation, logarithms reverse the operation to extract the exponent.

The three most common logarithms are:
Common log (log₁₀): base 10 — used in decibels, pH, Richter scale.
Natural log (ln): base e ≈ 2.71828 — used in calculus and continuous growth.
Binary log (log₂): base 2 — used in computer science and information theory.

Logarithm Rules

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

Change of base: log_b(x) = ln(x) / ln(b)

Product: log(a × b) = log(a) + log(b)
Quotient: log(a / b) = log(a) − log(b)
Power: log(aⁿ) = n × log(a)
Identity: log_b(b) = 1, log_b(1) = 0

Example: log₁₀(1000) = 3
Because 10³ = 1,000

Common Logarithm Values

ExpressionValueBecause
log₁₀(10)110¹ = 10
log₁₀(100)210² = 100
log₁₀(1000)310³ = 1,000
ln(e)1e¹ = e
ln(1)0e⁰ = 1
log₂(8)32³ = 8
log₂(1024)102¹⁰ = 1,024

Examples

Example 1: log₁₀(1,000,000) = 6 — there are six zeros, so the exponent is 6.

Example 2: ln(2.71828) = 1 — the natural log of e always equals 1.

Example 3: log₂(256) = 8 — in computing, 256 represents 8 bits of information.

Tips

Only positive values. Logarithms of zero or negative numbers are undefined in real numbers.

Base cannot be 1. log base 1 of anything is undefined (except log₁(1) which is indeterminate).

Decibels use log₁₀: a 10 dB increase is 10× more power.

pH scale uses −log₁₀ of hydrogen ion concentration.

Frequently Asked Questions

What is the difference between ln and log?
'Log' usually refers to the common logarithm with base 10, and 'ln' refers to the natural logarithm with base e (approximately 2.71828). On most scientific calculators, the 'log' button is base 10 and the 'ln' button is base e. In pure mathematics, 'log' without a specified base often means natural log, while in engineering and most applied contexts it means base 10. When in doubt, check the context or specify the base explicitly.
Why can't I take the log of a negative number?
Logarithms of negative numbers are undefined in the real number system because no real-number exponent applied to a positive base can produce a negative result. For any positive base b, b raised to any power y gives a positive number — so log_b of a negative value has no solution among real numbers. In the complex number system, logarithms of negatives are defined using imaginary numbers, but this calculator works with real numbers only.
What is the change-of-base formula?
Most calculators only provide log base 10 and ln (base e) directly. To compute a logarithm with a different base, use the change-of-base formula: log base b of x equals log(x) divided by log(b), where both logs on the right side can use any consistent base. This calculator uses this formula internally to handle any base you provide. For example, log base 2 of 8 equals ln(8) divided by ln(2), which is about 2.079 divided by 0.693, giving 3.
Where do logarithms show up in real life?
Logarithms appear in many fields: the Richter scale for earthquake magnitudes (log base 10 of ground motion), decibels for sound intensity (10 times log base 10 of power ratio), pH for acidity (negative log base 10 of hydrogen ion concentration), stellar magnitudes in astronomy, compound interest formulas in finance, and information theory (log base 2 of possibilities gives bits). Wherever a phenomenon spans many orders of magnitude, logarithmic scales make data more readable.
What does the log of a number smaller than 1 look like?
The log of a number between 0 and 1 is negative. For example, log base 10 of 0.1 equals negative 1, because 10 to the negative 1 equals 0.1. Log of 0.01 is negative 2, log of 0.001 is negative 3, and so on. As the input approaches zero, the log approaches negative infinity. The log equals zero only at the input value of 1, regardless of the base — because any base raised to the zero power equals 1.
Why is log base e called the 'natural' logarithm?
The base e (approximately 2.71828) arises naturally in calculus as the unique base where the derivative of b to the x equals b to the x itself — no other base has this elegant property. It also appears in the formula for continuous compound interest, radioactive decay, population growth, and many other processes that involve continuous exponential change. Because it comes up organically across mathematics and science, it is called the 'natural' base, and the logarithm with this base is the 'natural' log.

Related Calculators

Was this useful?