Log Calculator
Calculate logarithms to any base — common (log₁₀), natural (ln), binary (log₂) or your own — and antilogarithms, with the change-of-base working, characteristic and mantissa, and a graph.
Written by Suhaib Hassan. The logarithm laws are standard, and each worked example is re-derived by hand. Our methodology.
It uses the change-of-base rule log_b(x) = ln x ÷ ln b with double-precision natural logs, and checks the answer by raising the base back to the result.
Logarithms turn multiplication into addition. This page shows the value, the equivalent in other bases, and where it sits on the curve.
—
Logarithm curve
y = log_b(x) with your point marked; the curve has a vertical asymptote at x = 0.
Step-by-step working
—
Laws of logarithms
For b > 0, b ≠ 1 and positive x and y.
| Rule | Identity | Example |
|---|---|---|
| Product | log_b(xy) = log_b x + log_b y | log₁₀ 200 = log₁₀ 2 + log₁₀ 100 = 0.301 + 2 |
| Quotient | log_b(x/y) = log_b x − log_b y | log₁₀ 5 = log₁₀ 10 − log₁₀ 2 = 1 − 0.301 = 0.699 |
| Power | log_b(xᵖ) = p · log_b x | log₁₀ 1000 = log₁₀ 10³ = 3 · 1 = 3 |
| Change of base | log_b x = ln x ÷ ln b | log₂ 8 = ln 8 ÷ ln 2 = 2.0794 ÷ 0.6931 = 3 |
| Inverse | b^(log_b x) = x and log_b(bˣ) = x | 10^(log₁₀ 500) = 500 |
| Special values | log_b 1 = 0, log_b b = 1 | log₁₀ 1 = 0, log₁₀ 10 = 1 |
Worked examples
Decibels
A sound with 100 times the reference power.
= 10 × 2 = 20 dB
Binary search
How many comparisons to search 1,000,000 sorted items?
pH of water
Pure water has [H⁺] = 10⁻⁷ mol/L.
What is a logarithm?
The logarithm log_b(x) answers “to what power must I raise b to get x?” If bʸ = x then y = log_b(x). The three most common bases are 10 (common logarithm, written log or log₁₀), e ≈ 2.71828 (natural logarithm, ln) and 2 (binary logarithm, log₂, used in computing).
Characteristic and mantissa
For a base-10 logarithm, the integer part (the characteristic) gives the order of magnitude and the fractional part (the mantissa) depends only on the digits. Because log₁₀ 500 = log₁₀ 5 + log₁₀ 100 = 0.69897 + 2, the characteristic is 2 and the mantissa 0.69897. Printed log tables listed mantissas only.
By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →
Sources
- NIST Digital Library of Mathematical Functions, chapter 4, section 4.2 (definitions of the logarithm and exponential).
- Napier, J. (1614). Mirifici Logarithmorum Canonis Descriptio. Edinburgh.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics, item 2-12 (exponential and logarithmic functions).
Frequently asked questions
Why can’t I take the logarithm of zero or a negative number?
For a positive base, bʸ is always positive, so no real y gives zero or a negative result. As x approaches 0 from above, log_b(x) heads to −∞ (a vertical asymptote). In the complex numbers, logs of negative numbers exist: ln(−x) = ln x + πi; this page shows that principal value for a negative argument.
What is the difference between log, ln and log₂?
They are logarithms in different bases: log is base 10 in most school and engineering contexts, ln is base e, and log₂ is base 2. In some programming languages and mathematics texts, “log” means the natural logarithm, so check the convention.
Why is the natural logarithm so important in calculus?
Because d/dx ln x = 1/x with no extra constant. For any other base, d/dx log_b x = 1 ÷ (x ln b). The number e is the unique base for which the exponential function is its own derivative, which is why it appears in growth, decay and compound interest.
How do I calculate a logarithm in a base my calculator lacks?
Use change of base: log_b(x) = ln x ÷ ln b (or log₁₀ x ÷ log₁₀ b). For log₃ 500: ln 500 ÷ ln 3 = 6.2146 ÷ 1.0986 = 5.6568.
What is an antilogarithm?
It is the inverse operation: the antilog of y in base b is bʸ. If log₁₀ x = 2.69897 then x = 10^2.69897 ≈ 500. Use the Antilog tab.
Why can’t the base be 1?
Because 1 raised to any power is 1, so 1ʸ can never equal any other number and log₁(x) would be undefined. Also, ln 1 = 0 would make the change-of-base formula divide by zero.
Related calculators
Continue with algebra.