Logarithm Calculator
This logarithm calculator finds the log of a number in any base, including the natural log (ln), the common log (base 10) and the binary log (base 2). It also finds antilogs and converts between log form and exponential form. Every answer comes with a step-by-step solution and a check of the result, and no signup is needed.
Calculation
Logarithm with any base
Formula
Step-by-Step Solution
Given
Formula
Step-by-step working
Check your answer
Final summary
How to Use This Logarithm Calculator
- Pick a tab. Log handles any base, ln and log₁₀ are the natural and common logs, Antilog undoes a log, and Convert form switches between log and exponential form.
- Type your numbers. Whole numbers, decimals, fractions such as 1/2, and the letter e (Euler’s number) all work. You can also type e^3 for a power of e.
- Click Calculate or press Enter. The Step-by-Step Solution box opens directly under the inputs.
- Read the answer, then the key values such as the exponential form and the same answer worked out with ln and with log base 10.
- Follow the numbered steps and the Check your answer line, then use Copy result or Download PDF to keep the working.
- Click Reset to clear the inputs and start again.
Where an answer is a whole number or a simple fraction, such as log₂(8) = 3 or log₄(8) = 3/2, the calculator finds it exactly and says so. Other answers are rounded to 10 significant digits and marked with the ≈ sign.
What the Step-by-Step Solution Shows
After you press Calculate, the answer box shows the method as well as the number.
- The answer: the exact value when there is one, or a decimal marked with ≈.
- Key values: the exact and decimal forms, scientific notation for big or tiny results, and the matching log or exponent form.
- Given and formula: your inputs and the rule used, with your own numbers substituted in.
- Numbered steps: each step has a short title and a one-line reason.
- Check your answer: the reverse operation, so you can see the result is right.
- Copy result and Download PDF: Copy gives plain text for notes, and Download PDF gives a file for homework.
What Is a Logarithm?
A logarithm is the inverse of an exponent. An exponent asks what you get when a base is multiplied by itself several times. A logarithm asks the reverse: how many times must the base be multiplied to reach a given number? Since 103 = 1,000, the logarithm of 1,000 in base 10 is 3.
Logs turn multiplication into addition, which is why they were used to speed up hand calculation before calculators, and why they still describe quantities that grow over huge ranges, such as sound, earthquakes and acidity.
Logarithm Formula
- Base b: positive and not equal to 1
- Number x: must be greater than 0
- log with no base shown means base 10
- ln means base e, where e is about 2.71828
- lg or log₂ is sometimes used for base 2 in computer science
Types of Logarithms
| Name | Base | Written | Common use |
|---|---|---|---|
| Common log | 10 | log(x) or log₁₀(x) | Scientific notation, pH, decibels |
| Natural log | e ≈ 2.71828 | ln(x) | Calculus, growth and decay, finance |
| Binary log | 2 | log₂(x) | Computer science, information, doublings |
Log Rules
| Rule | Formula | Example |
|---|---|---|
| Product | log(ab) = log(a) + log(b) | log(20) = log(2) + log(10) |
| Quotient | log(a/b) = log(a) − log(b) | log(5) = log(10) − log(2) |
| Power | log(an) = n × log(a) | log(8) = 3 × log(2) |
| Log of 1 | logb(1) = 0 | ln(1) = 0 |
| Log of the base | logb(b) = 1 | log₂(2) = 1 |
| Change of base | logb(x) = logc(x) / logc(b) | log₂(10) = ln(10) / ln(2) |
Change of Base Formula
Most calculators only have a log button (base 10) and an ln button (base e). To find a log in any other base, divide two of those logs.
Example: log5(200)
- Write it as a ratio: log5(200) = ln(200) / ln(5)
- Find each natural log: ln(200) is about 5.2983 and ln(5) is about 1.6094
- Divide: 5.2983 / 1.6094 is about 3.2920
The key values box on the Log tab shows this same answer worked out with ln and with log base 10, so you can see that both routes agree.
How to Use the Log and ln Buttons
On a scientific calculator, log is base 10 and ln is base e. On many models you press the key first and then type the number, then press equals. Some newer models show the log first as a template, so check how yours displays it.
- For log base 10, press log, type the number, and press equals.
- For ln, press ln, type the number, and press equals.
- For any other base, use the change of base formula with either key.
- The inverse keys are usually 10x for log and ex for ln, found with the shift or 2nd key.
Worked Examples, Step by Step
Example 1: log2(32)
- Ask: 2 raised to what power gives 32?
- List powers of 2: 2, 4, 8, 16, 32, which is the 5th power
- So 25 = 32
Example 2: Solve 4x = 100 with a log
- Rewrite in log form: x = log4(100)
- Change of base: x = log(100) / log(4) = 2 / 0.60206
- Divide: x is about 3.3219
Example 3: Antilog of 2.5
- The antilog base 10 of y is 10y
- Split the power: 102.5 = 102 × 100.5 = 100 × 3.1623
- Multiply: 316.23
Common Log Values
| x | log₁₀(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 0.30103 | 0.69315 | 1 |
| 4 | 0.60206 | 1.38629 | 2 |
| 5 | 0.69897 | 1.60944 | 2.32193 |
| 8 | 0.90309 | 2.07944 | 3 |
| 10 | 1 | 2.30259 | 3.32193 |
| 100 | 2 | 4.60517 | 6.64386 |
| 1,000 | 3 | 6.90776 | 9.96578 |
Where Logarithms Are Used
- pH: acidity is −log of the hydrogen ion concentration, so each pH step is a tenfold change.
- Sound: decibels use a base 10 log, so 10 dB more is ten times the power.
- Earthquakes: each whole step on the Richter scale is a tenfold increase in measured amplitude.
- Finance: the time to grow by a factor uses ln, for example the doubling time at a given interest rate.
- Computing: binary logs count how many halvings or bits are needed, as in searching a sorted list.
To go the other way and build a number from a base and a power, use the Exponent Calculator.
Limits and Rounding
Inputs can have up to 15 digits and a power of 10 from −100 to 100. The base of a logarithm must be positive and not 1, and the number must be positive. Logs that are whole numbers or simple fractions are found exactly. Other answers are rounded to 10 significant digits and marked with the ≈ sign.
Frequently Asked Questions
- What is a logarithm in simple terms?
- A logarithm answers one question: what power must the base be raised to in order to get this number? For example, log₂(8) = 3 because 2³ = 8.
- What is the difference between log and ln?
- log with no base shown is base 10, and ln is the natural log with base e, which is about 2.71828. Both can be rewritten in any other base with the change of base formula.
- How do I calculate log base 2?
- Ask which power of 2 gives your number. For log₂(32) the answer is 5 because 2⁵ = 32. For numbers that are not exact powers of 2, use the Log tab with base 2 to get a decimal.
- How do I use the change of base formula?
- Use log_b(x) = ln(x) / ln(b), or the same ratio with base 10 logs. This lets you find a log in any base with just the ln or log buttons on a basic scientific calculator.
- What is an antilogarithm?
- The antilog reverses a log. If log₁₀(N) = 3, then N = 10³ = 1,000. In general the antilog base b of y equals b raised to the power y.
- Why is log(0) undefined?
- No power of a positive base ever equals 0, so there is no answer. As x gets closer to 0 from the right, log(x) heads toward negative infinity.
- Can you take the log of a negative number?
- Not with real numbers. A positive base raised to any real power is always positive, so the log of a negative number has no real answer. The calculator explains this instead of showing an error code.
- How do I convert between log form and exponential form?
- They say the same thing: log_b(x) = y means b^y = x. Use the Convert form tab, fill in any two of base, number and result, and leave the third blank to solve for it.
- What are the main log rules?
- The product rule turns multiplication into addition, the quotient rule turns division into subtraction, and the power rule moves an exponent to the front as a multiplier. They are summarized in the log rules table on this page.