Skip to content
2xKit

Logarithm Calculator

Calculate the logarithm of a number to any base.

Formula v1.0.0GlobalMethodologyReport an issuelogarithm-v1
How this is calculated
log_base(value) = ln(value) ÷ ln(base)

Assumptions used in this calculation

  • Domain: Both the value and the base must be positive, and the base cannot equal 1, matching the standard mathematical definition of a logarithm.

About this calculator

Most calculators only have dedicated buttons for log base 10 and natural log (base e), so finding a logarithm to any other base, like log base 2 for information theory or log base 5 for a growth-rate problem, means manually applying the change-of-base formula. This calculator finds log base b of a value for any positive base other than 1, by computing ln(value) ÷ ln(base) internally so the same tool covers common log, natural log, and any custom base you enter, including non-integer ones. Because logarithms are only defined for positive values and positive bases not equal to 1, the calculator enforces that domain and won't return a result for zero, negative, or invalid inputs. That saves rearranging the change-of-base formula by hand every time you need an uncommon base, and avoids the errors that come from mixing up which value goes in the numerator versus denominator.

Worked example

log base 2 of 8

Result: 3

Was this helpful?

Frequently asked questions