Logarithm Calculator

Logarithms to any base, with the working and the exact answer when there is one.

Calculate

How to use this calculator

Enter the base b and the number x. The calculator finds log base b of x, shows the change-of-base working, and gives an exact whole-number answer when x is a power of b.

How it's calculated

log_b(x) = y means b^y = x. Change of base: log_b(x) = ln(x) ÷ ln(b).

Worked example

log base 2 of 8 = 3 because 2³ = 8. log base 10 of 1000 = 3.

Frequently asked questions

Why can't I take the log of a negative number?

No power of a positive base gives a negative result, so the logarithm does not exist.

What is ln?

ln is the natural logarithm, with base e ≈ 2.71828.

Related tools

Last updated October 2026. Results are for learning and guidance; always check important work. Calculations run in your browser and are not stored.