Calculate the logarithm of a number in any base — including common log (base 10) and natural log (base e).
A logarithm answers one question: "what power do I need to raise the base to, in order to get this number?" So log base 10 of 100 equals 2, because 10² = 100. Every log calculation is really just an exponent problem written backwards.
Since browsers only compute natural log directly, every other base is found with the change-of-base formula:
| Base | Name | Typical use |
|---|---|---|
| 10 | Common log | pH scale, decibels, Richter scale |
| e (≈2.718) | Natural log | Calculus, compound growth, half-life |
| 2 | Binary log | Computer science, information theory |