NOTACAL logo

Log Calculator

Log Calculator

Enter a positive number

Introduction

A logarithm (log) is a mathematical operation that represents the exponent to which a base number must be raised to produce a given value. Think of logarithms as the inverse operation of exponentiation — while exponents ask "what power gives us this result?", logarithms ask "what exponent produces this number?"

For example, since 102 = 100, we can say that log10(100) = 2. The logarithm tells us that 10 raised to the power of 2 equals 100. This inverse relationship between logarithms and exponents is fundamental to understanding how they work and why they are so useful in mathematics and science.

Logarithms have been essential tools since the 17th century, when John Napier first introduced them to simplify complex calculations in astronomy and navigation. Before electronic computers, logarithm tables allowed scientists and engineers to perform multiplication and division by converting these operations into simpler addition and subtraction problems. Today, logarithms remain crucial in fields ranging from computer science and data science to chemistry, physics, and finance.

How to Use

Using the Log Calculator is straightforward. Follow these steps to compute logarithms accurately:

  1. Enter the argument (x). The argument is the number for which you want to calculate the logarithm. This must be a positive number greater than zero, as logarithms are only defined for positive values. Enter a value like 100, 2.5, or 0.01 in the argument field.
  2. Select or enter the base (b). Choose your preferred base from the dropdown menu. Options include: Common Logarithm (base 10) — used in scientific calculations and engineering; Natural Logarithm (base e ≈ 2.718) — used in advanced mathematics and physics; Binary Logarithm (base 2) — used in computer science and information theory; Custom Base — enter any positive number (except 1) as your base.
  3. Click "Calculate". The calculator will compute the logarithm and display the result, along with a step-by-step explanation showing how the answer was derived.
  4. Review the results. The output shows the numerical result, the exponential form (how the base raised to the result equals the argument), and relevant logarithm rules applied.

Practical Example

Suppose you want to calculate log2(32): Enter 32 as the argument, select "Custom Base" and enter 2, click Calculate. The result is 5 (since 25 = 32). This means 2 raised to the power of 5 equals 32, confirming that log2(32) = 5.

Formulas and Calculations

The formal definition of a logarithm states that for any base b greater than 0 (where b is not equal to 1) and any positive number x:

y=logb(x)    by=xy = \log_b(x) \iff b^y = x

Where: b equals the base of the logarithm (the number being raised to a power), x equals the argument (the value we want to find the logarithm of), y equals the result (the exponent). The logarithm y tells us what exponent we need to raise b to get x.

Product Rule

When multiplying two numbers with the same base inside a logarithm, you can separate them into the sum of two logarithms. This rule is particularly useful because it turns multiplication into addition, which is easier to compute manually. For example, log10(100 × 10) = log10(100) + log10(10) = 2 + 1 = 3.

logb(x×y)=logb(x)+logb(y)\log_b(x \times y) = \log_b(x) + \log_b(y)

Quotient Rule

When dividing two numbers inside a logarithm, you can express this as the difference of two logarithms. This converts division into subtraction. For instance, log2(32/4) = log2(32) - log2(4) = 5 - 2 = 3.

logb(xy)=logb(x)logb(y)\log_b\left(\frac{x}{y}\right) = \log_b(x) - \log_b(y)

Power Rule

When the argument of a logarithm is raised to a power, you can bring that exponent to the front as a multiplier. This is especially useful when dealing with roots, since taking a root is equivalent to raising to a fractional power. For example, log3(92) = 2 × log3(9) = 2 × 2 = 4.

logb(xy)=y×logb(x)\log_b(x^y) = y \times \log_b(x)

Change of Base Formula

Sometimes you need to calculate a logarithm in a base for which you do not have direct capabilities. The change of base formula lets you convert between bases. This formula works with any base k (commonly 10 or e). For example, to calculate log2(8) using natural logarithms: log2(8) = ln(8)/ln(2) ≈ 2.079/0.693 ≈ 3.

logb(x)=logk(x)logk(b)\log_b(x) = \frac{\log_k(x)}{\log_k(b)}

Natural Logarithm Special Cases

The natural logarithm uses the mathematical constant e ≈ 2.718281828 as its base. It has special properties: ln(ex) = x, ln(1) = 0, and ln(e) = 1. The natural logarithm appears frequently in calculus, exponential growth and decay models, and compound interest calculations.

ln(ex)=x\ln(e^x) = x

Reference Tables

Common Bases

BaseNameSymbolCommon Applications
10Common Logarithmlog10(x) or log(x)Science, engineering, decibel scales
e ≈ 2.718Natural Logarithmln(x) or loge(x)Calculus, compound interest, physics
2Binary Logarithmlog2(x)Computer science, data storage, algorithms
any b ≠ 1Custom Logarithmlogb(x)Specialized mathematical applications

Logarithm of Special Values

ExpressionValueExplanation
logb(1)0Any base raised to power 0 equals 1
logb(b)1Any base raised to power 1 equals itself
logb(b2)2Following the power rule
logb(0)undefinedNo real exponent produces 0
logb(x < 1)negativeResults in negative values
limx→0⁺ logb(x)-∞Approaches negative infinity
logb(∞)Grows without bound

Logarithm Value Ranges

Argument Range (base 10)log10 ResultInterpretation
0 < x < 1NegativeValue is a fraction
x = 10Neutral element
1 < x < 100 to 1Between 0 and 1
x = 101Exactly one digit
10 < x < 1001 to 2Two digits
100 < x < 10002 to 3Three digits
10nnPower of 10 maps directly

Limitations

While logarithms are powerful mathematical tools, they have important limitations and constraints that users should understand:

  • Positive arguments only. Logarithms are only defined for positive real numbers (x > 0). You cannot calculate the logarithm of zero or negative numbers in the real number system. Attempting to do so will result in an undefined or complex result.
  • Base restrictions. The base b must be positive and not equal to 1 (b > 0 and b ≠ 1). A base of 1 would always give 1y = 1 regardless of y, making it meaningless. Negative bases create complications with non-integer exponents.
  • No real logarithm for negative results. While logarithms of negative numbers exist in the complex number system, the standard calculator focuses on real results. If you need complex logarithms, you will need specialized mathematical software.
  • Precision with very large or small numbers. When dealing with extremely large numbers (like 10100) or extremely small numbers (like 10-100), floating-point precision limitations may cause minor inaccuracies. For scientific calculations requiring extreme precision, consider using scientific notation or specialized precision tools.
  • Domain restrictions on output. The output of a logarithm can be any real number (positive, negative, or zero), but the relationship between input and output is nonlinear. This means small changes in input near 1 produce different effects than small changes in input far from 1.

Practical Applications

Logarithms are used extensively in real-world applications:

  • pH Scale in Chemistry. The pH of a solution is calculated as pH = -log10[H+], where [H+] is the hydrogen ion concentration. This converts a wide range of acid concentrations into a manageable 0–14 scale.
  • Decibel Measurement. Sound intensity in decibels uses the formula dB = 10 × log10(P/P0), where P is the measured power and P0 is the reference power. This allows the human ear to perceive sound across an enormous range of intensities.
  • Richter Scale. Earthquake magnitude uses log10 to compress the energy released into a single number. Each whole number increase represents approximately 31.6 times more energy.
  • Compound Interest. The time required to double an investment at compound interest can be approximated using logarithms: t = ln(2)/ln(1 + r), where r is the interest rate.
  • Algorithms and Computer Science. Binary search, heap operations, and many divide-and-conquer algorithms have time complexity expressed in terms of log2(n), making logarithms essential for analyzing computational efficiency.

Frequently Asked Questions

What is the difference between log and ln?
Log can use any positive base. Ln always uses Euler's number e as the base. For example, log10(100) = 2, but ln(100) ≈ 4.605.
Can I compute a logarithm with a custom base?
Yes. Enter any positive base (except 1) and positive argument. Uses change-of-base: log_b(x) = ln(x) / ln(b).
What is an antilog and how do I use it?
Antilog is the inverse of a logarithm. If log_b(y) = x, then y = b^x. Select antilog mode and enter base and exponent.
What happens if I enter zero or a negative number?
Logarithms are only defined for positive real arguments (x > 0) and positive bases other than 1. Invalid inputs produce an error.
Why use this instead of a scientific calculator?
It shows step-by-step breakdowns, supports very large/small numbers via scientific notation, and works in any browser.

References

Last updated: May 12, 2026