LogarithmCalculator
logb(x)
ln(e) = 1
x
FREE ONLINE MATH TOOL

Logarithm Calculator

Calculate logarithms quickly, accurately, and step by step. Supports common, natural, binary, and custom base logarithms.

Presets:
log₂(8)
3

Step-by-Step Solution

Quick Examples

Click to load into calculator

log2(8) = 3
Binary Log
log10(100) = 2
Common Log
ln(e) = 1
Natural Log
log3(81) = 4
Base 3

Calculation History

Recent calculations saved locally

No history yet.

What Is a Logarithm?

A logarithm is a mathematical concept that answers a simple question: To what power must we raise a specific base number to get another specific number? It is the inverse operation to exponentiation.

For example, if we look at the exponential equation bˣ = y, the equivalent logarithmic equation is written as:

logb(y) = x

Common Types of Logarithms

  • Common Logarithm (log₁₀): Uses a base of 10. Often written simply as log(x) without the base. Used widely in science and engineering (e.g., Richter scale, pH scale).
  • Natural Logarithm (ln): Uses the mathematical constant e (approximately 2.718) as the base. Written as ln(x). Fundamental in calculus, physics, and compound interest calculations.
  • Binary Logarithm (log₂): Uses a base of 2. Crucial in computer science, information theory, and calculating data sizes.

Logarithm Formula: Change of Base

Calculators (and computer programming languages like JavaScript) typically only have built-in functions for natural logarithms and common logarithms. To calculate a logarithm with any other base, we use the Change of Base Formula:

logb(x) = ln(x) / ln(b)   or   logb(x) = log(x) / log(b)

How to Use the Logarithm Calculator

  1. Select Mode: Choose between General Logarithm, Common Log, Natural Log, or Binary Log from the top tabs.
  2. Enter Number (x): Input the argument. This value must be greater than 0.
  3. Enter Base (b): If using the general mode, enter your desired base. The base must be greater than 0 and cannot be 1.
  4. Calculate: Press the Calculate button or hit Enter to see the exact result, decimal approximation, and the step-by-step mathematical solution.

Frequently Asked Questions

What is a logarithm?
A logarithm is the mathematical inverse of exponentiation. It calculates the exponent to which a base number must be raised to produce a given number.
How do I calculate a logarithm?
You can calculate it manually using the change-of-base formula log_b(x) = ln(x) / ln(b), or simply use our free online Logarithm Calculator for instant, step-by-step results.
What is the base of a logarithm?
The base is the subscript number in the logarithm expression. For example, in log₂(8), the base is 2. It represents the number being multiplied by itself.
What is log10?
log10 refers to the common logarithm, which uses 10 as its base. If you see "log(x)" without a specified base, it usually implies log10.
What is ln?
"ln" stands for natural logarithm. It is a logarithm where the base is the mathematical constant 'e' (Euler's number, approx 2.71828).
Can I calculate logarithms with any base?
Yes, this calculator allows you to input any valid positive base (except 1) to find the logarithm of a number.
Why can't the logarithm base be 1?
Because the number 1 raised to any power is always 1 (e.g., 1²=1, 1¹⁰=1). Therefore, you cannot reach any other number using 1 as a base, making log₁(x) undefined.
What values are allowed inside a logarithm?
In real number mathematics, the argument (the number inside the logarithm) must be strictly greater than zero. You cannot calculate the real logarithm of 0 or a negative number.