Education
Log Calculator
Pick a mode, enter the values, and the calculator returns the logarithm with the formula and an equivalent exponent statement. Supports custom-base logarithms, common log (log₁₀), natural log (ln), and solving for the missing exponent in b^y = x.
Mode
The number to take the logarithm of. Must be greater than 0. · e.g. 8
The base of the logarithm. Must be greater than 0 and not equal to 1. · e.g. 2
log_2(x)
3
2^3 = 8
log base 2 of 8 is 3. In other words, 2^3 = 8.
Examples
log₂(8)
= 3 · because 2³ = 8
log₁₀(1000)
= 3 · because 10³ = 1000
ln(e)
= 1 · because e¹ = e
Solve 2^y = 16
y = 4 (log₂(16))
How it works
A logarithm is the inverse of an exponent. It asks: what exponent must a base b be raised to in order to produce a value x?
Definition
log_b(x) = y means b^y = x
Common log
log₁₀(x) is the exponent for base 10
Natural log
ln(x) is the exponent for base e
Change of base
log_b(x) = ln(x) / ln(b)
The calculator uses the change-of-base formula internally for custom bases. The result is rounded for display; the calculation runs in standard floating-point precision.
What is a log calculator?
A log calculator finds the exponent that a base must be raised to in order to produce a target value. It runs the standard logarithm in any base, the common log (base 10), the natural log (base e), and works in reverse to solve for the missing exponent in an exponential equation.
How the log calculator works
Pick a mode and enter the inputs:
- Log with custom base: enter a value and a base. The calculator returns log_b(x) using the change-of-base formula log_b(x) = ln(x) / ln(b).
- Common log: enter a value. The calculator returns log₁₀(x).
- Natural log: enter a value. The calculator returns ln(x) = log_e(x).
- Solve missing exponent: enter a base and a result. The calculator returns the exponent y such that b^y = result, using the same change-of-base formula.
Every mode also shows the equivalent exponent statement and a plain English explanation, so you can see the relationship from both sides.
Log formula
The defining relationship is log_b(x) = y if and only if b^y = x. The change-of-base formula expresses any logarithm in terms of natural log or common log:
- log_b(x) = ln(x) / ln(b)
- log_b(x) = log₁₀(x) / log₁₀(b)
A handful of identities make hand calculation easier:
- log_b(1) = 0 for any base
- log_b(b) = 1 for any base
- log_b(x · y) = log_b(x) + log_b(y)
- log_b(x / y) = log_b(x) − log_b(y)
- log_b(x^k) = k · log_b(x)
Logs vs exponents
Logarithms and exponents are inverse operations. An exponent raises a base to a power by repeated multiplication. A logarithm asks the opposite question: given a base and a result, what exponent produces the result?
- Exponent: 2^3 = 8 (base 2, exponent 3, result 8)
- Logarithm: log₂(8) = 3 (base 2, result 8, exponent 3)
Both statements describe the same relationship from different directions. Use the exponent calculator when the base and exponent are known and you want the result. Use this log calculator when the base and result are known and you want the exponent. The Solve missing exponent mode in this calculator is exactly the logarithm framed as the inverse of exponentiation.
Common log vs natural log
The common log uses base 10 and is the standard tool in chemistry (pH), audio (decibels), and earthquake magnitude (Richter scale). The natural log uses base e (about 2.71828) and is the standard tool in calculus, continuous growth and decay, and many physics formulas. Both are special cases of the general logarithm; the calculator exposes each as its own mode for convenience.
When a math text writes plain log without a base, it usually means log₁₀ in introductory and engineering settings, or ln in some pure-math settings. The calculator labels each mode explicitly so there is no ambiguity in the result.
Worked examples
- log₂(8) = 3, because 2 × 2 × 2 = 8.
- log₁₀(1000) = 3, because 10 × 10 × 10 = 1000.
- log₁₀(0.01) = −2, because 10^(−2) = 1 / 100 = 0.01.
- ln(e) = 1, because e^1 = e.
- ln(1) = 0 for any base.
- log₂(16) = 4, the answer to 2^y = 16.
Common mistakes
- Taking a log of zero or a negative number. Logarithms are only defined for positive real values. The calculator flags these cases.
- Using a base of 1. Every power of 1 is 1, so the logarithm with base 1 has no unique answer; the base must be greater than 0 and not equal to 1.
- Confusing log with ln. In most introductory and engineering contexts, log means base 10, and ln means base e. The calculator labels each mode so the base is always explicit.
- Treating log_b(x + y) as log_b(x) + log_b(y). The log of a sum is not the sum of logs. The product rule applies to products: log_b(x · y) = log_b(x) + log_b(y).
- Forgetting that log_b(x^k) = k · log_b(x) pulls the exponent out front. This is the identity most useful for solving exponential equations.
Where logarithms show up
Logarithms appear any time you need to solve for an exponent, compress a wide range of values onto a readable scale, or model exponential change. Common applications include pH and decibel scales, the Richter scale, half-life and continuous-growth formulas, information theory (bits use log base 2), and algorithm analysis (O(log n) complexity). They also show up in the compound-interest formula when you solve for time.
Related tools
- Scientific calculator for a full button-driven calculator with log, ln, sin, cos, tan, and exponents in one place.
- Exponent calculator runs the inverse operation: base raised to a power.
- Square root calculator for the special case of the 1/2 power.
- Factor calculator for prime factorization, factor pairs, and the greatest common factor.
- All education calculators.
Note. Logarithms are defined only for positive real values. Negative, zero, and base-of-1 cases are flagged in the result panel with a short explanation rather than returned as NaN. Results are rounded for display; the calculation runs in standard floating-point precision.
Frequently asked questions
A logarithm asks what exponent a base must be raised to in order to produce a given value. In symbols, log_b(x) = y means b^y = x. For example, log base 2 of 8 = 3, because 2 × 2 × 2 = 8. Logarithms are the inverse of exponentiation.
The defining formula is log_b(x) = y if and only if b^y = x. The change-of-base formula lets you compute any logarithm using the natural log or common log: log_b(x) = ln(x) / ln(b) = log10(x) / log10(b). The calculator uses the change-of-base formula internally for custom bases.
log and log10 usually mean the common logarithm (base 10), used in scientific and engineering contexts. ln is the natural logarithm (base e ≈ 2.71828), used in calculus, growth, and decay formulas. log_b(x) is the general form for any base b. In some math texts, plain log means natural log; the calculator labels each mode explicitly to avoid the ambiguity.
For perfect powers, count the exponent. For example, log base 2 of 32 = 5, because 2^5 = 32. For non-perfect cases, use the change-of-base formula and a calculator: log_b(x) = ln(x) / ln(b). For a back-of-the-envelope estimate, remember log10(2) ≈ 0.301 and log10(3) ≈ 0.477, which lets you estimate many common logs by hand.
No. For real-number logarithms, the value (x) must be greater than 0 and the base (b) must be greater than 0 and not equal to 1. Negative inputs are not defined in the real numbers, and a base of 1 raised to any exponent is always 1, so the logarithm is undefined. The calculator flags these cases instead of returning NaN.
Zero, for any base. log_b(1) = 0, because b^0 = 1 for any nonzero base b. This is true for the common log, the natural log, and any custom base.
Undefined. As the value approaches 0 from the positive side, the logarithm decreases without bound (approaches negative infinity). There is no finite value y such that b^y = 0, so log_b(0) does not exist.
log_b(x) = log_k(x) / log_k(b) for any valid base k. The two most useful versions are log_b(x) = ln(x) / ln(b) and log_b(x) = log10(x) / log10(b). Change of base lets you compute any logarithm using the natural log or common log buttons on a standard calculator.
They are inverse operations. An exponent raises a base to a power: b^y = result. A logarithm asks what exponent is needed: log_b(result) = y. The two expressions describe the same relationship from opposite directions. See the exponent calculator for the forward direction.
Logarithms show up across math and science: in pH and sound (decibels), earthquake magnitude (Richter scale), exponential growth and decay, half-life calculations, signal processing (logarithmic scales), information theory (bits, log base 2), and any algorithm analysis that uses log n complexity. They also appear whenever you need to solve for an exponent.
Related calculators
Education
Final Grade Calculator
Calculate your final course grade from your current grade and your final exam score.
Education
Weighted Grade Calculator
Combine assignments, quizzes, and exams by weight to get a precise weighted course average.
Education
Final Exam Calculator
Find out exactly what you need to score on your final exam to hit your target course grade.