Logarithm (log) Calculator

Logarithm calculator that computes log, ln, and log10 in any base, with change-of-base steps, domain checks, and inverse b^x values. Ideal for algebra, calculus, and engineering.

Full original guide (expanded)

Logarithm (log) Calculator

Compute logarithms in any base: natural log ln, base-10 log10, base-2 log₂, or a custom base. The calculator shows the change-of-base steps, domain checks, and the inverse exponential b^y.

For algebra, calculus, and engineering

Designed to be explicit about base, domain, and numerical precision, so you avoid silent errors.

Author: CalcDomain Math Team

Reviewed by: Applied mathematician

Last updated: 2025

This tool is for learning and checking calculations. For exams or graded work, always follow your instructor’s calculator policy and show your own working.

Interactive logarithm workspace

What do you want to compute?
Base b

Valid bases are b > 0 and b ≠ 1. The calculator checks this automatically.

Show detailed steps?

Example: ln(100), log10(1000), log2(1024), log5(125) = 3.

Logarithm value, equivalent ln/log10, and inverse b^y will appear here.
Step-by-step explanation will appear here.

What is a logarithm?

A logarithm is the inverse of an exponential function. If \[ b^y = x, \] with base \(b > 0\) and \(b \ne 1\), then the logarithm of \(x\) base \(b\) is \[ y = \log_b(x). \] In words: “\(y\) is the exponent you put on \(b\) to get \(x\)”.

Common choices of base are:

  • Base 10: \(\log_{10}(x)\), often written simply as \(\log(x)\) in engineering.
  • Base e: \(\log_e(x)\), written \(\ln(x)\), dominating calculus and analysis.
  • Base 2: \(\log_2(x)\), fundamental in computer science and information theory.

Change-of-base formula

Calculators usually provide only \(\ln\) and \(\log_{10}\). To compute any base \(b\), you use the change-of-base formula:

\[ \log_b(x) = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}. \]

As long as \(x > 0\), \(b > 0\) and \(b \ne 1\), the formula is valid and easy to evaluate on a scientific calculator or in software. Our interface uses this formula internally and shows you the intermediate values if you enable “show steps”.

Domain of the logarithm

For real-valued logarithms, there are strict domain rules:

  • The argument must be positive: \(x > 0\).
  • The base must be positive: \(b > 0\).
  • The base cannot be 1: \(b \ne 1\).

If these conditions fail, the logarithm is not defined in the real numbers and the calculator will warn you instead of returning a misleading numeric result.

Examples

  • \(\log_{10}(1000) = 3\) because \(10^3 = 1000\).
  • \(\log_2(1024) = 10\) because \(2^{10} = 1024\).
  • \(\log_5(125) = 3\) because \(5^3 = 125\).
  • \(\ln(e^4) = 4\) because the natural log is the inverse of \(e^x\).

FAQ: using the logarithm calculator safely

Why does the calculator say my input is “out of domain”?

This happens when \(x \le 0\), \(b \le 0\) or \(b = 1\). In those cases, the logarithm is not defined in the real numbers. If you are working with complex analysis, you need a different tool that supports complex values.

Is there a difference between log and ln?

Yes. Strictly speaking, \(\ln(x)\) is log base \(e\), while \(\log(x)\) can mean log base 10 or base \(e\) depending on the context. This calculator always lets you pick the base explicitly, so you avoid ambiguity.

How many decimal places do I need?

For most homework and engineering applications, 4–6 decimal places are more than enough. You can increase the precision if you are propagating error through several calculations, but be careful not to over-interpret the extra digits.

Can I rely on this calculator for scientific or financial decisions?

This tool uses standard double-precision floating-point arithmetic, similar to a scientific calculator. It is suitable for educational and many practical uses, but you are ultimately responsible for checking whether the precision and model are appropriate for critical work (for example, safety calculations, regulatory reporting, or financial contracts).


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[b^y = x,\]
b^y = x,
Formula (extracted LaTeX)
\[y = \log_b(x).\]
y = \log_b(x).
Formula (extracted LaTeX)
\[\log_b(x) = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}.\]
\log_b(x) = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}.
Formula (extracted LaTeX)
\[' + '\\log_{' + b + '}(' + xVal + ') = ' + '\\frac{\\ln(' + xVal + ')}{\\ln(' + b + ')} \\approx ' + logFormatNumber(y, dec) + '\\]
' + '\\log_{' + b + '}(' + xVal + ') = ' + '\\frac{\\ln(' + xVal + ')}{\\ln(' + b + ')} \\approx ' + logFormatNumber(y, dec) + '\
Formula (extracted LaTeX)
\[' + 'x = b^y = ' + b + '^{' + yVal + '} \\approx ' + logFormatNumber(x, dec) + '\\]
' + 'x = b^y = ' + b + '^{' + yVal + '} \\approx ' + logFormatNumber(x, dec) + '\
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
\[ \log_b(x) = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}. \]
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 1.5.0
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).