Math

Logarithm Calculator

Calculate logarithms in any base, and understand what a log actually answers.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

A logarithm answers one question

What power do I raise this base to, in order to get this number? log₁₀(1000) = 3 because 10³ = 1000. Every property of logarithms follows from that, and the confusion people carry usually comes from having learned the rules without the question.

The three bases in use

Base 10, written log, suits anything measured in orders of magnitude — decibels, pH, the Richter scale. Base e, written ln, is the natural logarithm and appears wherever continuous growth or decay does: compound interest, radioactive decay, population models. Base 2, written lg or log₂, dominates computing, because it counts halvings and doublings. A binary search over a million items takes about 20 steps, which is log₂ of a million.

Changing base

Any log converts to any other by dividing: log_b(x) = ln(x) / ln(b). This is why calculators offering only log and ln can still produce log base 7 — and why the choice of base changes a logarithm only by a constant factor, which is the reason computer scientists write O(log n) without specifying one.

The rules turn multiplication into addition

log(ab) = log(a) + log(b), log(a/b) = log(a) − log(b), and log(aⁿ) = n·log(a). This conversion of multiplication into addition is what slide rules exploited and what made logarithm tables one of the most consequential computational tools in history. It is still why very large products are computed in log space — summing logs avoids the overflow that multiplying directly would cause.

The domain is strictly positive

You cannot take the log of zero or a negative number in the reals: no power of a positive base produces them. log(0) tends to negative infinity as the input approaches zero from above. In code this is a frequent runtime failure, since a value that is normally positive occasionally arrives as zero — which is why log-transforming data with zeros conventionally uses log(x + 1).

Log scales compress and reveal

Plotting on a log axis turns exponential growth into a straight line, which makes the growth rate visible as a slope and makes several orders of magnitude fit on one chart. The trade is that equal visual distances represent equal ratios rather than equal differences, so a log chart understates absolute change dramatically. A reader who does not notice the axis is logarithmic will misjudge the magnitude badly, which is why log axes need labelling clearly rather than quietly.

Frequently Asked Questions

Privacy & Security

All processing happens locally in your browser — nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter the value and the base. The logarithm is computed instantly.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.