Skip to content

Logarithm Calculator

Logarithms in any base, plus the inverse exponential. Common, natural, and binary logarithms for the same input alongside.

Logarithms in any base, plus the inverse exponential. Solves logb(x) = y for any one of the three variables.

What does log mean?

The logarithm answers the question "to what power must I raise the base to get x?". So log₁₀(1000) = 3 because 10³ = 1000. The natural logarithm ln uses the base e ≈ 2.71828, which is the natural choice when modelling growth and decay because it is the unique base whose derivative is itself.

Change of base

Most calculators (and most languages) only natively support base 10 and base e. You can compute the log in any other base by the change-of-base formula: log_b(x) = log(x) / log(b). The calculator above does this for you when you choose a custom base, so log₃(81) is reported correctly as 4.

Where logs show up

Logarithmic scales are how we make wide-ranging quantities legible. Decibels are logarithmic, so going from 60 to 70 dB is a tenfold increase in sound power. The Richter scale for earthquakes, the pH scale in chemistry, and the magnitude scale for stars are all logarithmic. In computer science, the log₂ of n is the depth of a balanced binary tree with n leaves, which is why algorithms with O(log n) running time scale to billions of items.