NumberSwift.
MATH · ALGEBRA

Logarithm Calculator

Find the exponent needed to raise a chosen logarithm base to a positive number.

YOUR NUMBERS

◎ Calculations stay in your browser.

A LITTLE CLARITY

Logarithm

2
Base used10

Real logarithms only: x > 0, b > 0 and b ≠ 1. Floating-point results are rounded for display. Bases extremely close to 1 can magnify small input differences.

Formula checked · NumberSwift · Review process

BEHIND THE NUMBERS

How this calculator works

The logarithm answers “what exponent turns this base into the entered number?” Change of base divides the natural logarithm of the number by the natural logarithm of the base. A base between zero and one is valid and reverses the growth direction. The number must be positive, and base one cannot define a unique exponent. The natural-base preset uses the mathematical constant e rather than a rounded user value.

Formula

log_b(x) = ln(x)/ln(b), so b^(log_b(x)) = x. Natural log uses b=e; common log uses b=10.

Assumptions & limitations

Real logarithms only: x > 0, b > 0 and b ≠ 1. Floating-point results are rounded for display. Bases extremely close to 1 can magnify small input differences.

Worked example

log_10(100) = 2 because 10² = 100. log_2(8) = 3. ln(e) = 1. With custom base 0.5, log_0.5(4) = −2.

Our approach to calculations ↗
GOOD TO KNOW

Common questions

Why can the logarithm be negative?

With a base above one, positive numbers below one need negative exponents. Bases below one reverse that relationship.

Why is base one invalid?

One raised to any real power remains one, so it cannot give a unique inverse for general numbers.

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

Not within this real-number tool. Zero has no finite real logarithm and negative inputs require a different complex-number treatment.