Logarithm Calculator

Compute log base 2, log base 10, natural log (ln), or any custom base — with the change-of-base formula shown step by step.

Input

Result

Enter a number and press Calculate

Copied!

Summary

Compute log base 2, log base 10, natural log (ln), or any custom base — with the change-of-base formula shown step by step.

How it works

  1. Enter the number (argument) you want to take the logarithm of.
  2. Choose a base: 2, 10, e (natural log), or type a custom base.
  3. Click Calculate — the result appears instantly using the built-in Math.log function.
  4. The change-of-base breakdown (ln x / ln b) is shown below the result.
  5. Use the swap button to set the result as the new argument for chained calculations.

Use cases

  • Convert between binary, decimal, and natural logarithms.
  • Verify log calculations done by hand in math or engineering coursework.
  • Determine the number of bits required to represent a given number of values.
  • Calculate pH levels, decibels, or earthquake magnitude (Richter scale).
  • Solve exponential growth and decay problems in finance or science.
  • Check information entropy calculations in data compression.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu