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
Change-of-base formula
All common bases
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
- Enter the number (argument) you want to take the logarithm of.
- Choose a base: 2, 10, e (natural log), or type a custom base.
- Click Calculate — the result appears instantly using the built-in Math.log function.
- The change-of-base breakdown (ln x / ln b) is shown below the result.
- 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