Log Calculator

Calculate logarithms for any positive base (b) and argument (x), including natural logarithm ln(x) and common base-10 log₁₀(x).

Calculator Inputs

Positive number.
Base (default 10).

Calculated Results

Calculated Logarithm
log₁₀(1000) = 3.000
Natural Logarithm ln(x) 6.9078
Binary Logarithm logâ‚‚(x) 9.9658
Exponential Equivalent 10³ = 1000
Values calculate live as you adjust inputs.

About Log Calculator

A logarithm is not determined by the number alone. The base matters just as much as the argument. Changing the base changes the question being asked, even when the number you are calculating remains exactly the same.

Take 64 as an example. It can be expressed as a power of several different bases:

  • (2^6=64), so (\log_2(64)=6).

  • (4^3=64), so (\log_4(64)=3).

  • (8^2=64), so (\log_8(64)=2).

Each answer tells you how many times the selected base must be used as a factor to produce 64. The result changes because 2, 4, and 8 grow at different rates when raised to a power.

This is why choosing the correct base is important when using a log calculator. If a question specifies base 2, using the common logarithm (base 10) will give a different answer, even though the argument is correct.

It can help to think of the base as the measuring scale for the logarithm. The argument stays the same, but the scale used to express its exponent changes.

What Your Logarithm Result Actually Tells You

A logarithm answer can be a whole number, a decimal, zero, or even a negative number. Each result reveals something about the relationship between the base and the argument.

A whole number means the argument is an exact power of the base

Consider:

[
\log_3(81)=4
]

The result is a whole number because (3^4=81). The argument is an exact power of the selected base.

This is easy to recognize when the numbers are familiar powers, such as 16, 25, 27, 64, or 1000. However, many logarithms do not produce whole-number answers.

A decimal result means the exponent falls between two powers

Suppose you calculate:

[
\log_2(20)\approx4.3219
]

Why is the answer between 4 and 5?

Because:

[
2^4=16
]

and

[
2^5=32
]

Since 20 is greater than 16 but less than 32, the exponent needed to produce 20 must be between 4 and 5. The decimal result gives a more precise position between those two powers.

This is one reason a logarithm calculator is useful: it can find an exponent even when the argument is not a neat power of the selected base.

A negative result can be perfectly valid

For a base greater than 1, an argument between 0 and 1 produces a negative logarithm.

For example:

[
\log_{10}(0.01)=-2
]

This works because:

[
10^{-2}=0.01
]

A negative logarithm does not mean the original number is negative. The argument is positive; it is the exponent that is negative.

The relationship also works in the opposite direction for bases between 0 and 1. For example:

[
\log_{0.5}(8)=-3
]

because:

[
0.5^{-3}=8
]

The logarithm of 1 is always zero

For every valid logarithm base:

[
\log_b(1)=0
]

This is because any positive base other than 1 raised to the zero power equals 1.

For example, (\log_2(1)), (\log_{10}(1)), and (\ln(1)) all equal zero. If your argument is 1, changing the base will not change this result.

Natural Log, Common Log, and Binary Log: When Should You Use Each?

A logarithm calculator may provide more than one logarithmic result for the same number. The natural logarithm, common logarithm, and binary logarithm are not different mathematical operations; they use different bases.

Understanding why each one exists makes the additional results much more useful.

Common logarithm: base 10

The common logarithm uses 10 as its base:

[
\log_{10}(x)
]

It is often written simply as (\log(x)), particularly in school mathematics and scientific calculations where the base is understood to be 10.

For example:

[
\log_{10}(1000)=3
]

Common logarithms are useful when working with quantities that change by powers of ten. They also appear in logarithmic measurement systems, including the mathematical expressions used for pH and sound intensity.

Natural logarithm: base e

The natural logarithm uses Euler’s number, approximately 2.71828, as its base:

[
\ln(x)=\log_e(x)
]

It appears frequently in calculus, continuous growth, decay, and models involving rates of change.

For example:

[
\ln(e^4)=4
]

Natural logarithms are especially useful when a quantity grows continuously rather than through fixed, separate steps. They also help solve equations where the unknown appears as an exponent involving (e).

Binary logarithm: base 2

The binary logarithm uses 2 as its base:

[
\log_2(x)
]

It is particularly relevant to computer science, digital storage, and situations involving repeated doubling or halving.

For example:

[
\log_2(32)=5
]

This is because (2^5=32). If a quantity grows from 1 to 32 by doubling five times, its binary logarithm gives the number of doubling steps.

Comparing all three with the same argument

The differences become clearer when you use the same number for each calculation.

For an argument of 32:

Logarithm Result
(\log_{10}(32)) 1.5051
(\ln(32)) 3.4657
(\log_2(32)) 5

The argument has not changed, but each logarithm measures it using a different base. The binary result is exactly 5 because 32 is a power of 2, while the other two results are decimals.

If your calculator displays natural and binary logarithms alongside the selected-base result, these additional values let you compare the same number under three commonly used logarithmic systems.

Why Logarithms Are Useful for Very Large or Very Small Numbers

Numbers can become difficult to compare when their sizes differ by several powers of ten. A logarithm provides a way to represent those differences on a smaller numerical scale.

Consider the following values:

Original number Base-10 logarithm
10 1
100 2
1,000 3
10,000 4
100,000 5
1,000,000 6

The original numbers increase tenfold each time, but their logarithms increase by only one.

This is the basic idea behind a logarithmic scale. Equal steps on the scale represent equal multiplication factors, rather than equal additions.

For example, the difference between 10 and 100 is 90, while the difference between 100,000 and 100,090 is also 90. On a normal number line, those differences are equal. On a logarithmic scale, however, the two pairs are not equally far apart because their relative changes are very different.

This approach is useful in science and engineering when measurements cover a wide range. Instead of displaying enormous or extremely small numbers directly, a logarithmic scale makes their relative magnitudes easier to compare.

It is important to remember that logarithms do not make the original quantities equal or change their actual sizes. They simply provide another way to represent the relationship between them.

Real-World Situations Where Logarithms Do the Work

Logarithms are useful whenever you need to work backward from a result to find an exponent. They also appear in measurement systems where a wide range of values needs to be represented more conveniently.

Measuring sound intensity

Sound levels are commonly expressed in decibels using a logarithmic formula. A simplified intensity-level calculation is:

[
L=10\log_{10}\left(\frac{I}{I_0}\right)
]

Here, (I) is the measured sound intensity and (I_0) is a reference intensity.

Because the formula uses a base-10 logarithm, multiplying the intensity ratio by 10 increases the level by 10 decibels. This is one reason the decibel scale is useful: it can express large differences in sound intensity without displaying extremely large numbers.

A standard log calculator can evaluate the logarithmic part of this formula, but a complete decibel calculation also requires the reference intensity and the multiplier of 10.

Understanding pH and acidity

The pH scale uses a negative base-10 logarithm of hydrogen-ion concentration:

[
pH=-\log_{10}[H^+]
]

The concentration of hydrogen ions helps describe how acidic or alkaline an aqueous solution is.

For example, if the hydrogen-ion concentration is:

[
[H^+]=10^{-4}
]

then:

[
pH=-\log_{10}(10^{-4})=4
]

If the concentration changes to (10^{-5}), the pH becomes 5. That one-unit increase corresponds to a tenfold decrease in hydrogen-ion concentration.

This is a useful example of why logarithms matter: a relatively small change on the pH scale represents a much larger change in concentration.

Finding how long exponential growth will take

Imagine an investment, population, or quantity of bacteria that doubles during each growth period. You know its starting amount and its future amount, but you want to find how many doubling periods are needed.

Suppose a quantity grows from 100 to 800 by doubling each period.

The relationship can be written as:

[
800=100\times2^t
]

Divide both sides by 100:

[
8=2^t
]

Now use a base-2 logarithm:

[
t=\log_2(8)=3
]

The quantity needs three doubling periods to grow from 100 to 800:

100 → 200 → 400 → 800.

This is a practical example of using logarithms to find an unknown exponent rather than simply calculating a power.

Understanding binary growth in computing

Digital systems frequently use powers of two. A binary logarithm can tell you how many doubling steps separate two quantities.

For example:

[
\log_2(1024)=10
]

Starting with 1 unit, ten successive doublings produce 1,024 units.

This kind of calculation is useful when thinking about binary representations, data structures, and quantities that grow in powers of two. It also explains why base-2 logarithms appear so often in computer science.

The Exponential Equivalent: Turning a Logarithm Back into a Power

A logarithm and an exponential expression describe the same mathematical relationship from opposite directions.

If:

[
\log_b(x)=y
]

then:

[
b^y=x
]

The logarithmic expression asks which exponent produces the argument. The exponential expression shows that power directly.

For example:

[
\log_3(243)=5
]

can be written as:

[
3^5=243
]

This relationship is useful when checking a logarithm result. If you calculate a logarithm and want to confirm the answer, raise the selected base to that result. You should get back the original argument, allowing for any rounding in the decimal answer.

Consider a result that is not a whole number:

[
\log_2(12)\approx3.585
]

Its exponential equivalent is:

[
2^{3.585}\approx12
]

The answer is approximate because 3.585 is a rounded version of the actual logarithm.

If your log calculator displays an exponential equivalent, it is showing this reverse representation of the same calculation. It is particularly helpful for understanding what a decimal logarithm means instead of viewing it as an isolated number.

What Happens When You Change the Base?

One of the easiest ways to understand logarithms is to keep the argument fixed and experiment with different bases.

Try using 100 as the argument:

Base Calculation Approximate result
2 (\log_2(100)) 6.6439
5 (\log_5(100)) 2.8614
10 (\log_{10}(100)) 2
20 (\log_{20}(100)) 1.5372

The argument remains 100, but the answer gets smaller as the base increases in these examples.

Why does this happen? A larger base needs a smaller exponent to reach 100. For example, 20 reaches 100 with an exponent of approximately 1.5372, while 2 needs an exponent of approximately 6.6439.

You can also experiment with bases between 0 and 1. For example:

[
\log_{0.5}(100)\approx-6.6439
]

The result is negative because repeatedly raising 0.5 to positive powers makes it smaller, not larger. A negative exponent reverses that relationship.

This experiment is a useful way to understand why the base is such an important part of a logarithm calculation. The same argument can produce very different results depending on the base you select.

Why Some Logarithm Inputs Are Invalid

A real logarithm has specific input requirements. The argument must be positive, and the base must also be positive but cannot equal 1.

In mathematical notation:

[
x>0
]

[
b>0,\quad b\ne1
]

These conditions are not arbitrary calculator restrictions. They follow from how real-number powers work.

An argument of zero

The expression (\log_b(0)) is undefined in real-number arithmetic. A positive base cannot be raised to a real exponent to produce zero.

A negative argument

A real logarithm with a positive base cannot produce a negative argument. For this reason, expressions such as (\log_2(-8)) do not have real-number answers.

A base of 1

The number 1 raised to any real power is still 1:

[
1^x=1
]

It cannot produce a different positive argument, so a logarithm with base 1 is undefined.

A zero or negative base

The standard real logarithm rules require a positive base. Zero and negative bases are not valid inputs for an ordinary real logarithm calculator.

Switching the base and argument

In (\log_2(16)), the base is 2 and the argument is 16. Reversing them gives (\log_{16}(2)), which is a completely different calculation.

If a result seems unexpected, check the positions of the base and argument before assuming the calculator has made an error.

When a Logarithm Calculator Is Not Enough

A log calculator is designed to evaluate a logarithm for a selected base and positive argument. It can also provide useful logarithmic equivalents, but not every problem involving logarithms is simply a calculation of (\log_b(x)).

Some questions require additional steps or a different mathematical formula.

  • Logarithmic equations: An equation such as (\log_2(x+3)=5) requires you to rearrange the expression and solve for (x).

  • Compound interest: Finding how long money takes to grow to a target amount requires a compound-interest formula before using logarithms to isolate time.

  • pH calculations: The hydrogen-ion concentration must be used in the negative base-10 logarithm formula.

  • Decibel calculations: Sound intensity must be compared with a reference value before the logarithm is evaluated.

  • Logarithmic graphs: Understanding a graph requires looking at its domain, range, intercepts, and transformations, not just calculating one logarithm.

For a direct calculation such as finding the logarithm of 250 with base 5, this log calculator is the appropriate tool. For a larger equation or scientific application, the logarithm may be only one step in the solution.

What is Log Calculator?

A logarithm is the exponent to which a specified base (b) must be raised to produce a given number (x). If bʸ = x, then log_b(x) = y.

How to Use This Calculator

  1. Enter the positive argument x.
  2. Specify the logarithm base b (use 10 for common, 2.71828 for natural).
  3. View the logarithmic power.

The Mathematical Formula & Variables

log_b(x) = ln(x) / ln(b)

Variables Definition

Symbol / Variable Name Description
ln Natural Log Logarithm with base e (Euler's constant ~2.71828).

Step-by-Step Worked Example

Scenario: Calculate log₁₀(1000).

  1. Since 10 * 10 * 10 = 10³ = 1000, the logarithm is 3.
  2. ln(1000) / ln(10) = 6.907755 / 2.302585 = 3.000.

Result: log₁₀(1000) = 3

Frequently Asked Questions

How do you calculate a logarithm without a calculator?

Think of the logarithm as an unknown exponent. For example, (log_2(32)) asks which power of 2 equals 32. Since (2^5=32), the answer is 5. This approach works easily when the argument is a familiar power of the selected base. For less convenient numbers, a logarithm calculator or change-of-base formula is useful.

What is the difference between log and ln?

The main difference is the base. A common logarithm, usually written as log, uses base 10 in many school and scientific contexts. The natural logarithm, written as ln, uses Euler's number (e), approximately 2.71828. Both calculate exponents, but they use different bases.

How do you calculate a logarithm with any base?

Use the change-of-base relationship: [ log_b(x)=frac{log(x)}{log(b)} ] You can use the common logarithm or natural logarithm on the right-hand side, provided you use the same type of logarithm in both places. A log base calculator can perform this conversion automatically.

Why can a logarithm have a decimal answer?

A decimal answer occurs when the argument is not an exact whole-number power of the selected base. For example, (log_2(20)) is approximately 4.3219 because 20 lies between (2^4=16) and (2^5=32). The decimal indicates the fractional exponent needed to reach 20.

Can a logarithm be negative?

Yes. With a base greater than 1, a positive argument between 0 and 1 produces a negative logarithm. For example, (log_{10}(0.01)=-2). A base between 0 and 1 can also produce negative logarithms when the argument is greater than 1. A negative logarithm does not mean the argument itself is negative.

What is the logarithm of 1?

The logarithm of 1 is zero for every valid base: [ log_b(1)=0 ] This is because any positive base other than 1 raised to the power of zero equals 1.

Why is the logarithm of zero undefined?

There is no real exponent that can be applied to a positive base to produce zero. A logarithm asks which exponent creates the argument, and no real-number answer satisfies that requirement when the argument is zero.

Why can't the base of a logarithm equal 1?

Because 1 raised to any real power always equals 1. A base of 1 therefore cannot generate an argument other than 1, so it cannot define a useful logarithmic relationship.

How do you convert a logarithm into exponential form?

Move the logarithm's answer into the exponent position. For example: [ log_4(64)=3 ] becomes: [ 4^3=64 ] The base stays the same, the logarithm's result becomes the exponent, and the argument becomes the result of the power.

What is the difference between log base 2 and log base 10?

Log base 2 measures the exponent needed to produce a number using powers of 2. Log base 10 does the same using powers of 10. Binary logarithms are common in computing, while common logarithms are used in many scientific and mathematical applications.

When should you use natural logarithms?

Natural logarithms are particularly useful in calculus, continuous growth and decay, and equations involving the exponential constant (e). They frequently appear in mathematical models where a quantity changes continuously over time.