Math

Logarithm Calculator

Calculate a logarithm with any base.


Logarithm Calculator

Advertisement

A general logarithm calculator that works with any base — base 10, base 2, natural log (base e), or any custom base.

How it works

Using the change-of-base formula, the logarithm is computed as the natural log of the number divided by the natural log of the chosen base.

What this does not include

This does not include a shortcut for base 2 specifically — for that dedicated page, use this site’s log base 2 calculator instead.

How to use this calculator

  1. Enter the number and the base.

A worked example

log base 10 of 1,000 = 3, since 10³ = 1,000.

log base 2 of 8 = 3, since 2³ = 8.

What the variables mean

Variable Meaning
x The number being evaluated
Base The base of the logarithm — how many times it’s multiplied to reach x

Edge cases worth knowing

Zero and negative numbers have no real logarithm. No power of a positive base ever produces zero or a negative result, so the calculator declines to show one.

Different bases produce very different answers for the same x — log base 10 and log base 2 of the same number are rarely equal, since they’re asking “how many times” using a different multiplier each time.

Frequently asked questions

What does a logarithm actually answer?

“To what power must the base be raised to get this number” — log base 10 of 1000 is 3, because 10³ equals 1000.

How do I calculate a natural logarithm?

Enter the mathematical constant e (approximately 2.718281828) as the base.

Why can’t the base be 1 or less?

A base of 1 raised to any power always equals 1, making the logarithm undefined for any other input; a base of 0 or negative similarly breaks the underlying exponential relationship.

Be the first to rate this

Written by

J. Adeyemi

Statistics writer

J. Adeyemi writes the statistics and probability calculators, from descriptive summaries through to distributions and conditional probability. The recurring theme is scope: each page states precisely which question it answers, because most statistical mistakes come from applying a correct formula to the wrong question. Related-but-different measures get separate pages rather than being quietly merged.

Reviewed by

T. Okafor

Calculator reviewer — mathematics

T. Okafor reviews the mathematics calculators, verifying algebraic correctness and, just as importantly, behaviour at the edges — division by zero, undefined results, and the floating-point cases where a formula technically returns a number that should be reported as undefined. Every test case is recomputed independently rather than taken on trust.

How we write and review

Related calculators