Calculate logarithm

Calculate a logarithm in a chosen base, its natural and base-10 forms, and the matching inverse power.

freeworks offlinenothing uploaded
ToolLogarithm Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The change-of-base identity log_b(x) = ln(x) ÷ ln(b) computes the requested base from natural logarithms. The inverse raises the selected base to the supplied exponent, and the result also includes base-10 and natural-log values.

  • Base 10 is the initial choice because common logarithms are familiar in measurement tables.
  • Results are rounded to a fixed display precision.

Worked example

log base 2 of 8
A clean power of two, so the change of base working comes out exact
Input
											Value: 8
Base: 2
										
Output
												Log base: 3
Natural log: 2.079442
Log10: 0.90309
Antilog base: 256
Change of base working: log base 2 of 8 = ln(8) / ln(2) = 2.079442 / 0.693147 = 3
											

When to use this

pH and decibel work uses logarithmic scales, growth models solve for exponents, and computer-science lessons compare binary and decimal logarithms.

Edge cases

  • A value of zero or below has no real logarithm and is rejected.
  • Base one is rejected because ln(1) is zero and cannot form the denominator.
  • A fractional exponent can produce a valid inverse result even though the input is not an integer.

References