Use this log calculator to find the exponent y in b^y = x or solve for x from a known base and log value.
For an expression such as log(x - 1), or a logarithmic equation with a linear expression, use the Logarithmic Expression and Equation Calculator.
How to use our Log Calculator
- Choose What to solve: use Log value y from base b and number x if you want the logarithm, or Number x from base b and log value y if you want the original number.
- Pick a Base option: common log is base 10, natural log ln is base e, binary log is base 2, or choose Custom base.
- If you picked Custom base, enter Custom base b. For real-number logs, the base must be greater than 0 and cannot equal 1.
- If you are solving for the log, enter Number x. This value must be greater than 0.
- If you are solving for the number, enter Log value y. This is the exponent in b^y = x.
- Choose Decimal places to control rounding in the displayed answer.
- Click Calculate to see Result, Equivalent equation, Base used, and Domain check.
- Sanity-check the answer: if Result is 2 with base 10, the Equivalent equation should read 10^2 = 100; if your number is between 0 and 1 with base greater than 1, a negative log result can still be correct.
Definitions
What to solve: The mode that decides whether you want the logarithm value y or the original number x.
Base option: The base b used in the logarithm. Common log uses 10, natural log uses e, and binary log uses 2.
Number x: The positive number inside the logarithm. In real-number logs, x must be greater than 0.
Custom base b: Your own base value. For real-number logs, b must be greater than 0 and cannot equal 1.
Log value y: The exponent in the statement b^y = x. This is what a logarithm gives you.
Result: The calculated answer for the active mode, rounded to the selected number of decimal places.
Equivalent equation: The same relationship written in exponent form so you can check that b^y = x.
Domain check: A quick message telling you whether your entries are valid for real-number logarithms.
Common mistakes and quick fixes
Mistake: Entering 0 or a negative value in Number x when solving for the logarithm.
Fix: For real-number logs, Number x must be greater than 0. Enter a positive number and recalculate.
Mistake: Setting Custom base b to 1.
Fix: Change Custom base b to any positive value other than 1, because 1^y is always 1 and does not make a valid real log base.
Mistake: Typing a value into Custom base b but leaving Base option on common log, natural log, or binary log.
Fix: If you want your own base, switch Base option to Custom base . Otherwise the calculator uses the preset base shown in Base used .
Mistake: Reading Result as the final number x when the mode is Log value y from base b and number x .
Fix: In that mode, Result is the exponent y. Check Equivalent equation to see how the exponent matches the number.
Mistake: Thinking a negative Result means the entry is invalid.
Fix: A negative log value is valid when Number x is between 0 and 1 and the base is greater than 1. Use Domain check to confirm the inputs are valid.
Mistake: Rounding too early and then comparing homework answers digit by digit.
Fix: Increase Decimal places before comparing results. The displayed Result is rounded at the end.
Limitations & Key Assumptions / Boundary Conditions
- This calculator is limited to real-number logarithms. It does not calculate complex logs for negative values of Number x or invalid bases.
- When solving for a log value, Number x must be greater than 0.
- When using Custom base b, the base must be greater than 0 and cannot equal 1.
- Preset bases 10, e, and 2 override any hidden custom-base entry, so hidden inputs do not affect the result.
- Very large positive or negative values of Log value y can overflow or underflow normal floating-point math when solving for x.
- Displayed answers are rounded by Decimal places, so the shown value may differ slightly from an unrounded classroom or software result.
- Very small or very large answers may need scientific notation for correctness, even if that is harder to read.
Methodology
Core idea
A logarithm tells you the exponent. If y = log_b(x), then y is the power you put on base b to get x [1].
y = log_b(x) <=> b^y = x
How the calculator computes the log
For base 10, base e, base 2, or a custom base, the calculator finds the logarithm value with the change-of-base rule [2].
log_b(x) = ln(x) / ln(b)
Here, ln means natural logarithm, which uses base e. The value of e is about 2.718281828459045 [3].
How the calculator solves for the number
If you already know the exponent y and the base b, the original number is found with exponential form.
x = b^y
Worked mini-example
If What to solve is log value, Base option is common log, and Number x is 100, then the calculator solves for y in 10^y = 100.
y = log_10(100) = 2
10^2 = 100
If What to solve is number x, Custom base b is 5, and Log value y is 3, then:
x = 5^3 = 125
Domain checks used
For real-number logarithms, the inside number must be positive and the base must be positive but not 1 [1]. That is why the calculator blocks x less than or equal to 0, base less than or equal to 0, and base equal to 1.
x > 0
b > 0
b != 1
Assumptions behind the result
The calculator uses standard real-number logarithm rules and ordinary floating-point arithmetic. That means exact math ideas are being shown with rounded decimal output, and extreme inputs can produce overflow, underflow, or scientific notation in the displayed answer.
Sources
- 6.3 Logarithmic Functions - College Algebra 2e - Openstax
- 1.5 Exponential and Logarithmic Functions - Calculus Volume 1 - Openstax
- E | Mathematics, Definition, History, Value, Constant, Napier, Euler, Bernoulli, Series, Uses, Properties, & Facts | Britannica - Encyclopedia Britannica
- DLMF: 4.2 Definitions Logarithm, Exponential, Powers Chapter 4 Elementary Functions - NIST