Current for 2026As of: July 2026

Logarithm Calculator calculate logarithm.

log₁₀, log₂, natural logarithm (ln) and custom base – with the change-of-base formula

FreeNo sign-upGDPR-compliant

Logarithm Calculator

Calculate logarithms to any base – log₁₀, log₂, ln and custom base

log₍10₎

3

log_10(1000) = 3

Calculation path (change-of-base formula)

ln(1,000) / ln(10) = 6.907755 / 2.302585 = 3

Understanding logarithms

From inverse function to power and the change-of-base formula

The logarithm is the inverse operation of exponentiation. While the power bʸ = x calculates the value x from base b and exponent y, log_b(x) = y determines the exponent y when base b and result x are known. This makes the logarithm indispensable wherever quantities are thought of on scales spanning powers of ten – from decibels in acoustics to the Richter scale for earthquakes.

The common logarithm (log₁₀, also written lg) is the logarithm to base 10. It states how many times 10 must be multiplied by itself to obtain x: log₁₀(1000) = 3, because 10³ = 1000. In chemistry it is used for the pH value: pH = −log₁₀([H₃O⁺]). The natural logarithm (ln) to base e ≈ 2.71828 is the antiderivative of 1/x and is fundamental to calculus, probability theory and thermodynamics.

The change-of-base formula allows the calculation of logarithms with any base: log_b(x) = ln(x) / ln(b). This means that any calculator capable of computing ln can also calculate logarithms to any base. Our calculator uses exactly this formula. For log₂(8): ln(8) / ln(2) = 2.0794 / 0.6931 = 3. Correct, since 2³ = 8.

In the field of computer science and algorithms, log₂ is especially important: binary search in a sorted array of n elements requires at most log₂(n) comparisons. With n = 1,024 elements, only 10 comparisons are needed (log₂(1024) = 10). This explains the enormous efficiency of binary search trees, heaps and similar data structures. The logarithm is thus the mathematical foundation for understanding algorithmic complexity.

Calculation examples

log₂(8) = 3

log₂(8) = 3
ItemAmount
Base2
Argument (x)8
Formulaln(8) / ln(2)
Result3

log₁₀(1000) = 3

log₁₀(1000) = 3
ItemAmount
Base10
Argument (x)1,000
Check10³ = 1,000 ✓
Result3

Frequently asked questions about the logarithm calculator

Formulas, rules and application examples

The logarithm is the inverse function of exponentiation. log_b(x) = y means: b to the power of y gives x (bʸ = x). The base b specifies the number system. Example: log₁₀(1000) = 3, because 10³ = 1000. The logarithm answers the question: "How many times must I multiply b by itself to get x?"

The natural logarithm (ln) is the logarithm to base e ≈ 2.71828 (Euler's number). It occurs naturally in many physical and mathematical contexts: radioactive decay, growth processes, compound interest. ln(e) = 1, ln(1) = 0, ln(e²) = 2. In calculus, ln is the antiderivative of 1/x.

log₂(x) is the logarithm to base 2 (binary logarithm). It answers: "How many bits do I need to represent x different states?" log₂(8) = 3, since 2³ = 8, and with 3 bits you can encode exactly 8 states (0 to 7). In computer science, log₂ is used for algorithm complexity (O(log n) in binary search), information theory and data compression.

The change-of-base formula lets you express any logarithm using base e or 10: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). Our calculator uses this formula internally. Example: log₃(81) = ln(81) / ln(3) = 4.394 / 1.099 ≈ 4, because 3⁴ = 81. This lets you enter any base.

The most important logarithm rules: (1) log(a × b) = log(a) + log(b) – product becomes sum. (2) log(a / b) = log(a) – log(b) – quotient becomes difference. (3) log(aⁿ) = n × log(a) – power becomes product. (4) log_b(b) = 1 – the logarithm of the base equals 1. (5) log_b(1) = 0 – the logarithm of 1 is always 0. These rules greatly simplify complex calculations.

For business

Calculators for your website or app

Integrate our GDPR-compliant calculators as a widget or use our API. Perfect for HR portals, career pages and financial applications.

  • 100% GDPR-compliant - no cookies, no data storage
  • White-label - your branding, your colors
  • REST API for your own applications
  • Built by HEADON.pro - your digital agency
Learn more about HEADON.pro →

Request without obligation

Receive an individual quote from HEADON.pro

Your data will only be used to get in touch with you.
Privacy