Logarithms Calculator
Enter your values
Enter your values and press Calculate — your answer, visual and step-by-step solution appear here.
What is a logarithm?
A logarithm answers one question: what exponent turns the base into this number? So log base 2 of 8 equals 3 simply because 2 raised to the 3rd power is 8. In short, a logarithm is the inverse of exponentiation, the inverse operation — it undoes a power the same way subtraction undoes addition.
Read that two-way arrow as "is the same as." The two statements 2³ = 8 and log₂(8) = 3 carry identical information written in different forms. This logarithm calculator works in exactly that spirit: type a number, pick a base, and it returns the exponent — plus the full working. The base b must be positive and not equal to 1, and the argument x must be greater than 0, because no power of a positive base ever produces zero or a negative result.
How to use this logarithm calculator
Getting an answer takes one tap. Enter a number, choose a base, and read the result with its step-by-step solution — no sign-up, no paywall.
- Enter the number. Type the argument x — the value you want the logarithm of (for example 50, 1000, or 7).
- Choose the base. Use a one-tap preset — 10 for the common log, e for the natural log (ln), or 2 for the binary log — or type any custom base into the base field.
- Read the result and steps. The answer appears instantly. Open the steps panel to see the change-of-base working, so you can copy the method straight into your homework.
log vs ln vs log₂ — what's the difference?
The three logarithms you meet most often differ only by their base. "log" usually means base 10, "ln" always means base e (≈ 2.71828), and "log₂" means base 2. This natural log (ln) calculator and log base 2 calculator handle all of them from the same box. The table below is the quickest way to keep them straight.
| Name | Notation | Base | Calculator key & typical use |
|---|---|---|---|
| Common log | log(x) or log₁₀(x) | 10 | log key — pH, decibels, scientific notation, Richter scale |
| Natural log | ln(x) or logₑ(x) | e ≈ 2.71828 | ln key — calculus, growth/decay, continuous interest |
| Binary log | log₂(x) | 2 | change of base or log₂ preset — computing, information theory, Big-O |
| General log | log_b(x) | any b > 0, b ≠ 1 | custom base field — any base you need |
Logarithm rules (with worked examples)
Four logarithm rules do nearly all the work. Each turns a hard operation (multiplying, dividing, raising to a power) into an easier one (adding, subtracting, multiplying). Every example below is a real, verified calculation you can reproduce on the tool.
Product rule
The log of a product is the sum of the logs.
Example: log(2 · 5) = log(10) = 1, and separately log(2) + log(5) = 0.30103 + 0.69897 = 1. The two routes agree.
Quotient rule
The log of a quotient is the difference of the logs.
Example: log₂(32 ÷ 4) = log₂(8) = 3, and separately log₂(32) − log₂(4) = 5 − 2 = 3. ✓
Power rule
A power inside the log comes out front as a multiplier.
Example: log₂(8) = log₂(2³) = 3 · log₂(2) = 3 · 1 = 3. The power rule is what lets you solve for an unknown exponent, since it pulls the variable down where you can isolate it.
Change of base rule
This is the engine of the calculator. To find a log in any base, divide two logs you can already compute (base 10 or base e). That is exactly what a change of base calculator does internally.
Take log₂(50) — a value no standard calculator has a direct key for. Convert it three ways and watch them all land on the same number:
- Via base 10: log₂(50) = log(50) ÷ log(2) = 1.69897 ÷ 0.30103 = 5.6439
- Via base e: log₂(50) = ln(50) ÷ ln(2) = 3.91202 ÷ 0.69315 = 5.6439
- Via base 5: log₂(50) = log₅(50) ÷ log₅(2) = 2.43068 ÷ 0.43068 = 5.6439
All three give log₂(50) ≈ 5.6439. The base you divide through never changes the answer — only how convenient the arithmetic is.
How to solve logarithms without a calculator
When no calculator is handy, you can still pin a logarithm down by bracketing it between the two nearest exact powers of the base. The log must fall between those two whole numbers.
- Find the nearest powers. For log₂(50), list powers of 2 around 50: 2⁵ = 32 and 2⁶ = 64. Since 50 sits between 32 and 64, log₂(50) sits between 5 and 6.
- Estimate the position. 50 is a bit past the midpoint of 32 and 64, so the answer is a little above 5.5 — and indeed log₂(50) ≈ 5.64.
- Refine if needed. For more precision, use the change-of-base shortcut with logs you remember, or read values from a printed log table.
Solving logarithmic equations
To solve an equation with logs, condense both sides to a single log using the rules above, then rewrite in exponential form. Watch one carefully:
- Condense. log(x) + log(x − 3) = 1 becomes log[x(x − 3)] = 1 by the product rule.
- Switch to exponential form. A bare "log" is base 10, so x(x − 3) = 10¹ = 10.
- Solve the quadratic. Expand to x² − 3x − 10 = 0, which factors as (x − 5)(x + 2) = 0, giving x = 5 or x = −2. Need a hand here? Use the solve the resulting quadratic equation tool.
- Check the domain. x = −2 makes log(−2) undefined, so reject it. Only x = 5 survives — and log(5) + log(2) = log(10) = 1 confirms it.
Real-world uses of logarithms
Logarithms compress huge ranges into readable scales, which is why they appear everywhere measurements span many orders of magnitude:
- pH (chemistry): acidity is −log of the hydrogen-ion concentration, so each pH unit is a tenfold change.
- Decibels (sound): loudness uses a base-10 log scale — +10 dB is roughly ten times the power.
- Richter scale (earthquakes): each whole step is about 10× the ground motion.
- Compound interest & growth: logs solve for the time in exponential growth — closely tied to geometric sequences and growth.
- Algorithm complexity: binary search runs in O(log n) time, the reason log₂ matters in computing.
- Calculus: logs run throughout calculus — for instance the derivative of ln(x) is 1/x, a cornerstone result.
Antilogarithm (inverse log)
The antilog (or inverse log) reverses a logarithm: instead of asking for the exponent, you raise the base to a known result. If log_b(x) = y, then the antilog is x = bʸ. This is the same direction as the raise the base to a power operation.
Example: the base-10 antilog of 2.5 is 10²·⁵ ≈ 316.23. So if a log scale reads 2.5, the underlying quantity is about 316 — and feeding 316.23 back into a log base 10 returns 2.5, closing the loop.
Common mistakes
Studying for AP Precalculus? Logarithmic and exponential functions are Unit 2 — 25–40% of the exam. See the 2027 score calculator or what changed for 2027.
Frequently asked questions
-
Can you take the log of a negative number or zero?
No. The logarithm is only defined for arguments greater than zero (x > 0). Because a positive base raised to any real exponent always gives a positive result, no exponent can produce 0 or a negative number, so log(0) and log of a negative value are both undefined.
-
What is the difference between log and ln?
They differ only in base. "log" written without a base usually means the common logarithm, base 10. "ln" is the natural logarithm, base e ≈ 2.71828. So log(1000) = 3 while ln(e) = 1. Both measure an exponent — just relative to different bases.
-
What does "log" without a base written mean?
In most algebra, chemistry and physics, a bare "log" means base 10 (the common log). In calculus, many programming languages and engineering texts, "log" can instead mean the natural log, base e. When the base is not shown, let the surrounding context decide.
-
How do I calculate log base 2?
Use the log₂ preset on this calculator, or apply the change-of-base formula by hand: log₂(x) = ln(x) ÷ ln(2), which also equals log(x) ÷ log(2). For example, log₂(50) = 3.91202 ÷ 0.69315 ≈ 5.6439.
-
What is log(1) and the log of the base itself?
For any valid base, log_b(1) = 0, because any base raised to the 0 power equals 1. And log_b(b) = 1, since the base to the first power is itself. So log(1) = 0, ln(e) = 1, and log₂(2) = 1.
-
Is the natural log the same as ln?
Yes. "ln" is simply the standard notation for the natural logarithm, which is the logarithm to base e (e ≈ 2.71828). So ln(x) and logₑ(x) mean exactly the same thing and always return the same value.