Log Calculator

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.

Formula and interpretation
Result -
Expression
-

▼ See explanations and tips below ▼

What Is a Logarithm?

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:

$$ \log_b(x)=y \quad \text{means} \quad b^y=x $$

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.


Why Logarithms Matter

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.


Key Terms to Know

  • Value or argument \(x\): The positive number inside the logarithm. In \(\log_b(x)\), this is the number you are trying to express as a power of the base.
  • Base \(b\): The number being raised to a power. For real logarithms, the base must be positive and cannot equal \(1\).
  • Result \(y\): The exponent that makes \(b^y=x\).
  • Natural logarithm \(\ln(x)\): A logarithm with base \(e\), where \(e\) is the mathematical constant used often in calculus and continuous growth models.
  • Common logarithm \(\log(x)\): Usually means base \(10\) in many math settings, although notation can vary by context.
  • Change-of-base formula: A formula that rewrites a logarithm in one base as a quotient of logarithms in another base.
  • Domain: The set of allowed input values. For real logarithms, the argument must be greater than zero.

How Logarithms Work

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:

$$ \log_b(x)=y \iff b^y=x $$

Where:

  • \(x>0\) is the value whose logarithm is being evaluated.
  • \(b>0\) is the base.
  • \(b \ne 1\) because a base of \(1\) does not create a one-to-one exponential function.
  • \(y\) is the exponent result.

Many calculators directly provide common logarithms and natural logarithms. To evaluate a logarithm with another valid base, use the change-of-base formula:

$$ \log_b(x)=\frac{\ln(x)}{\ln(b)} $$

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.


Examples of Logarithms in Practice

Example 1: A logarithm that can be solved mentally

Evaluate:

$$ \log_2(32) $$

Ask: “What power of \(2\) equals \(32\)?”

$$ 2^5=32 $$

So:

$$ \log_2(32)=5 $$

The result \(5\) means the base \(2\) must be raised to the fifth power to get \(32\).


Example 2: A logarithm that needs the change-of-base formula

Evaluate:

$$ \log_3(20) $$

Since \(20\) is not an obvious power of \(3\), use natural logarithms:

$$ \log_3(20)=\frac{\ln(20)}{\ln(3)} $$

Using decimal approximations:

$$ \log_3(20)\approx \frac{2.995732274}{1.098612289} $$
$$ \log_3(20)\approx 2.7268330279 $$

This means \(3^{2.7268330279}\) is approximately \(20\).


Example 3: A base between 0 and 1

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:

$$ \log_{0.5}(0.25) $$

Because:

$$ (0.5)^2=0.25 $$

The result is:

$$ \log_{0.5}(0.25)=2 $$

Now compare that with:

$$ \log_{0.5}(64) $$

Since:

$$ (0.5)^{-6}=64 $$

The result is:

$$ \log_{0.5}(64)=-6 $$

When the base is between \(0\) and \(1\), larger input values can produce negative logarithm results.


How to Interpret the Result

The main result is the exponent \(y\) that satisfies:

$$ b^y=x $$

A result of \(0\) means the value is \(1\), because any valid base raised to \(0\) equals \(1\):

$$ b^0=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\).


Common Mistakes and Misconceptions

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.


When to Use Logarithms

Use logarithms when you need to:

  • Find the exponent in an equation such as \(b^y=x\).
  • Evaluate a logarithm in a base that is not built directly into a calculator.
  • Compare quantities that change by repeated multiplication.
  • Work with exponential growth or decay equations.
  • Understand logarithmic scales or formulas.
  • Convert between exponential form and logarithmic form.

Limitations and Things to Keep in Mind

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.


How to Use This Calculator

  1. Enter a positive value \(x\) in the value field.
  2. Enter a positive base \(b\) that is not equal to \(1\).
  3. Read the main result as \(\log_b(x)\).
  4. Review the expression to confirm the value and base were entered correctly.
  5. Use the natural log value and natural log base to see how the change-of-base calculation was formed.

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.


Frequently Asked Questions

Why must the value be greater than zero?

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.


Why can’t the base be 1?

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.


Can the base be between 0 and 1?

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\).


What does a negative logarithm mean?

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\).


Why are natural log values shown if I entered another base?

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.


Sources and References

Books

  1. Jay Abramson. Precalculus 2e. OpenStax, Dec. 21, 2021. Sections 4.3 “Logarithmic Functions,” 4.5 “Logarithmic Properties,” and Chapter 4 Key Concepts. https://openstax.org/books/precalculus-2e/pages/4-3-logarithmic-functions, https://openstax.org/books/precalculus-2e/pages/4-5-logarithmic-properties, and https://openstax.org/books/precalculus-2e/pages/4-key-concepts. Accessed July 4, 2026.
  2. Lynn Marecek and Andrea Honeycutt Mathis. Intermediate Algebra 2e. OpenStax, May 6, 2020. Section 10.4 “Use the Properties of Logarithms.” https://openstax.org/books/intermediate-algebra-2e/pages/10-4-use-the-properties-of-logarithms. Accessed July 4, 2026.