Logarithm Calculator

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

Updated
Calculated in your browser – your inputs are not transmitted and are kept on this device only if you choose

Base

Must be greater than 0

log₁₀(1,000)

3

3

10 to the power of 3 is 1,000, so the logarithm is 3.

How this was calculated
ln(1,000) ÷ ln(10) = 6.907755 ÷ 2.302585 = 3
Check: 10³ = 1,000

The logarithm answers the question: to what power must the base be raised to get x? Any base can be reduced to the natural logarithm ln using the change-of-base formula.

RZ-26 · headon.pro

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
Base
2
Argument (x)
8
Formula
ln(8) / ln(2)
Result
3
log₁₀(1000) = 3
Base
10
Argument (x)
1,000
Check
10³ = 1,000 ✓
Result
3

Frequently asked questions about the logarithm calculator

Formulas, rules and application examples

What is a logarithm?

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?"

What is the natural logarithm (ln)?

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.

What is log₂ and where is it used?

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.

How do I calculate logarithms with a different base?

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.

What logarithm rules exist?

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.

No liability for accuracy. This calculation does not replace tax or legal advice.

Responsible: Onur Cirakoglu, founder of headon