Skip to content

Logarithm Calculator

Choose base 10, e, 2, or a custom positive base other than 1. Calculate log_b(x), or switch to inverse power mode to evaluate b^y and check the logarithmic relationship.

Logarithm result

2

log₍10₎(100) = 2

10 raised to this result gives approximately 100.

How to Use the Logarithm Calculator

Choose Logarithm to calculate log_b(x), or choose Inverse power to evaluate b^y.

Select base 10 for a common logarithm, e for a natural logarithm, 2 for a binary logarithm, or choose Custom and enter another positive base that is not 1.

In Logarithm mode, enter a positive value x. In Inverse power mode, enter the exponent y. The result updates automatically.

What Is a Logarithm?

A logarithm answers the question: what exponent must the base be raised to in order to produce this value?

For example, log₂(8) = 3 because 2³ = 8. Likewise, log₁₀(1000) = 3 because 10³ = 1000.

This is why logarithms and exponential functions are inverse operations.

Logarithms and Exponents Are Inverses

The statement y = log_b(x) means exactly the same thing as b^y = x, provided the logarithm is defined.

For example, log₃(81) = 4 because 3⁴ = 81.

Inverse power mode evaluates the exponential side directly, making it useful for checking a logarithmic result.

Exact logarithm examplesEach logarithm can be checked by raising its base to the resulting exponent.
ExpressionResultBecause
log₂(8)32³ = 8
log₁₀(1000)310³ = 1000
log₁₀(0.01)-210⁻² = 0.01
ln(e)1e¹ = e
log₃(81)43⁴ = 81
log₅(1)05⁰ = 1

Common Logarithm: Base 10

A logarithm with base 10 is called a common logarithm. It is often written simply as log(x), although writing log₁₀(x) makes the base explicit.

For example, log₁₀(100) = 2 because 10² = 100, while log₁₀(0.01) = -2 because 10⁻² = 0.01.

Base 10 logarithms are especially convenient for quantities that span powers of ten.

Common logarithm basesThe base determines which exponential function the logarithm reverses.
BaseNameNotationExample
10Common logarithmlog(x) or log₁₀(x)log₁₀(1000) = 3
eNatural logarithmln(x)ln(e) = 1
2Binary logarithmlog₂(x)log₂(8) = 3
CustomAny valid baselog_b(x)log₃(81) = 4

Natural Logarithm: Base e

The natural logarithm uses the mathematical constant e as its base and is written ln(x).

Because ln(x) means log_e(x), ln(e) = 1 and ln(1) = 0.

Natural logarithms appear throughout algebra, calculus, exponential growth and decay, continuous compounding, and many scientific formulas.

Binary Logarithm: Base 2

The binary logarithm uses base 2 and is written log₂(x).

For powers of two, its meaning is immediate: log₂(8) = 3, log₂(32) = 5, and log₂(1024) = 10.

Base 2 logarithms are commonly useful when quantities grow by repeated doubling.

Custom Logarithm Bases

A logarithm can use any positive base other than 1.

For example, log₃(81) = 4 because 3⁴ = 81, while log₅(125) = 3 because 5³ = 125.

This calculator accepts custom bases within its supported numeric range and evaluates them using a change-of-base calculation.

Why the Logarithm Input Must Be Positive

For real-number logarithms, the argument x must be greater than zero.

A positive exponential base never produces zero or a negative number, so there is no real exponent y satisfying b^y = 0 or b^y < 0.

This calculator therefore rejects zero and negative logarithm inputs instead of returning a complex-valued result.

Why the Base Must Be Positive

A real logarithmic function uses a positive base. Negative bases do not define a continuous real logarithm over positive inputs.

The calculator therefore requires b > 0.

The base is checked separately from the logarithm argument, so a positive input does not make an invalid base acceptable.

Why the Base Cannot Be 1

The base 1 cannot define a logarithm because 1 raised to any real exponent is still 1.

That means powers of 1 cannot produce the full range of positive numbers required for an inverse logarithmic function.

For this reason, a logarithm base must satisfy b > 0 and b ≠ 1.

Bases Between 0 and 1

A valid logarithm base does not have to be greater than 1. Bases between 0 and 1 are also allowed as long as the base is positive and not equal to 1.

For such bases, the logarithmic function decreases as x increases. For example, log₀.₅(8) = -3 because (0.5)⁻³ = 8.

This is the opposite direction of logarithms with bases greater than 1, which increase as x increases.

Positive, Zero, and Negative Logarithm Results

A logarithm result itself can be positive, zero, or negative even though the logarithm input must be positive.

For a base greater than 1, inputs above 1 produce positive logarithms, log_b(1) = 0, and inputs between 0 and 1 produce negative logarithms.

For example, log₁₀(100) = 2, log₁₀(1) = 0, and log₁₀(0.01) = -2.

Change of Base

A logarithm in one base can be evaluated using logarithms in another base.

The change-of-base formula is log_b(x) = ln(x) / ln(b). Common logarithms can be used instead of natural logarithms as long as the same base is used in both numerator and denominator.

This is how the calculator evaluates custom bases that do not have a dedicated browser function.

Product Rule for Logarithms

The logarithm of a product can be written as the sum of two logarithms with the same base.

For positive M and N, log_b(MN) = log_b(M) + log_b(N).

For example, log₁₀(1000) can be written as log₁₀(10 × 100) = 1 + 2 = 3.

Quotient Rule for Logarithms

The logarithm of a quotient can be written as the difference of two logarithms.

For positive M and N, log_b(M/N) = log_b(M) - log_b(N).

For example, log₁₀(100/10) = 2 - 1 = 1.

Power Rule for Logarithms

An exponent inside a logarithm can be moved in front as a multiplier.

For valid real-number inputs, log_b(M^p) = p log_b(M).

For example, log₂(8²) = 2 log₂(8) = 2 × 3 = 6.

Logarithm of 1 and of the Base

Two exact logarithm identities appear often: log_b(1) = 0 and log_b(b) = 1.

The first follows from b⁰ = 1. The second follows from b¹ = b.

These identities hold for every valid logarithm base.

Inverse Power Mode

Inverse power mode evaluates b^y instead of solving for y.

For example, if log₂(1024) = 10, inverse mode with base 2 and exponent 10 returns 1024.

This directly demonstrates the inverse identities log_b(b^y) = y and b^(log_b(x)) = x when the expressions are defined.

Logarithms and Scientific Notation

Base 10 logarithms provide a direct way to understand powers of ten.

If x = 10ⁿ, then log₁₀(x) = n. That means log₁₀(1,000,000) = 6 and log₁₀(0.001) = -3.

For values between exact powers of ten, the logarithm lies between the corresponding integer exponents.

Common Logarithm Mistakes

Using zero or a negative argument: Real logarithms require x > 0.

Using base 1: A valid logarithm base cannot equal 1.

Confusing log_b(x) with b^x: These are inverse operations, not the same calculation.

Assuming log(M + N) = log(M) + log(N): The product rule applies to multiplication, not addition.

Using different bases in change of base: The numerator and denominator must use the same logarithm base.

Assuming a logarithm result cannot be negative: A positive logarithm input can still produce a negative logarithm.

How This Calculator Works

For natural logarithms, the calculator uses the browser's natural-logarithm function. Base 10 and base 2 use their corresponding logarithm functions.

For other valid bases, it applies the change-of-base identity log_b(x) = ln(x) / ln(b).

Inverse mode calculates b^y directly. Inputs and outputs are checked so nonfinite values, invalid bases, invalid logarithm arguments, overflow, and numerical underflow are reported rather than presented as valid results.

Numerical Precision

Many logarithms are irrational, so their decimal representation cannot be written exactly with a finite number of digits.

The calculator uses JavaScript floating-point arithmetic and displays a formatted approximation of the underlying result.

Very large or very small powers can exceed the numeric range available in the browser even when the mathematical expression itself is meaningful.

Logarithm Formulas

Logarithms reverse exponentiation and follow identities related to the laws of exponents.

Logarithm definition
Inverse logarithm
Inverse exponential
Change of base
Product rule
Quotient rule
Power rule
Logarithm of 1
Logarithm of the base
Logarithm base; b > 0 and b ≠ 1
Positive logarithm argument
Exponent or logarithm result
Positive values in the logarithm rules
Exponent in the power rule

Examples

Binary logarithm

Base 2, x = 8

log₂(8) = 3.

Common logarithm

Base 10, x = 1000

log₁₀(1000) = 3.

Negative logarithm result

Base 10, x = 0.01

log₁₀(0.01) = -2.

Natural logarithm

Base e, x = e

ln(e) = 1.

Custom base

Base 3, x = 81

log₃(81) = 4.

Logarithm of 1

Base 5, x = 1

log₅(1) = 0.

Base below 1

Base 0.5, x = 8

log₀.₅(8) = -3.

Inverse power

Base 2, exponent 10

2^10 = 1024.

Frequently Asked Questions

What is a logarithm?

A logarithm tells you which exponent a base must be raised to in order to produce a given positive number.

What is log₂(8)?

log₂(8) = 3 because 2³ = 8.

What is log₁₀(1000)?

log₁₀(1000) = 3 because 10³ = 1000.

What is ln?

ln is the natural logarithm, which uses the mathematical constant e as its base.

What is the difference between ln and log?

ln always means logarithm base e. In many mathematical and calculator contexts, log without a written base means base 10, although notation conventions can vary.

What is a binary logarithm?

A binary logarithm uses base 2. For example, log₂(32) = 5 because 2⁵ = 32.

Can I use a custom logarithm base?

Yes. Choose Custom and enter any supported positive base other than 1.

Why can the base not be 1?

Because 1 raised to every real exponent remains 1, so exponentiation with base 1 cannot be inverted across the positive real numbers.

Can the logarithm base be less than 1?

Yes. A base between 0 and 1 is valid as long as it is positive and not equal to 1.

Can I take the logarithm of zero?

Not as a real number. This calculator requires the logarithm argument to be greater than zero.

Can I take the logarithm of a negative number?

Not in the real-number system used by this calculator. Negative arguments require complex logarithms.

Can a logarithm result be negative?

Yes. For example, log₁₀(0.01) = -2 because 10^-2 = 0.01.

What is log_b(1)?

It is always 0 for a valid base because b⁰ = 1.

What is log_b(b)?

It is always 1 for a valid base because b¹ = b.

What is the change-of-base formula?

log_b(x) can be calculated as ln(x) divided by ln(b), or with any other valid logarithm base used consistently in both numerator and denominator.

How do I calculate log base 3 on a calculator?

Use the change-of-base formula: log₃(x) = ln(x) / ln(3). This calculator performs that calculation automatically when you choose a custom base.

Are logarithms the inverse of exponents?

Yes. y = log_b(x) is equivalent to b^y = x when the base and argument satisfy the logarithm domain conditions.

What does inverse power mode do?

It calculates b^y. This lets you reverse or verify a logarithmic calculation.

Is log(a + b) equal to log(a) + log(b)?

No. The logarithm product rule applies to multiplication: log(ab) = log(a) + log(b). There is no corresponding rule that splits a logarithm of a sum this way.

Why is my logarithm result a decimal?

Many logarithms are irrational and cannot be represented exactly with a finite decimal, so the calculator displays a numerical approximation.

References