Logarithm

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

Finding What Power Produces a Given Number

A logarithm answers the question “what power do I need to raise the base to, to get this number?” Enter a value and a base, and this calculator finds the logarithm, along with the same value in log base 10, natural log (ln), and base 2.

The Formula

logb(x)=ln(x)ln(b)\vC{\log_b(x)} = \frac{\vA{\ln(x)}}{\vB{\ln(b)}}

where xx is the value and bb is the base — this is the change-of-base formula, since most calculators only have built-in functions for the natural (ln\ln) logarithm.

Worked Example

Log base 2 of 8:

    1. log2(8)=ln(8)ln(2)=2.0790.6933\vC{\log_2(8)} = \frac{\vA{\ln(8)}}{\vB{\ln(2)}} = \frac{2.079}{0.693} \approx \vC{3} — since 23=82^3 = 8.

Key Factors to Consider

  • Logarithms are only defined for positive numbers (and any positive base other than 1). A logarithm of zero or a negative number has no real-number answer — this reflects the fact that a positive base raised to any real power always produces a positive result, so there’s no real exponent that could ever produce zero or a negative number.
  • Logarithmic scales are widely used for quantities that span an enormous range. The Richter scale for earthquake magnitude, the decibel scale for sound, and the pH scale for acidity are all logarithmic — each whole-number step represents a tenfold (or similarly large) change in the underlying quantity, which is why a “small” difference in these scales can represent a huge real-world difference.
  • Base 10, base e (natural log), and base 2 each show up in different fields for different reasons. Base 10 lines up naturally with the decimal number system and everyday scales; base e arises naturally in calculus and continuous growth/decay (like continuous compound interest); base 2 is fundamental in computer science, where quantities often double (like data storage or binary search steps).
  • The key logarithm identities let you break complex expressions into simpler pieces. log(a×b) = log(a) + log(b), and log(aⁿ) = n×log(a) — these rules are why logarithms were historically used to turn difficult multiplication and exponentiation problems into simpler addition, long before calculators existed.

Common Mistakes

  • Trying to take the logarithm of zero or a negative number. No real exponent applied to a positive base can ever produce zero or a negative result, so these inputs have no real-number answer — this calculator will flag them as invalid rather than return a value.
  • Confusing “log” with “ln” when reading a formula or textbook. Plain “log” conventionally means base 10 in everyday and engineering contexts, but many math and computer-science texts use it to mean the natural log (base e) instead — always check which convention a source is using rather than assuming.
  • Forgetting that a logarithm’s base must be positive and not equal to 1. A base of 1 would make every power of it equal to 1, so there’s no way to solve for an exponent that produces any other value — and a negative base produces alternating positive/negative results that break the real-number logarithm entirely.
  • Misreading a logarithmic scale as if it were linear. A difference of 2 points on the Richter scale isn’t twice as strong — it’s about 1,000 times more energy release, since each whole step represents a tenfold change in amplitude (and roughly 31.6-fold change in energy).

Useful to Know

  • Need the reverse operation — raising a base to a power instead of finding the exponent? Exponent Calculator handles that direction.
  • Working with a logarithmic decay process, like radioactive half-life? Half-Life / Radioactive Decay Calculator applies the same natural-log math to a decay-specific worked example.
  • Need a fuller scientific calculator with logarithms alongside trig and other functions? Scientific Calculator covers the broader toolkit.

Source: Standard logarithm identities.

Frequently Asked Questions

What is a logarithm?

A logarithm answers the question "what power do I need to raise the base to, to get this number?" For example, log base 2 of 8 is 3, because 2 raised to the 3rd power equals 8. Logarithms are the inverse operation of exponentiation.

How do you calculate a logarithm in any base?

Using the change-of-base formula: log_b(x) = ln(x) ÷ ln(b), where ln is the natural logarithm. Most calculators (including this one) only have built-in functions for a couple of specific bases, so this formula lets you find a logarithm in ANY base from those.

What is the difference between log and ln?

"log" (without a written base) conventionally means base-10 (the "common" logarithm), while "ln" specifically means the natural logarithm, base e (approximately 2.71828). This calculator shows both, along with log base 2, regardless of which base you actually requested.

Why can't you take the logarithm of a negative number?

Because a positive base raised to any real-number power always produces a positive result — there's no real exponent that could make a positive base produce zero or a negative number. Logarithms of negative numbers do exist in the complex-number system, but that's outside what this calculator computes.

What are some real-world uses of logarithms?

Logarithmic scales are used anywhere a quantity spans an enormous range, like earthquake magnitude (Richter scale), sound intensity (decibels), and acid/base strength (pH). Logarithms also show up in computer science (binary search, information theory) and in modeling continuous growth or decay, like radioactive decay or continuously compounded interest.

Confirm Your Age

To create an account, please tell us your birth month and year.