Logarithm Calculator — Free Log, Ln & Custom Base Log Calculator | AllInOneTools
logb(x) Math Calculator

Logarithm Calculator

Calculate log base 10, natural log (ln), log base 2, or any custom base. Instantly see the result, step-by-step solution, and multi-base comparison.

log
( )
=
3
📊 Same Value, Different Bases
📑 Step-by-Step Solution
📈 Logarithm Curve
📚 Logarithm Rules Reference

Logarithms: The Inverse of Exponentiation

A logarithm answers the question: "What exponent do I need to raise the base to in order to get this number?" If by = x, then logb(x) = y. Logarithms were invented by John Napier in 1614 as a computational tool to simplify multiplication and division into addition and subtraction. Today, logarithms are fundamental to information theory, signal processing, earthquake measurement, sound intensity, pH chemistry, algorithm analysis, and virtually every branch of science and engineering.

Types of Logarithms and Key Formulas

Common Logarithm (log or log10):
  Base 10. log(1000) = 3 because 10^3 = 1000
  Used in: pH, decibels, Richter scale

Natural Logarithm (ln or log_e):
  Base e = 2.71828... ln(e) = 1
  Used in: calculus, growth/decay, finance

Binary Logarithm (log2):
  Base 2. log2(1024) = 10
  Used in: computer science, information theory

Change of Base Formula:
  log_b(x) = ln(x) / ln(b) = log(x) / log(b)

Key Logarithm Rules:
  Product: log(xy) = log(x) + log(y)
  Quotient: log(x/y) = log(x) - log(y)
  Power: log(x^n) = n × log(x)
  Identity: log_b(b) = 1
  Zero: log_b(1) = 0
  Inverse: b^(log_b(x)) = x

Real-World Applications of Logarithms

The Richter scale for earthquakes is logarithmic base 10: a magnitude 7 earthquake releases 10 times the amplitude of a magnitude 6. Decibels measure sound intensity logarithmically: each 10 dB increase represents a 10-fold increase in intensity. pH measures acidity as pH = -log10[H+]: each unit decrease represents a 10-fold increase in hydrogen ion concentration.

In computer science, binary logarithm determines the number of bits needed to represent a number and appears in algorithm complexity analysis: binary search runs in O(log n) time. In finance, natural logarithms model continuous compounding: doubling time at rate r is t = ln(2)/r. Information theory defines entropy using log2: the information content of an event with probability p is -log2(p) bits.

Quick Logarithm Estimation Tricks
log10 of a number is roughly the number of digits minus 1. Example: log(5000) is about 3.7 (4 digits). ln(x) is about 2.303 times log(x). log2(x) is about 3.322 times log(x). Key values to memorize: log(2) = 0.301, log(3) = 0.477, ln(2) = 0.693, ln(10) = 2.303. To find how many times you must halve a number to reach 1, use log2.

Frequently Asked Questions

What is a logarithm?
A logarithm is the inverse of exponentiation. log_b(x) = y means b^y = x. It answers "what power must I raise b to get x?" Example: log10(100) = 2 because 10^2 = 100.
What is the difference between log and ln?
log usually means log base 10 (common log). ln means log base e (natural log, e = 2.71828). ln is used in calculus and continuous growth. Conversion: ln(x) = 2.303 x log(x).
Why is log(0) undefined?
No power of any positive base can equal zero. b^y approaches 0 as y goes to negative infinity but never reaches it. Log of negative numbers is also undefined in real numbers.
How do you use the change of base formula?
log_b(x) = log(x)/log(b) or ln(x)/ln(b). This lets you calculate any base logarithm. Example: log3(81) = log(81)/log(3) = 1.908/0.477 = 4.
What is log base 2 used for?
Computer science: bits needed to represent n values = log2(n). Algorithm complexity (binary search = O(log n)). Information theory (entropy in bits). Doubling and halving problems.
Why are logarithms useful?
They convert multiplication to addition, compress large ranges into manageable scales (Richter, dB, pH), linearize exponential data, solve exponential equations, and appear in growth and decay formulas.