Mathematics calculator

Logarithm Calculator

Calculate a logarithm for any valid positive base and number, then check the result in exponential form.

Calculator inputs

Enter your values

Custom base
The base must be positive and cannot equal 1.
Calculated output

Result summary

Your result will appear here

Complete the required fields and select the calculate button.

What Is a Logarithm?

A logarithm answers an exponent question: logᵦ(x) = y means bʸ = x. For example, log base 3 of 81 is 4 because 3⁴ = 81. The logarithm calculator takes a positive number and a valid positive base, then reports the exponent.

You can use base 10, base 2, a decimal base or another positive base except 1. This is a real-number calculation. It does not accept a negative argument, evaluate a symbolic expression or solve an equation with several unknowns.

How to Calculate a Logarithm with Any Valid Base

  1. Enter the argument in Positive number x. It must be positive.
  2. Enter Logarithm base b. The base must be positive and different from 1. The form minimum for each input is 0.000000001, and the accepted upper bound is 10^300.
  3. Select Calculate. Read the logarithm rounded to six decimals and the expression identifying the actual base.
  4. Review Exponential check as a restatement of bʸ ≈ x using the rounded exponent. Compute that power separately if you need an independent verification.

The implementation evaluates ln(x)/ln(b). It uses numerical logarithms for the supplied base; typing “e” or an expression such as 3^4 into the numeric fields is not supported. For an approximation to a natural logarithm, enter a numerical approximation to e as the base.

Bases close to 1 can make the result sensitive because ln(b) is close to zero. Six-decimal exponent rounding also affects the power check. The check card states the relationship; it does not recalculate a residual or certify every digit.

Logarithm Formula and Domain

Definition: logᵦ(x) = y ⇔ bʸ = x

Change of base: logᵦ(x) = ln(x)/ln(b)

Real-number domain: x > 0, b > 0 and b ≠ 1

Reference identities: logᵦ(1) = 0; logᵦ(b) = 1

Any common valid logarithm base can be used in the change-of-base ratio. Using natural logarithms in both numerator and denominator gives the exponent for the entered b, not automatically a base-e answer.

Base 1 is excluded because 1 raised to any power remains 1 and cannot define a unique logarithmic inverse. Negative or zero x lies outside this real logarithm form. A base between 0 and 1 is valid, with signs reversed relative to a base above 1.

Reference: OpenStax: Logarithmic Functions. Logarithms as inverse exponents and their real domains. Input limits, output rounding and numerical limitations follow this calculator’s implementation.

Number, Base and Logarithm Results

Positive number x
Argument of the logarithm, not the exponent being sought.
Logarithm base b
Positive numeric base other than 1. It may be between 0 and 1.
Logarithm value y
Featured ln(x)/ln(b), rounded to six decimals. It is an exponent without a fixed physical unit.
Expression
Names the actual base and argument. Bases 10 and 2 use familiar subscripts; other bases are written explicitly.
Number and base cards
Original numeric inputs, useful for confirming which value is the argument.
Exponential check
Text b^rounded-y ≈ x. This states the intended inverse relationship rather than independently evaluating the rounded power.

Custom Base Logarithm Worked Example

Illustrative example. Find log base 3 of 81. Enter x = 81 and b = 3.

Apply change of base: ln(81)/ln(3) = 4. The expression card names base 3, and the exponential check reads 3^4 ≈ 81.

Verify independently by multiplying 3 × 3 × 3 × 3 = 81. A second useful check is base 0.5 with x = 0.125: (0.5)³ = 0.125, so that logarithm is 3 even though the base is below 1.

Calculation check. These illustrative values were checked independently against the formula and calculator response. Retain unrounded intermediate values when checking approximations.

Custom Base Logarithm Worked Example
QuantityValue
Argument x81
Base b3
Logarithm y4
Power check3⁴ = 81
Fractional-base checklog base 0.5 of 0.125 = 3

Logarithm Bases and Result Signs

The base determines how powers grow or shrink. A base above 1 grows with its exponent; a base between 0 and 1 shrinks. That difference explains the sign patterns below.

These are numerical evaluations, not logarithm rules for adding or multiplying arguments. In general log(x + y) is not log(x) + log(y).

Logarithm Bases and Result Signs
BaseArgumentLogarithmPower check
10100210² = 100
100.01−210⁻² = 0.01
38143⁴ = 81
0.50.1253(0.5)³ = 0.125
0.58−3(0.5)⁻³ = 8
Any valid b10b⁰ = 1

How to Read Positive and Negative Logarithms

For b > 1, x > 1 gives a positive logarithm and 0 < x < 1 gives a negative logarithm. If 0 < b < 1, those signs reverse. In both cases x = 1 gives zero.

A negative logarithm is valid. For example, log base 10 of 0.01 is −2 because 10⁻² = 0.01. It does not mean the positive input was invalid or that the calculator took a logarithm of a negative number.

The result is not generally an integer. Retain unrounded intermediate values for later work, especially when the base is very near 1 or when you will raise a large base to the displayed exponent.

Common Logarithm Mistakes

  • Swapping the argument and base.
  • Entering zero or a negative argument in a real logarithm calculator.
  • Using base 1.
  • Assuming that a base between 0 and 1 is invalid.
  • Treating ln(x)/ln(b) as a base-e logarithm regardless of b.
  • Reading the text power check as an independent numerical accuracy test.

Frequently Asked Questions

What does a logarithm mean?

log base b of x is the exponent y for which b^y = x. For example, log base 3 of 81 is 4 because 3^4 = 81.

Can I choose a custom logarithm base?

Yes. Use a positive numeric base other than 1. Bases 10, 2, 3 and 0.5 are valid examples, subject to the form’s numeric range.

Why is base 1 not allowed?

Every power of 1 equals 1, so it cannot define a logarithmic inverse with a unique exponent. The calculator rejects that base.

Can the number inside the logarithm be zero or negative?

Not in this real-number tool. It requires a positive argument. Complex logarithms have additional definitions and are outside this calculator’s scope.

Can a base between 0 and 1 give a valid answer?

Yes. For example, log base 0.5 of 0.125 is 3 because (0.5)^3 = 0.125.

Why can a logarithm be negative?

A negative exponent represents a reciprocal power. For example, 10^(−2) = 0.01, so log base 10 of 0.01 is −2.

Does using natural logs in the formula change the requested base?

No. ln(x)/ln(b) is the change-of-base formula for the entered b. Both natural-log factors together recover that requested exponent.

Is the exponential check an independent verification?

It displays b^rounded-result ≈ x as the inverse relationship. It does not separately evaluate the power or report an error. Use an independent power calculation when precision matters.

Sources and References