Compute log base b of a positive value x.
Both values must be greater than 0, and the base cannot equal 1.
Use this Log Calculator to enter values, adjust options, and review results in a compact responsive workspace.
Results are calculated automatically as you enter data.
Compute log base b of a positive value x.
Both values must be greater than 0, and the base cannot equal 1.
▼ See explanations and tips below ▼
A logarithm answers an exponent question. Instead of asking, “What is \(b^y\)?”, a logarithm asks, “What exponent \(y\) makes \(b^y\) equal \(x\)?”
The basic relationship is:
For example, \(\log_2(32)=5\) because \(2^5=32\). The logarithm is not another way to multiply or divide. It is a way to find an exponent.
Logarithms are useful whenever a problem involves repeated multiplication, powers, exponential growth or decay, or very large and very small values. They also appear in logarithmic scales, scientific models, algebra, calculus, and many calculator-based computations.
Logarithms turn exponent questions into values that are easier to compare, calculate, and interpret. This is especially helpful when numbers grow by repeated multiplication rather than by repeated addition.
For students, logarithms are important because they connect exponents, inverse functions, equations, and graphs. For practical work, they help describe growth, decay, measurement scales, and calculations where the unknown is in an exponent.
A logarithm can also make a large range of values easier to discuss. For example, a logarithmic scale can compare quantities that differ by factors of 10, 100, 1,000, or more without writing every large number directly.
A logarithm works because exponential and logarithmic functions undo each other. If raising \(b\) to the exponent \(y\) gives \(x\), then the logarithm base \(b\) of \(x\) gives \(y\) back.
The definition is:
Where:
Many calculators directly provide common logarithms and natural logarithms. To evaluate a logarithm with another valid base, use the change-of-base formula:
This works because changing the base does not change the exponent being found. It only changes the form used to calculate it.
The value and the base are treated as unitless real numbers. In mathematical modeling, logarithms are usually applied to pure numbers, ratios, or values that have already been normalized into a unitless form.
Evaluate:
Ask: “What power of \(2\) equals \(32\)?”
So:
The result \(5\) means the base \(2\) must be raised to the fifth power to get \(32\).
Evaluate:
Since \(20\) is not an obvious power of \(3\), use natural logarithms:
Using decimal approximations:
This means \(3^{2.7268330279}\) is approximately \(20\).
Bases between \(0\) and \(1\) are valid, but they can feel less intuitive because powers of the base get smaller as the exponent increases.
Evaluate:
Because:
The result is:
Now compare that with:
Since:
The result is:
When the base is between \(0\) and \(1\), larger input values can produce negative logarithm results.
The main result is the exponent \(y\) that satisfies:
A result of \(0\) means the value is \(1\), because any valid base raised to \(0\) equals \(1\):
The sign of the result depends on the base and the input value:
| Base | Value \(x\) | Result of \(\log_b(x)\) |
|---|---|---|
| \(b>1\) | \(x>1\) | Positive |
| \(b>1\) | \(x=1\) | \(0\) |
| \(b>1\) | \(0<x<1\) | Negative |
| \(0<b<1\) | \(x>1\) | Negative |
| \(0<b<1\) | \(x=1\) | \(0\) |
| \(0<b<1\) | \(0<x<1\) | Positive |
The natural log value \(\ln(x)\) and natural log base \(\ln(b)\) are intermediate values used in the change-of-base calculation. They are not separate final answers unless you specifically wanted the natural logarithm.
Decimal results are usually approximations. A result displayed with many decimal places is still a numerical approximation unless the logarithm can be simplified exactly, such as \(\log_2(32)=5\).
One common mistake is assuming that “log” always means base \(10\). In many math contexts, an omitted base often means the common logarithm, but this calculator uses the base you enter. A logarithm with base \(2\), base \(10\), base \(e\), and base \(0.5\) can all give different results for the same value.
Another mistake is entering \(\ln(x)\) as the value instead of entering the original value \(x\). The change-of-base formula already uses natural logarithms internally, so the input should be the value whose logarithm you want.
Users also often try values that are outside the real logarithm domain. The value \(x\) must be greater than \(0\). The base \(b\) must also be greater than \(0\), and it cannot be \(1\).
Rounding too early can change the final answer. If you are doing a multi-step problem by hand, keep several digits in the intermediate values and round only at the end.
Finally, remember that a logarithm result is an exponent. A result of \(3\) does not mean the input was multiplied by \(3\); it means the base must be raised to the third power to produce the input value.
Use logarithms when you need to:
This calculator is intended for real-number logarithms. It does not evaluate complex-number logarithms, and it does not accept zero or negative values for \(x\).
The base must be a positive real number other than \(1\). Bases between \(0\) and \(1\) are allowed, but their interpretation is different from bases greater than \(1\) because the exponential function decreases as the exponent increases.
The result is formatted for readability. Ordinary finite values are shown with up to 10 decimal places, while very small or very large nonzero results may be shown in exponential notation. Trailing zeros may be removed, so \(2.5000000000\) may appear as \(2.5\).
The calculator gives a decimal approximation, not symbolic simplification. For example, it may show a decimal form even when an exact expression or simplified symbolic answer would be possible in an algebra system.
Use plain numeric inputs. Comma-formatted numbers such as 1,000, fraction strings such as 1/2, and expression strings such as 2^3 may not be interpreted as intended. Enter the evaluated numeric value instead.
For classroom work, check the required rounding rule from your instructor. For work that affects money, safety, engineering, scientific reporting, legal obligations, or official records, double-check the result and use the standards or professional guidance required for that context.
If the result shows Invalid input, check that \(x>0\), \(b>0\), and \(b\ne 1\). If the result is blank or shown as -, one of the inputs may be missing or not entered as a plain number.
For real logarithms, the value inside the logarithm must be positive. A positive base raised to a real exponent produces a positive result, so it cannot produce zero or a negative number.
A base of \(1\) is not valid because \(1^y\) is always \(1\) for every exponent \(y\). That means the exponent would not be unique, and most values could never be reached.
Yes. A base such as \(0.5\) is valid because it is positive and not equal to \(1\). Just remember that the sign pattern reverses compared with bases greater than \(1\).
A negative logarithm means the exponent is negative. For a base greater than \(1\), this usually means the input value is between \(0\) and \(1\). For a base between \(0\) and \(1\), a negative result can occur when the input value is greater than \(1\).
The natural log values are shown because the change-of-base formula evaluates \(\log_b(x)\) as \(\ln(x) \div \ln(b)\). They are intermediate values that explain the calculation, while the main result is the logarithm in the base you entered.
Books