Logarithm Calculator: log, ln and Any Base with Steps
Calculate log, ln or log₂ in any valid base with steps. Use change of base, find antilogs or solve for an unknown base. Free to use, no account needed.
What does the logarithm calculator do?
It has four tabs. The calculate tab finds a logarithm in any base: when the result is exact (log₂ 8 = 3, log₄ 8 = 3/2) it is given as a fraction, otherwise as a decimal. The unknown tab finds x, b or y in log_b x = y. The change of base tab rewrites a logarithm as a quotient of logarithms in another base. The rules tab expands one logarithm or condenses several into one.
What is a logarithm?
log_b x = y means that b raised to the power y gives x: b^y = x. Example: log₂ 8 = 3 because 2³ = 8. The base must be positive and different from 1, and the argument must be positive. The logarithm in base 10 is written log and the one in base e is written ln. In the base box you can type 10, e, 2 or any other positive number.
Change of base
Calculators only have log and ln. A logarithm in another base is found with the rule log_b x = ln x / ln b. Example: log₂ 10 = ln 10 / ln 2 = 2.302585 / 0.693147 = 3.321928.
Antilogarithm and unknown base
If x is the unknown in log_b x = y, then x = b^y. This is the antilogarithm: if log x = −2 then x = 10⁻² = 0.01. If the base is the unknown, b = x^(1/y): if log_b 81 = 4 then b = 81^(1/4) = 3.
Logarithm rules
- Product: log(a·b) = log a + log b
- Quotient: log(a/b) = log a − log b
- Power: log(aⁿ) = n·log a
- Root: log(√a) = (1/2)·log a
Expanding: log(x^2*y/z) = 2log(x) + log(y) − log(z). Condensing: 2log(x) + 3log(y) - log(z) = log(x²·y³/z). In the rules tab type log (base 10), ln (base e) or log2 (base 2). There is no rule for the logarithm of a sum: log(x + y) cannot be expanded.
Limits
The logarithm of zero or of a negative number is undefined in the real numbers. Decimal results are rounded to 12 significant digits. An exact result is looked for only when the number and the base are whole numbers or fractions and the exponent is a fraction with a small denominator. Expanding and condensing are valid when every expression inside a logarithm is positive. When condensing, all logarithms must have the same base. For solving general logarithmic equations see the equation solver.
Frequently asked questions
How do you calculate the logarithm of a number?
In this example, the logarithm of 5 to base 2 is 2.322. By definition, the result is the exponent that produces the given number from the base, and the change of base rule provides another calculation, with a positive argument and a positive base different from one required for real logarithms.
Related calculators
-
Mathematics
Exponent Calculator: Negative and Fractional Powers
Calculate powers such as 2^10 or 8^(2/3) with steps. Handle negative and fractional exponents, apply rules and convert scientific notation. Free to use. -
Mathematics
Scientific Calculator
Type an expression and see the result at once: trigonometry, logarithms, powers, roots, factorials. Degree and radian modes, memory and history, all in your browser. -
Mathematics
Equation Solver
Type an equation and see the roots step by step: linear, quadratic and cubic, discriminant, complex roots, numeric roots and systems in 2, 3 or 4 unknowns. -
Mathematics
Function Graph Plotter
Type f(x) and see its graph: several functions at once, zoom and pan, roots and intersection points. Download the graph as SVG or PNG. -
Mathematics
Absolute Value and Piecewise Function Calculator
Solves absolute value equations and inequalities step by step, evaluates expressions, writes them piecewise and evaluates piecewise functions. -
Mathematics
Algebraic Expression Simplifier
Simplifies an algebraic expression step by step: expands brackets, combines like terms, cancels common factors in rational expressions and evaluates at given values.
Found a mistake or something missing?
If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.