Logarithm Calculator
Calculate logarithms in any base — common (base 10), natural (base e), binary (base 2), or custom base.
Did this tool work for you?
How to use this calculator
Any logarithm can be computed from the natural log using the change-of-base formula.
- 1
Enter the number you want to take the logarithm of.
- 2
Select the base: base 10 (common log), base e (natural log), base 2 (binary), or custom.
- 3
For a custom base, enter it in the custom base field.
- 4
The result shows your chosen log plus common/natural/binary logs for reference.
Frequently asked questions
What is a logarithm?
log_base(x) answers: "What power do I raise the base to, in order to get x?" For example, log₁₀(1000) = 3 because 10³ = 1000. It is the inverse of exponentiation.
What is the natural logarithm (ln)?
The natural logarithm uses base e ≈ 2.71828 (Euler's number). It appears naturally in compound interest, population growth, radioactive decay, and entropy. ln(e) = 1, ln(1) = 0, ln(e²) = 2.
Why is log base 2 important in computing?
Binary logarithm (log₂) tells how many bits are needed to represent a number. log₂(256) = 8, meaning 8 bits. In algorithms, O(log n) complexity typically means log₂ — the number of times you can halve n before reaching 1.
What are the key logarithm rules?
log(a×b) = log(a) + log(b); log(a/b) = log(a) − log(b); log(aⁿ) = n×log(a); log(1) = 0; log_a(a) = 1. These rules convert multiplication into addition, which is why logarithms were used for calculation before computers.
Logarithms — from slide rules to algorithms
Why logarithms were invented
John Napier introduced logarithms in 1614 to simplify multiplication and division into addition and subtraction. Before calculators, astronomers and navigators used log tables to multiply large numbers. log(a×b) = log(a) + log(b) — so a table lookup and addition replaced manual multiplication.
Logarithmic scales in science
Many natural phenomena span many orders of magnitude and are measured on log scales. The Richter scale: a magnitude 7 earthquake is 10× more powerful than magnitude 6. Decibels (dB): each 10 dB increase is 10× the power. pH: each unit is 10× the hydrogen ion concentration.
Logarithms in computer science
Binary search halves the search space each step — O(log₂ n) comparisons. Balanced BSTs have O(log n) insert/search. Shannon's information entropy H = −Σ p log₂(p) measures bits of information. Huffman coding, compression, and cryptographic key sizes all rely on binary logarithms.
Learn more from an authoritative source:
WikipediaExponent Calculator
Calculate any base raised to any power. Handles large exponents, fractional powers (roots), and negative exponents.
Linear Equation Solver
Solve a system of two linear equations with two unknowns using substitution or Cramer's rule.
Modulo Calculator
Calculate the remainder of division (modulo operation). Supports positive and negative numbers and shows the full division breakdown.
Rectangle Calculator
Calculate area, perimeter, diagonal, and aspect ratio of a rectangle or square.
Mean, Median & Mode Calculator
Calculate mean, median, mode, range, and variance for a set of numbers. Enter up to 20 values.
Number Sequence Calculator
Identify and continue arithmetic and geometric sequences. Find the nth term and sum of the first n terms.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →