acalculator

What is the logarithm of a number?

Calculate logarithms with different bases. Convert between exponential and logarithmic forms.

Your numbers

Logarithm (y)
2

The logarithm of 100 in base 10 is 2.

Logarithm (y): 2. The logarithm of 100 in base 10 is 2.

Logarithm (y) by number (x)

How to calculate

Computes the logarithm of a number in any base, or the number or the base from the other two values.

Example with the default inputs (Base (b) 10, Number (x) 100): The logarithm of 100 in base 10 is 2.

Formula: y = log_b x = ln x ÷ ln b, so b^y = x.

  • The base is more than 0 and not 1; the number is more than 0.
  • An old link with base=e uses Euler’s number e ≈ 2.718281828 as the base.
  • A whole-number logarithm within float error is shown exactly (log₁₀ 1,000 is 3).

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Base (b) 10, Number (x) 100 gives Logarithm (y) 2.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  2. Base (b) 2, Number (x) 8 gives Logarithm (y) 3.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  3. Base (b) 10, Number (x) 0.001 gives Logarithm (y) -3.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  4. Base (b) 2.718282, Number (x) 10 gives Logarithm (y) 2.302585.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  5. Base (b) 0.5, Number (x) 8 gives Logarithm (y) -3.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  6. Number (x) 8, Logarithm (y) 3 gives Base (b) 2.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions
  7. Base (b) 10, Logarithm (y) 3 gives Number (x) 1,000.Source: OpenStax, College Algebra 2e, §6.3 Logarithmic Functions. https://openstax.org/books/college-algebra-2e/pages/6-3-logarithmic-functions

How it works

The calculator solves one equation for whichever number you leave empty:

y = log_b x, which means b^y = x

where b is the base, x is the number and y is the logarithm. Fill in any two and it finds the third.

  • Logarithm: y = ln x ÷ ln b (the change of base formula). For base 10 and base 2 it uses the common and binary logarithm directly.
  • Number (antilogarithm): x = b^y.
  • Base: b = x^(1/y), the base in which x has logarithm y. For example, the base in which 8 has logarithm 3 is 8^(1/3) = 2.

Assumptions

  • The base must be more than 0 and not equal to 1. The number must be more than 0. The logarithm can be any real number.
  • Solving for the base has no answer when the logarithm is 0 (b⁰ = 1 for every base) or when the number is 1 (the base would be 1).
  • For the natural logarithm, use base e = 2.718281828459045. An old link with base=e uses this value.
  • A whole-number logarithm within float error is shown exactly (log₁₀ 1,000 is 3, not 2.9999999999999996). Other values carry the rounding of 64-bit floats, about 1 part in 10¹⁵.
  • A base of 1 gives no answer, and the page says: "The base cannot be 1: 1 raised to any power is 1." A number x = b^y past double range (about 1.8 × 10³⁰⁸, or closer to 0 than about 2.2 × 10⁻³⁰⁸) gives no numeric answer; the page says it is too large (or too small) to show exactly and gives it as a power of ten to 6 significant figures, from log₁₀ x = y × log₁₀ b.

Worked examples by hand

log₁₀ 100. 10² = 100, so log₁₀ 100 = 2.

log₂ 8. 2³ = 8, so log₂ 8 = 3.

log₁₀ 0.001. 0.001 = 1 ÷ 1,000 = 10⁻³, so log₁₀ 0.001 = −3.

ln 10. ln 10 = log_e 10 = 2.30258509…, because e^2.30258509 ≈ 10.

log₀.₅ 8. 0.5⁻³ = (1 ÷ 2)⁻³ = 2³ = 8, so the logarithm is −3.

In which base is the logarithm of 8 equal to 3? b = 8^(1/3) = ∛8 = 2.

Which number has a common logarithm of 3? x = 10³ = 1,000.

Other questions people ask

What is a logarithm and how does it work?

A logarithm is the inverse operation of exponentiation. It answers the question: 'To what power must the base be raised to get a given number?' For example, log₁₀(100) = 2 because 10² = 100. The general form is logₐ(b) = c, which means aᶜ = b. Logarithms are fundamental in mathematics, science, and engineering for simplifying complex calculations involving multiplication, division, and powers.

What are the most common types of logarithms?

The three most common types are: 1) Common logarithm (log₁₀ or log) - uses base 10, widely used in scientific notation and pH calculations; 2) Natural logarithm (ln) - uses base e (≈2.71828), fundamental in calculus and mathematical analysis; 3) Binary logarithm (log₂) - uses base 2, important in computer science and information theory. Each has specific applications where it's most useful.

How do I convert between different logarithm bases?

You can convert between logarithm bases using the change of base formula: logₐ(b) = logᵤ(b) ÷ logᵤ(a), where u is any positive number. For example, to convert log₂(8) to base 10: log₂(8) = log₁₀(8) ÷ log₁₀(2) = 0.9031 ÷ 0.3010 = 3. This formula works for any base conversion and is why calculators can compute logarithms of any base using only natural or common logarithms.

What are the key properties of logarithms?

Key logarithmic properties include: 1) logₐ(1) = 0 (any base to power 0 equals 1); 2) logₐ(a) = 1 (base to power 1 equals itself); 3) logₐ(xy) = logₐ(x) + logₐ(y) (product rule); 4) logₐ(x/y) = logₐ(x) - logₐ(y) (quotient rule); 5) logₐ(xⁿ) = n·logₐ(x) (power rule). These properties make logarithms powerful tools for simplifying complex mathematical expressions.

Why can't logarithms have negative numbers or zero as arguments?

Logarithms cannot have negative numbers or zero as arguments because there's no real number that, when raised to any power, equals zero or a negative number. For example, there's no real number x such that 10ˣ = -5 or 10ˣ = 0. The domain of logₐ(x) is (0, ∞) for any positive base a ≠ 1. This is why calculators return errors when you try to compute logarithms of non-positive numbers.

What is the relationship between logarithms and exponential functions?

Logarithms and exponential functions are inverse operations. If y = logₐ(x), then x = aʸ. This means they 'undo' each other: logₐ(aˣ) = x and a^(logₐ(x)) = x. For example, if log₁₀(1000) = 3, then 10³ = 1000. This inverse relationship is fundamental in solving exponential equations and modeling growth/decay processes in science and finance.

How are logarithms used in real-world applications?

Logarithms have numerous real-world applications: 1) pH scale in chemistry (pH = -log₁₀[H⁺]); 2) Richter scale for earthquake magnitude; 3) Decibel scale for sound intensity; 4) Compound interest and financial growth calculations; 5) Population growth modeling; 6) Signal processing and information theory; 7) Algorithm complexity analysis in computer science. They're essential for understanding phenomena that span many orders of magnitude.

What's the difference between ln(x) and log(x)?

ln(x) is the natural logarithm (base e ≈ 2.71828), while log(x) typically refers to the common logarithm (base 10). The natural logarithm is fundamental in calculus and mathematical analysis because the derivative of ln(x) is 1/x, making it essential for integration and solving differential equations. Common logarithms are more intuitive for human-scale calculations since we use base-10 number systems.

How do I solve logarithmic equations?

To solve logarithmic equations, use these strategies: 1) Use the inverse relationship: if logₐ(x) = b, then x = aᵇ; 2) Apply logarithmic properties to combine or separate terms; 3) Convert to exponential form when possible; 4) Check for extraneous solutions (values that don't satisfy the original equation). For example, to solve log₂(x) = 3, convert to x = 2³ = 8.

What are logarithmic scales and why are they useful?

Logarithmic scales represent data where values span many orders of magnitude. On a log scale, equal distances represent equal ratios rather than equal differences. They're useful for: 1) Visualizing data that varies exponentially; 2) Comparing relative changes rather than absolute changes; 3) Making large ranges of values visible on the same graph; 4) Identifying patterns in multiplicative relationships. Common examples include earthquake magnitude charts and population growth graphs.

How do logarithms relate to the concept of information and entropy?

Logarithms are fundamental to information theory. The amount of information in a message is measured in bits using log₂, where 1 bit represents the information needed to distinguish between two equally likely outcomes. Entropy, which measures uncertainty or randomness, is calculated using logarithms. For example, if an event has probability p, its information content is -log₂(p) bits. This relationship is crucial in data compression, cryptography, and communication theory.

What are the historical origins of logarithms?

Logarithms were invented by Scottish mathematician John Napier in 1614 to simplify complex astronomical calculations. Before calculators, logarithms were essential for multiplication and division because logₐ(xy) = logₐ(x) + logₐ(y) converts multiplication to addition. This made it possible to perform complex calculations using slide rules and logarithm tables. The invention revolutionized navigation, astronomy, and engineering, earning Napier recognition as one of the most important mathematicians in history.

How do logarithms appear in calculus and mathematical analysis?

Logarithms are crucial in calculus: 1) The derivative of ln(x) is 1/x, making it essential for integration; 2) The integral of 1/x is ln|x| + C; 3) Logarithmic differentiation simplifies finding derivatives of complex functions; 4) They're used in solving differential equations and modeling growth/decay; 5) The natural logarithm appears in Taylor series expansions. This makes ln(x) one of the most important functions in mathematical analysis.