Logarithm Calculator
Enter a number and any base to find log base b of x, with the natural log, log base 10, and log base 2 shown alongside, plus an antilog mode for the inverse.
The logarithm is only defined for numbers greater than 0. Everything runs in your browser. Nothing is uploaded.
Everything is calculated in your browser. Nothing is uploaded.
How to calculate a logarithm online
Choose a mode
Keep logarithm to find the log of a number, or switch to antilog to raise a base to a power.
Enter your number
Type the number whose logarithm you want, which must be greater than 0 in logarithm mode.
Pick a base
Select 10, e, or 2, or enter a custom base such as 5 or 1.5.
Read and copy
The result and the three standard logarithms update instantly, ready to copy as a plain summary.
Why use this tool
Any base you like
Pick 10, e, or 2 with one tap, or type any positive base, whole or decimal, to get log base b of x.
Three standard logs at once
Every entry also returns the natural log, the base 10 log, and the base 2 log side by side.
Antilog mode
Flip to the inverse to raise a base to a power, with e to the x, 10 to the x, and 2 to the x shown together.
Handles the undefined cases
A number of 0 or below, and a base of 0, negative, or exactly 1, are caught with a clear note instead of a wrong answer.
Scientific notation for extremes
Very large or very small antilog results are written in standard form so nothing shows as a misleading 0 or infinity.
Runs entirely in your browser
Every calculation happens on your device. Nothing you type is uploaded.
About this tool
A logarithm answers a simple question: what power do you raise the base to in order to reach a given number? This calculator finds that power the moment you type. Enter any positive number and pick a base of 10, e, or 2, or type your own, and it returns the result along with the three logarithms you reach for most: the natural log, the base 10 log, and the base 2 log.
It uses the change of base rule, so log base b of x is found from the natural log of x divided by the natural log of b. That means any base works, whole or decimal, not just the common three. Logarithms are only defined for numbers greater than 0, so a zero or negative entry is caught with a short message rather than a broken result, and a base of 0, a negative base, or a base of exactly 1 is flagged as invalid. For raising a base to a power directly, see the exponent calculator.
Switch on antilog mode to run the inverse. Given an exponent x and a base b, it computes b to the power x, alongside e to the x, 10 to the x, and 2 to the x, and writes very large or very small results in scientific notation so nothing overflows to a meaningless value. Choose 2, 4, 6, or 8 decimal places to keep irrational results as short or as exact as you need. For a full keypad of powers, roots, and trig, try the scientific calculator.
Frequently asked questions
- How do I calculate a logarithm?
- Type your number into the field, choose a base of 10, e, or 2, or enter a custom base, and the result appears instantly along with the natural log, the base 10 log, and the base 2 log. There is no button to press.
- How does it work with any base?
- It uses the change of base rule: log base b of x equals the natural log of x divided by the natural log of b. Because of this, any positive base other than 1 works, including decimals such as 1.5 or 2.5.
- What is an antilogarithm?
- The antilog is the inverse of the logarithm. Switch to antilog mode, enter an exponent x and a base b, and it computes b to the power x, along with e to the x, 10 to the x, and 2 to the x.
- Why is the log of 0 or a negative number undefined?
- No power of a positive base can ever produce 0 or a negative number, so the logarithm of a value at or below 0 does not exist. The calculator flags this instead of returning a false result.
- Why can the base not be 1?
- Every power of 1 equals 1, so a base of 1 can never reach any other number, which leaves its logarithm undefined. A base of 0 or a negative base is rejected for the same reason.
- Is my data uploaded anywhere?
- No. Everything runs in your browser; nothing is sent to a server.
Related tools
Exponent Calculator
Raise any base to a power and get the result, its expanded form, scientific notation, and roots, updated as you type.
Scientific Calculator
Type a full expression with trigonometry, logarithms, powers, roots, and factorials, and see the result update live as you go.
Square Root Calculator
Enter a number to get its square root, cube root, an optional nth root, and its square, plus whether it is a perfect square.
401(k) Calculator
Project your 401(k) balance at retirement from your contributions, employer match, and expected return, year by year.
Amortization Schedule Calculator
Build a full payment-by-payment schedule for any fixed-rate loan, with the payoff date and the interest you save by paying extra.
APY Calculator
Turn a nominal rate and compounding frequency into the true annual percentage yield, project a balance, or reverse solve the rate.