Logarithm Calculator

Calculate log base 10, natural log (ln), log base 2, or any custom base, plus the antilogarithm. Shows the formula and exact result.

🔢 Logarithm
Results

Choose a mode and enter a value.

Logarithm Calculator: Common, Natural, Binary, and Custom Base

A logarithm answers the question: to what power must a base be raised to produce a given number? This calculator computes logarithms in base 10, base e (the natural log), base 2, and any custom base you choose, and it can also run the reverse operation as an antilogarithm. It shows the result along with the formula used, so it works as both a fast tool and a learning aid.

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

Common: log₁₀(x)
Natural: ln(x) = log_e(x), e ≈ 2.71828
Binary: log₂(x)
Change of base: log_b(x) = ln(x) / ln(b)
Antilog: bʸ = x

Example: log₁₀(1000) = 3 because 10³ = 1000

Understanding the Base

The base is the number being raised to a power. Base 10 is the common logarithm used in scientific notation and many engineering scales. Base e is the natural logarithm, central to calculus and any process of continuous growth or decay. Base 2 is the binary logarithm, essential in computer science for measuring information and algorithm complexity. The base must be positive and not equal to 1, since 1 raised to any power is always 1.

Where Logarithms Are Used

Logarithms turn multiplication into addition and compress huge ranges into manageable scales, which is why they appear across science. The pH scale measures acidity on a base-10 log scale, the Richter scale rates earthquake magnitude logarithmically, and decibels express sound intensity the same way. In computer science, base-2 logs count the steps in efficient algorithms, and in finance the natural log models continuous compounding.

The Change of Base Formula

Calculators compute any base through the change of base formula: log base b of x equals the natural log of x divided by the natural log of b. This calculator uses exact native functions for the common bases 10, e, and 2, and the change of base formula for every other base, so a custom base like 3 or 7 is just as accurate. Each result shows this breakdown so you can follow the math.

Tips & Recommendations

Pick the Right Base

Use base 10 for scientific scales, ln for growth and calculus, and base 2 for computing. Use custom base for anything else.

When to Use ln

The natural log fits continuous growth, decay, and compound interest, where the constant e appears naturally in the math.

Log Rules

log(a×b) = log a + log b, log(a/b) = log a - log b, and log(aⁿ) = n × log a. These turn hard products into simple sums.

Positive Inputs Only

The number must be greater than 0. Logarithms of zero or negative numbers are undefined in the real numbers.

Frequently Asked Questions

What is the natural logarithm (ln)?

The natural logarithm is the logarithm with base e, where e is roughly 2.71828, a fundamental mathematical constant. Written as ln(x), it answers the question: e raised to what power gives x? The natural log appears throughout calculus, growth and decay models, compound interest, and physics because e arises naturally in continuous change.

What is the difference between log and ln?

By common convention, log usually means the base-10 logarithm (the common logarithm), while ln always means the base-e natural logarithm. So log(100) is 2 because 10 squared is 100, while ln(100) is about 4.6 because e to the 4.6 power is about 100. This calculator lets you choose base 10, base e, base 2, or any custom base so there is no ambiguity.

Why must the number be positive?

Logarithms are only defined for positive numbers because no real power of a positive base can produce zero or a negative result. For example, there is no real exponent that makes 10 equal to negative 5 or to zero. As the input approaches zero the logarithm heads toward negative infinity, and at or below zero it is undefined, so the calculator returns no result.

Why can't the base be 1?

A logarithm base of 1 is undefined because 1 raised to any power is always 1, never any other number. There is no exponent that turns 1 into, say, 8, so log base 1 cannot be defined. The base must also be positive and not equal to 1, which is why the calculator rejects a base of 0, 1, or any negative number.

What is the change of base formula?

The change of base formula lets you compute a logarithm in any base using natural logs: log base b of x equals ln(x) divided by ln(b). This is how calculators evaluate uncommon bases. For example, log base 3 of 9 equals ln(9) divided by ln(3), which is about 2.197 divided by 1.099, giving exactly 2.

What is an antilogarithm?

The antilogarithm reverses a logarithm. If the log base b of x equals y, then the antilog raises the base back to that power: b to the y equals x. For example, since log base 2 of 1024 is 10, the antilog 2 to the 10th power returns 1024. This mode is useful for undoing a logarithm or working with logarithmic scales.

Recent Calculations

No calculations yet

Last updated: June 17, 2026