Logarithm Calculator
Calculate logarithms in any base — common, natural and binary logs. Get precise results for algebra, engineering and computer science.
Result
2
log10(100)
Value
100
Base
10
Logarithms are only defined for positive values and bases.
How it works
log_base(value) = ln(value) ÷ ln(base). Defined only for value > 0 and base > 0, base ≠ 1.
Example: log₁₀(100) = 2; log₂(8) = 3; ln(e) = 1.
Last updated: February 2026
How this calculator is verified
Checked by True Calculator automated test suite on
- Formula verified against a published worked example in the automated test suite
- Edge cases (zero, negative, boundary and unit-mismatch inputs) covered by unit tests
The full verification method is on our how we verify page. Found an error? Tell us and we will re-check it.
When to Use This Calculator
A sound engineer in Mumbai works with decibels, which are ten times the common logarithm of a power ratio. Entering 1000 with base 10 returns 3, because 10 to the power 3 is 1000. A developer counting binary search steps uses base 2: the binary log of 8 is 3, since 2 cubed is 8. Natural logs use the base e, about 2.718, so the natural log of e itself is 1. The log of 1 is 0 in every base, a quick check that the inputs were entered correctly.
How to Use This Calculator
- Step 1: Enter the number whose logarithm you need, which must be positive.
- Step 2: Select the base: 10 for common logs, e for natural logs, or 2 for binary logs.
- Step 3: Enter a custom base if you need a logarithm in another base, such as 5 or 12.
- Step 4: Read the result, and verify it by raising the base to that power.
Worked Example
A sound engineer in Mumbai works with decibels, which are ten times the common logarithm of a power ratio. Entering 1000 with base 10 returns 3, because 10 to the power 3 is 1000. A developer counting binary search steps uses base 2: the binary log of 8 is 3, since 2 cubed is 8. Natural logs use the base e, about 2.718, so the natural log of e itself is 1. The log of 1 is 0 in every base, a quick check that the inputs were entered correctly.
Tips and Common Mistakes
- •Tip 1: Logarithms of numbers between 0 and 1 are negative; for example log10(0.1) is -1.
- •Tip 2: To change bases, divide the log in the available base by the log of the new base, since this relation always holds.
- •Tip 3: In chemistry and acoustics, confirm whether the formula needs base 10 or natural log, because the wrong base changes pH and decibel answers.
- ✗Mistake 1: Entering 0 or a negative number, where the logarithm is undefined and the calculator cannot return a real value.
- ✗Mistake 2: Mixing bases in one problem; log2(16) is 4 but log10(16) is about 1.2.
Frequently Asked Questions
What is a logarithm?
A logarithm answers the question: to what power must the base be raised to get the value? log₁₀(100) = 2 because 10² = 100.
What is the difference between log, ln and log₂?
Log is base 10 (common), ln is base e ≈ 2.718 (natural), and log₂ is base 2 (binary). They differ only by the base used.
What is the logarithm of zero or a negative number?
Logarithms are only defined for positive values. Log(0) and log of negatives do not exist in real numbers.
Where are logarithms used in daily life?
The pH of water, decibel sound levels, the Richter earthquake scale and medical half-life calculations all use logarithms to compress huge ranges into readable numbers.
Compare these tools
- Percentage Calculator — Calculate percentages, percentage difference and percentage change instantly
- Rounding Calculator — Round any number to the nearest value, or up and down, to any decimal places
- Standard Form Calculator — Convert numbers to and from standard form (scientific notation) with one click
You might also need
Related calculators from other categories