Math · Algebra

Logarithm calculator.

Enter a base and a number. You get the logarithm, the natural, common and binary logs, the change-of-base steps, and an optional check of the log laws.

log₂(8) = 3, because 2³ = 8. With y = 4 and a power of 3, the laws check out in base 2: log(8 × 4) = 5 = 3 + 2, log(8 / 4) = 1 = 3 − 2, and log(8³) = 9 = 3 × 3.

log_b(x) = ln(x) / ln(b)log(xy) = log x + log yOpened sources 8 October 2026

Advertisement

Your numbers

A positive number other than 1, or type e for the natural base.
Must be greater than 0.
For the product and quotient law check.
For the power law check.

Your result

Fill the form and press Calculate.

The formulas

The logarithm log_b(x) is the exponent you put on b to get x, so log_b(x) = y means bʸ = x. Any calculator that only has natural log can still compute any base with the change-of-base formula log_b(x) = ln(x) / ln(b). The laws are log(xy) = log x + log y (product), log(x/y) = log x − log y (quotient) and log(xᵖ) = p log x (power), for positive x and y.

Worked example

log₂(8) = ln 8 / ln 2 = 2.07944154 / 0.69314718 = 3. Natural log of 10 (base e) is 2.30258509, and log₁₀(5000) = 3.69897. For a base-5 logarithm of 0.04 the answer is −2, since 5⁻² = 0.04.

Limits

Only real logarithms are computed, so x must be greater than 0 and the base must be positive and not 1. The log-law check compares both sides in floating-point arithmetic and reports them equal when they agree to about nine digits.

Sources, opened 15 October 2026: OpenStax, Algebra and Trigonometry 2e, 6.5 Logarithmic Properties (product, quotient and power rules; change-of-base formula log_b M = ln M / ln b).

Frequently asked questions

How do you calculate a logarithm with any base?

Use the change-of-base formula: log_b(x) = ln(x) / ln(b). For log₂(8) that is 2.07944154 / 0.69314718 = 3.

What is the difference between log and ln?

ln is the natural logarithm with base e (about 2.71828), and log usually means base 10. ln(10) is 2.30258509 and log₁₀(10) is 1.

Can you take the log of a negative number or zero?

Not as a real number. A logarithm needs a positive input, so the calculator asks for x greater than 0.

What are the main logarithm laws?

Product: log(xy) = log x + log y. Quotient: log(x/y) = log x − log y. Power: log(xᵖ) = p × log x. They hold for any valid base.

Why can the base not be 1?

Every power of 1 is 1, so no exponent could give any other number. The change-of-base formula would also divide by ln 1 = 0.

Learning aid

Educational calculator with worked steps. Check answers and the required method against your own course or textbook. Nothing you type leaves your browser.

Advertisement
Advertisement