Logarithm Calculator
Calculate logarithms with any valid base using this free logarithm calculator. Find log base b of x, common logarithms (base 10), natural logarithms (ln), and binary logarithms (base 2). View the result, change-of-base calculation, and an inverse check.
Calculate a Logarithm
To calculate logb(x), enter a positive argument x and choose the logarithm base.
What Is a Logarithm?
A logarithm answers the question: “To what exponent must a base be raised to obtain a given number?” It is the inverse operation of exponentiation.
For example, log2(8) = 3 because 23 = 8. The base is 2, the argument is 8, and the logarithm is 3.
Types of Logarithms
Common logarithm
A common logarithm uses base 10. For example, log(1000) = 3 because 103 = 1000.
Natural logarithm
The natural logarithm uses the mathematical constant e, approximately 2.71828. It is widely used in calculus, exponential growth, and differential equations.
Binary logarithm
A binary logarithm uses base 2 and appears in computing, information theory, and algorithms. For example, log2(32) = 5.
Custom-base logarithm
A custom logarithm allows any positive base except 1. For example, log3(81) = 4.
Change-of-Base Formula
The change-of-base formula lets you evaluate logarithms using a calculator that supports natural logarithms or common logarithms.
For example, to calculate log2(10):
- Calculate ln(10), approximately 2.302585.
- Calculate ln(2), approximately 0.693147.
- Divide the two values: 2.302585 / 0.693147 ≈ 3.321928.
Therefore, log2(10) is approximately 3.321928.
Important Logarithm Rules
Product rule
The logarithm of a product becomes a sum.
Quotient rule
The logarithm of a quotient becomes a difference.
Power rule
An exponent can be moved in front as a multiplier when the logarithm's domain conditions are met.
Logarithm of one
Every valid logarithm base raised to zero equals one.
Logarithm of the base
A base raised to the first power equals itself.
Inverse relationship
Exponentiation and logarithms with the same base undo each other.
Frequently Asked Questions
How do I calculate a logarithm?
Enter the positive argument, select a logarithm type, and click Calculate Logarithm. For a custom base, enter a positive base that is not equal to 1.
Can I calculate logarithms with any base?
Yes. Select Custom base and enter any positive base other than 1.
Why can't the argument be zero or negative?
This calculator works with real logarithms. The logarithm's argument must be strictly positive. The logarithm of zero or a negative number is not defined in the real-number system.
Why can't the base equal 1?
Raising 1 to any real power always gives 1, so base 1 cannot uniquely identify the exponent for general logarithm arguments.
What is the difference between log and ln?
In common mathematical notation, log usually means base 10, while ln means base e. This calculator lets you select either convention explicitly.
Is this logarithm calculator free?
Yes. It runs directly in your browser through the website and requires no account or installation.