Logarithm Calculator (Any Base, Free)

AlgebraFreeNo sign-up

The logarithm calculator finds logb(x), the power you raise the base b to in order to get x. For example, log8(32) = 5/3, because 8 = 23 and 32 = 25, so 85/3 = 25 = 32. When no exact answer exists, use change of base: log2(10) = ln 10 ÷ ln 2 ≈ 3.3219.

Logarithm calculator
logb(x) = ?
Type numbers, fractions (1/8), decimals, e, powers (2^5, e^3) or roots (sqrt(3)). The base must be positive and not 1; x must be positive.
Try:
Logarithm
log₈(32) =
5/3
≈ 1.666667
log₈(32) = 5/3 (≈ 1.666667) because 8^(5/3) = 32.
Graph of y = log₈(x)

10203040−101x(1, 0)(8, 1)(32, 5/3)

Every log graph passes through (1, 0) and (b, 1) and never touches the y-axis (x = 0 is a vertical asymptote). The base is greater than 1, so the curve rises.
Check8^(5/3) = 32 ✓
Natural log ln(32)3.465736
Common log log₁₀(32)1.50515
Binary log log₂(32)5
Exponential form8^(5/3) = 32
Show steps (7)
  1. A logarithm answers the question “what power of the base gives this number?” So log₈(32) = y means 8^y = 32.
  2. Write both numbers as powers of the same base, 2: 8 = 2³ and 32 = 2⁵.
  3. Substitute: (2³)^y = 2⁵, so 2^(3y) = 2⁵.
  4. The bases match, so the exponents are equal: 3y = 5, which gives y = 5/3.
  5. Change of base with natural logs: log₈(32) = ln(32) ÷ ln(8) = 3.465736 ÷ 2.079442 ≈ 1.666667.
  6. With common logs (base 10) you get the same answer: log(32) ÷ log(8) = 1.50515 ÷ 0.90309 ≈ 1.666667.
  7. Check by raising the base to the answer: 8^(5/3) = 32 ✓.

Logarithm Calculator (Any Base, Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the logarithm calculator

  1. Pick a tab. logb(x) evaluates a logarithm in any base. Solve / antilog finds x, the base b or the exponent y in logb(x) = y. Log rules expands or condenses an expression.
  2. Type the base and the argument. The quick buttons set base 10 (common log), e (natural log, ln) or 2. You can type fractions (1/8), decimals, powers (2^5, e^3) and roots (sqrt(3)).
  3. Read the exact answer (such as 5/3) and its decimal value. Choose how many decimal places you want at the top.
  4. Open Show steps to see the same-base method, the change-of-base working and a check. The graph marks your point on y = logb(x).

What is a logarithm?

A logarithm is an exponent. The statement logb(x) = y means exactly the same as by = x. So log2(8) = 3 because 23 = 8, and log10(0.001) = −3 because 10−3 = 0.001.

Three conditions keep a logarithm defined for real numbers: the base must be positive, the base cannot be 1, and the argument x must be positive. There is no log of 0 or of a negative number, because no power of a positive base gives 0 or a negative result.

Name Base Written Example
Common logarithm 10 log x or log10 x log 1,000 = 3
Natural logarithm e ≈ 2.71828 ln x ln e2 = 2
Binary logarithm 2 log2 x log2 1,024 = 10

How to evaluate a logarithm without a calculator

When the base and the argument are powers of the same number, you can find an exact answer. Rewrite both numbers with a common base and set the exponents equal.

Worked example: log8(32)

  1. Let y = log8(32), so 8y = 32.
  2. Write both as powers of 2: 8 = 23 and 32 = 25. Then (23)y = 25, so 23y = 25.
  3. The bases match, so 3y = 5 and y = 5/3 ≈ 1.6667.

Worked example: log4(1/8)

Write 4 = 22 and 1/8 = 2−3. Then 22y = 2−3, so 2y = −3 and log4(1/8) = −3/2. A negative answer is normal whenever the argument is between 0 and 1 and the base is greater than 1.

When the answer is not exact

log2(24) has no exact rational value, because 24 is not a power of 2. You can still simplify it: 24 = 23 × 3, so log2(24) = 3 + log2(3) ≈ 4.585. A quick estimate agrees: 16 = 24 and 32 = 25, so the answer lies between 4 and 5.

Change of base formula

Most calculators only have the log (base 10) and ln (base e) keys. The change-of-base formula turns any logarithm into a division of logs your calculator does have:

logb(x) = ln(x) ÷ ln(b) = log(x) ÷ log(b)

For example, log3(20) = ln 20 ÷ ln 3 = 2.995732 ÷ 1.098612 ≈ 2.726833. With common logs, 1.301030 ÷ 0.477121 gives the same 2.726833. The calculator shows both versions in its steps so you can copy the method onto paper.

Antilog: finding x from the logarithm

The antilog (inverse log) undoes a logarithm: if logb(x) = y, then x = by. For common logs, the antilog of 2.5 is 102.5 = 100√10 ≈ 316.23. For natural logs, ln x = 3 gives x = e3 ≈ 20.0855.

The same tab also solves for the base. If logb(81) = 4, then b4 = 81, so b = 811/4 = 3. To solve an exponential equation such as 3y = 20, choose exponent y: y = log3(20) ≈ 2.7268.

Log rules (properties of logarithms)

Rule Formula Example
Product rule logb(MN) = logb M + logb N log 4 + log 25 = log 100 = 2
Quotient rule logb(M/N) = logb M − logb N log2 48 − log2 3 = log2 16 = 4
Power rule logb(Mk) = k logb M ln(x3) = 3 ln x
Log of 1 logb 1 = 0 ln 1 = 0
Log of the base logb b = 1 log7 7 = 1
Inverse property blogb x = x 10log 5 = 5

To expand log(x2y/z3), use the quotient rule, then the product rule, then the power rule: log(x2y/z3) = 2 log x + log y − 3 log z. To condense, run the rules backwards: 3 ln a − 2 ln b + ln c = ln(a3c/b2). Both results hold when the variables are positive.

The graph of y = logb(x)

Every logarithm graph passes through (1, 0) and (b, 1), and the y-axis is a vertical asymptote: the curve gets closer and closer to it but never touches it. When b > 1 the graph rises slowly; when 0 < b < 1 it falls. The graph of y = logb(x) is the reflection of y = bx in the line y = x, which is another way to see that logs and exponentials undo each other.

Common logarithm mistakes

  • Splitting a sum. log(x + y) is not log x + log y. The product rule works for products only.
  • Dividing logs the wrong way. log x ÷ log y is a change of base, logy x. It is not log(x/y).
  • Using the wrong key. On most calculators, log means base 10 and ln means base e. For any other base, use change of base.
  • Rounding too early. Keep the full values of ln x and ln b until the final division, then round.
  • Taking the log of 0 or a negative number. These are undefined for real numbers; check the domain before you start.

Using the logarithm calculator for homework

Work the problem by hand first, then compare. Before you calculate, estimate: log2(24) must be between 4 and 5 because 24 is between 16 and 32. Enter the base and the argument exactly as written, using parentheses for fractions such as log4(1/8). If your answer disagrees with the calculator, open the steps and find the first line that differs. On a timed test you will need the method, so use the steps to practise it rather than to skip it.

Logarithms practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is log₂(32)?

Found a mistake? Let us know!

2. What is log₈(32)?

Found a mistake? Let us know!

3. What is log(0.001), the common log?

Found a mistake? Let us know!

4. Which expression equals log₅(20) by the change-of-base formula?

Found a mistake? Let us know!

5. If log x = 2, what is x?

Found a mistake? Let us know!

6. If ln x = 0, what is x?

Found a mistake? Let us know!

7. Expand log(x³y).

Found a mistake? Let us know!

8. Condense 2 ln a − ln b.

Found a mistake? Let us know!

9. Solve log_b(81) = 4 for the base b.

Found a mistake? Let us know!

10. Which of these is undefined for real numbers?

Found a mistake? Let us know!

Frequently asked questions

Is log on a calculator base 10?

Yes. On almost every scientific and graphing calculator, the log key means the common logarithm, base 10, and the ln key means the natural logarithm, base e. For example, log 1,000 = 3 because 103 = 1,000.

What is a natural log?

The natural log, ln x, is the logarithm with base e ≈ 2.71828. It appears in growth and decay, compound interest and calculus. ln e = 1, ln 1 = 0 and ln 20 ≈ 2.9957.

How do you find log base 2?

If x is a power of 2, count the factors: log2(64) = 6 because 26 = 64. Otherwise use change of base: log2(10) = ln 10 ÷ ln 2 = 2.302585 ÷ 0.693147 ≈ 3.3219.

How do you find the inverse log?

Raise the base to the given value. The inverse of log x = 2.5 is x = 102.5 ≈ 316.23, and the inverse of ln x = 3 is x = e3 ≈ 20.0855. Use the Solve / antilog tab and choose x.

What is log 1?

logb(1) = 0 for every allowed base, because any positive base raised to the power 0 equals 1. So log 1 = 0 and ln 1 = 0.

Why can't the base of a logarithm be 1?

Every power of 1 equals 1, so 1y = 5 has no solution and 1y = 1 has infinitely many. A base of 1 cannot give a single answer, so it is not allowed.

Related calculators

More algebra calculators

Browse all 206 calculators

Related to This Article

What people say about "Logarithm Calculator for Any Base: Exact Answers, Steps"?

No one replied yet.

Leave a Reply