All calculators

Education

Logarithm Calculator

Last updated: May 31, 2026

Written by Blake Boege

A logarithm calculator is an online mathematical utility designed to calculate the logarithm of a number to a specified base. By inputting the value and the desired base, the tool computes the exponent to which the base must be raised to produce that value, solving the inverse of exponentiation. The calculator supports common logarithms (base 10), natural logarithms (base e, written as ln), and custom bases. It is widely used by students, engineers, and scientists for logarithmic scaling, pH measurements, acoustics, and complexity analysis.

Compute logarithms for any base, including common logarithms (base 10) and natural logarithms (base e). Solve for missing exponents in exponential equations with step-by-step math.

Quick Answer

Compute logarithms for any base, including common logs (log10) and natural logs (ln). Enter the number and base to get the exponent instantly.

Mode

The number to take the logarithm of. Must be greater than 0. · e.g. 8

The base of the logarithm. Must be greater than 0 and not equal to 1. · e.g. 2

Log with custom base

log_2(x)

3

2^3 = 8

Value (x)8
Base (b)2
log_2(x)3
Equivalent exponent2^3 = 8
Formulalog_b(x) = ln(x) / ln(b)

log base 2 of 8 is 3. In other words, 2^3 = 8.

Was this helpful?

Examples

log₂(8) [base 2]

= 3 · because 2³ = 8

log₁₀(1000) [base 10]

= 3 · because 10³ = 1000

ln(e) [natural log]

= 1 · because e¹ = e

How it works

A logarithm represents the power to which a base must be raised to equal a given number. It serves as the inverse operation to exponents.

Logarithm definition

log_b(x) = y if and only if b^y = x

Change of base formula

log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)

Common logarithms vs. natural logarithms

Logarithms are typically grouped into three categories based on their base:

  • Common Logarithms (Base 10): Written as log(x) or log₁₀(x). These are widely used in sciences to measure scales of magnitude, such as sound decibels, earthquake intensities (Richter scale), and acidity (pH).
  • Natural Logarithms (Base e): Written as ln(x). The base is Euler's number e (≈ 2.71828), which occurs naturally in calculus, compound interest, physics, and modeling populations.
  • Custom Base Logarithms: Written as log_b(x) for any custom base b. For example, base 2 is highly common in computer science and information theory for representing binary branches (bits).

Logarithm rules and identities

Use these mathematical identities to manipulate and solve logarithm equations by hand:

  • log_b(1) = 0
  • log_b(b) = 1
  • log_b(x · y) = log_b(x) + log_b(y) (Product rule)
  • log_b(x / y) = log_b(x) − log_b(y) (Quotient rule)
  • log_b(x^k) = k · log_b(x) (Power rule)

Related math tools

Explore other algebraic operations and numeric tools:

Disclaimer. Logarithms are only defined for positive real numbers. Custom bases must be greater than zero and not equal to one.

Related Calculators

More tools from Education

Frequently asked questions

A logarithm is the mathematical inverse of exponentiation. It answers the question: to what exponent must a given base be raised to produce a specific value? In symbols, log_b(x) = y means b^y = x. For example, the base-2 logarithm of 8 is 3, because 2³ = 8.

For perfect powers, you can compute them by counting the exponents (e.g., log₁₀(100) = 2). For other values, you can use the change-of-base formula to evaluate the logarithm using the natural log (ln) or common log (log₁₀): log_b(x) = ln(x) / ln(b).

Log (or log₁₀) refers to the common logarithm which has a base of 10. Ln refers to the natural logarithm which has a base of e (approximately 2.71828). Custom base logarithms allow you to calculate the exponent for any valid positive base.

No. In the real number system, logarithms are only defined for positive numbers (x > 0) with a positive base (b > 0) that is not equal to 1. Negative numbers and zero yield undefined results because no real exponent can raise a positive base to a negative value or zero.

Key logarithm properties include the product rule (log(xy) = log(x) + log(y)), the quotient rule (log(x/y) = log(x) − log(y)), and the power rule (log(x^k) = k · log(x)). These rules are fundamental for simplifying algebraic equations.