Logarithm Calculator
Calculate logarithms with any valid base, including common, natural, base-2 and custom logarithms.
Logarithm Calculator
Select a logarithm base, enter a positive number and calculate the logarithm instantly.
Result
What Is a Logarithm Calculator?
A logarithm calculator determines the exponent required to raise a particular base to produce a given number. In mathematical notation, logb(x) = y means that by = x. This makes logarithms the inverse operation of exponentiation.
This free online logarithm calculator supports common logarithms with base 10, natural logarithms with base e, base-2 logarithms and custom logarithm bases. It is useful for mathematics, algebra, science, engineering, computing and other applications involving exponential relationships.
Why Use the Logarithm Calculator?
The calculator provides a quick way to evaluate logarithms without manually applying logarithmic formulas or relying on a separate scientific calculator.
Multiple Bases
Calculate common, natural, binary and custom-base logarithms from the same tool.
Custom Logarithms
Enter your own valid logarithm base when a standard base such as 10, e or 2 is not required.
Change of Base
The calculator uses the change of base relationship to calculate logarithms for arbitrary bases.
Accurate Results
Results are calculated directly using JavaScript's mathematical functions and displayed to useful numerical precision.
Instant Calculation
Calculate logarithms immediately in your browser without sending the values to a server.
Free to Use
Use the logarithm calculator online for free without creating an account or installing software.
How to Use the Logarithm Calculator
Calculating a logarithm takes only a few seconds. Select the required base, enter the number and calculate the result.
- Select a logarithm base — Choose base 10, base e, base 2 or Custom from the base selector.
- Enter the number — Enter the positive value for which you want to calculate the logarithm.
- Enter a custom base if required — If Custom is selected, enter a base greater than 0 and different from 1.
- Calculate the result — Select Calculate Logarithm to display the logarithm, base, equivalent power and calculation formula.
How to Calculate a Logarithm
A logarithm answers the question: "What exponent produces this number?" For example, log₁₀(1,000) = 3 because 10³ = 1,000. Similarly, log₂(32) = 5 because 2⁵ = 32.
The general logarithm relationship is logb(x) = y, which is equivalent to by = x. The base determines the logarithmic scale, while x is the positive number being evaluated and y is the resulting exponent.
Common and Natural Logarithms
A common logarithm uses base 10 and is normally written as log(x). It is widely used in mathematics and scientific applications. For example, log(100) = 2 because 10² = 100.
A natural logarithm uses the mathematical constant e as its base and is written as ln(x). The value of e is approximately 2.718281828459045. Natural logarithms are particularly important in calculus, exponential growth and decay, continuous processes and many scientific equations.
Using the Change of Base Formula
Calculators often provide direct functions for common and natural logarithms but may not provide every possible base. The change of base formula solves this problem by expressing a logarithm using another logarithm base:
logb(x) = ln(x) ÷ ln(b)
For example, to calculate log₅(125), use ln(125) ÷ ln(5), which gives 3 because 5³ = 125.
Understanding Logarithm Results
The result of a logarithm can be positive, zero or negative. When the base is greater than 1, a number greater than 1 produces a positive logarithm, 1 produces zero, and a number between 0 and 1 produces a negative logarithm. For example, log₁₀(0.01) = −2 because 10⁻² = 0.01.
For real-valued logarithms, the number being evaluated must be greater than zero. The base must also be greater than zero and must not equal 1. These restrictions are enforced by the calculator so that invalid real logarithms produce a clear error instead of an undefined result.
Logarithms are frequently used to simplify calculations involving multiplication, division, powers and exponential relationships. They also appear in areas such as sound levels, acidity, earthquake magnitude, compound growth, algorithms and data analysis.
James William Steven Parker
Creator & Developer of YesTools
James William Steven Parker is a web developer and technology professional with extensive experience in web development, web design, SEO, web hosting, systems analysis and cybersecurity. He created YesTools to provide fast, practical and free online tools for everyday tasks and technical work.
Learn more about James and YesToolsFrequently Asked Questions
Explore More Free Tools
Explore the YesTools collection of free online tools, calculators, converters, generators and utilities.
Browse All Categories

