What Is a Logarithm?
A logarithm answers one question: what power must you raise a base to in order to reach a given number? This logarithm calculator computes the three bases you meet most often — the common log (base 10), the natural log (ln, base e), and the binary log (base 2) — the instant you type. Enter any positive value, pick a base, and read a high-precision result with no submit step.
The Three Bases
log₁₀ — Common Log
ln — Natural Log
log₂ — Binary Log
How to Calculate a Logarithm
Choose the Base
Pick log₁₀, ln, or log₂ from the type selector. The formula line updates to match your choice, so you always see the expression you are solving.
Enter a Positive Number
Type any value greater than zero. Logarithms are undefined for zero and negative numbers, so only positive inputs return a result.
Read the Result
The answer appears instantly as you type, shown to up to 10 decimal places with trailing zeros trimmed for a clean value.
Features
Three Bases in One
Switch freely between log₁₀, ln, and log₂ without leaving the page.
Real-Time Calculation
Results update the instant you type — no button to press.
Live Formula Preview
The expression line (for example log₁₀(100) =) mirrors your base and input.
High Precision
Up to 10 decimal places, accurate for round numbers and awkward decimals alike.
Common Logarithm Values
| Expression | Result | Why |
|---|---|---|
| log₁₀(10) | 1 | 10¹ = 10 |
| log₁₀(100) | 2 | 10² = 100 |
| ln(e) | 1 | e¹ = e |
| ln(1) | 0 | e⁰ = 1 |
| log₂(2) | 1 | 2¹ = 2 |
| log₂(8) | 3 | 2³ = 8 |
Frequently Asked Questions
How do I calculate a logarithm?
Choose a base (log₁₀, ln, or log₂), enter a positive number, and the result appears instantly. Mathematically, log_b(y) asks "to what power must I raise b to get y?" — so log₁₀(100) = 2 because 10² = 100.
What is the difference between log, ln, and log₂?
They differ only in the base. "log" usually means the common logarithm with base 10, "ln" is the natural logarithm with base e (≈ 2.718), and "log₂" is the binary logarithm with base 2. The same input gives a different value for each base.
Can you take the log of a negative number or zero?
No. For any positive base, raising it to a real power always yields a positive result, so no real exponent produces zero or a negative number. That is why this calculator accepts positive inputs only and flags anything else.
How does the change-of-base formula work?
To find a logarithm in any base b, divide two logs that share a common base: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). It lets you compute an unusual base from the common or natural log this tool already provides.
What is log base 2 used for?
The binary logarithm counts how many times you can halve a value. It measures bits of information and expresses the complexity of algorithms such as binary search and merge sort, which is why it appears throughout computer science.
No comments yet. Be the first to comment!