Logarithm Calculator
Calculate logarithms (log base N of X).
What this calculator does
This tool works out logarithms in any base. You enter a number and a base, and it tells you what power the base must be raised to in order to give your number.
Students use it for algebra, chemistry and physics homework. It also answers everyday questions, such as how many times something must double to reach a target.
A worked example
Bianca, a student in Charlottetown, posts a video for a school project. Suppose its views double every day, starting from one. She wants to know how many doublings it takes to reach 50,000 views.
She enters 50000 as the value and 2 as the base, because doubling means multiplying by 2. The answer is 15.609640. That means 2 raised to the power 15.609640 is very close to 50,000. The answer is not a whole number, so she rounds it up to find the first full day on which the views pass her target.
How we work it out
A logarithm answers the question: what power do I raise this base to, to get this number? Log base 10 of 1000 is 3, because 10 to the power 3 is 1000.
We take the natural log of your number and divide it by the natural log of the base. This change-of-base rule works for any base. The number must be greater than zero. The base must also be greater than zero, and it cannot be 1. Results are rounded to six decimal places.
Reading the answer
The result is a power. If the base is 10 and the answer is 3, then 10^3 gives your number. You can check any answer with the exponent calculator. Use the same base, and put the result in as the exponent.
- The log of 1 is 0 in every base.
- The log of the base itself is 1.
- Numbers between 0 and 1 have negative logs when the base is bigger than 1. Log base 10 of 0.001 is -3.
- A base between 0 and 1 flips the sign. Log base 0.5 of 8 is -3.
Choosing the base
Base 10 is the common log. It counts powers of ten, which is why it is used for the pH scale and for sound levels in decibels. Base 2 counts doublings, and it is common in computing. Base e gives the natural log, written ln, which appears in growth and decay problems. There is no separate ln setting here, so type 2.718281828 as the base for a very close answer.
Common mistakes
The two boxes are easy to swap. The value is the number you want to reach, and the base is the number being raised to a power. Log base 2 of 8 is 3, but log base 8 of 2 is 1/3.
Logs of zero and negative numbers do not exist, so the calculator asks for a positive value. Also, the log of a sum is not the sum of the logs. That rule works for products instead. The log of 100 × 1000 is the log of 100 plus the log of 1000, which is 2 + 3 = 5.
What this does not include
- Logs of zero or negative numbers, which do not exist
- A base of 1, zero or a negative number, which is not allowed
- A separate natural log setting; enter e, about 2.718281828, as the base
- Complex logarithms
- More than six decimal places; results are rounded
Common questions
Where are logs used?
Earthquake scales, sound levels and pH all use them. They squeeze very large ranges into small numbers. When you take base 10 logs, each step of 1 means a factor of ten. Logs also let you solve for time in growth problems, such as how long a quantity takes to double.
How do I work out a natural log (ln)?
Enter your number as the value and 2.718281828 as the base. That is the number e to nine decimal places, which is close enough for school work. For example, ln 20 comes out as 2.995732. The scientific calculator also has an ln function you can type directly.
Why is my answer negative?
Your value is between 0 and 1, and your base is bigger than 1. You need a negative power to get a number smaller than 1. For example, 10^-2 is 0.01, so log base 10 of 0.01 is -2. A negative answer here is correct, not an error.
What is the change of base rule?
It lets you find a log in any base using a kind of log you already have. Divide the log of the number by the log of the base, using the same kind of log for both. So log base 2 of 8 equals log 8 ÷ log 2. This calculator uses natural logs for that step.
Sources
- Algebra - Logarithm Functions, Lamar University (Paul's Online Notes)
Last reviewed October 18, 2026. How we check our numbers.
This is an estimate to help you plan. It is not financial, medical, or legal advice. Talk to a professional before you make a big decision.