Command Palette

Search for a command to run...

Calculator

Logarithm Calculator

Calculate logarithms in any base. Supports natural log (ln), common log (log10), and custom bases.

About Logarithm Calculator

A logarithm calculator computes logarithms in any base, supporting natural logarithms (ln, base e), common logarithms (log10), and custom bases. Logarithms are the inverse of exponents and are used extensively in science, engineering, finance, and computer science. They appear in pH calculations, sound intensity (decibels), Richter scale for earthquakes, information theory, and algorithm analysis.

How to Use

Enter the number (argument) and select the logarithm base: natural log (base e), common log (base 10), or custom base. The calculator instantly displays the result. For common calculations, it also shows helpful relationships — for example, log2(8) = 3 because 2^3 = 8.

Formula / Key Equations

log_b(x) = y means b^y = x. Natural log: ln(x) = log_e(x). Change of base formula: log_b(x) = ln(x) / ln(b). Key properties: log(ab) = log(a) + log(b), log(a/b) = log(a) - log(b), log(a^n) = n × log(a).

Common Use Cases

Calculating pH in chemistry: pH = -log10[H+]. Measuring sound intensity in decibels: dB = 10 × log10(I/I0). Analyzing algorithm complexity (logarithmic time). Solving exponential equations by taking logarithms of both sides. Financial calculations involving continuously compounded interest. Radioactive decay half-life calculations.

Limitations

Logarithms are only defined for positive real numbers (the argument x must be > 0). The base b must be positive and not equal to 1. Results are computed with standard floating-point precision (approximately 15-17 significant digits). The calculator handles real-valued logarithms only — complex logarithms are not supported.

Frequently Asked Questions

What is the difference between ln and log?

ln (natural logarithm) uses base e (approximately 2.71828) and is the most mathematically natural logarithm. log (common logarithm) uses base 10 and is commonly used in engineering and science. In many programming languages, log() means natural log, but in calculators, log() often means log10.

What is base e?

Euler's number e (approximately 2.71828) is a fundamental mathematical constant that arises naturally in calculus, compound interest, population growth, and many areas of mathematics. It is the base of the natural logarithm and the natural exponential function.

Why are logarithms useful?

Logarithms convert multiplication into addition and exponents into multiplication, making complex calculations simpler. They also compress large ranges — the Richter scale and decibel scale use logarithms because earthquake magnitudes and sound intensities span many orders of magnitude.

How do I calculate logarithms with a different base?

Use the change of base formula: log_b(x) = ln(x) / ln(b). For example, log2(32) = ln(32) / ln(2) = 3.526 / 0.693 = 5 (since 2^5 = 32). Our calculator supports direct input of any base.

What does log(1) equal?

log(1) = 0 in any base, because any number raised to the power 0 equals 1. That is, b^0 = 1 for all valid bases b, so log_b(1) = 0. Similarly, log_b(b) = 1 because b^1 = b.

Related Tools