Skip to content
Explore tools

Algebra

Log Calculator: Find Logarithms In Any Base, With Steps

Last updated: October 2026

A log calculator finds the power you must raise a base to in order to get a number. For example, log₁₀(1000) = 3 because 10³ = 1000, and log₂(32) = 5 because 2⁵ = 32. For any other base, use the change of base formula: log_b(x) = ln(x) ÷ ln(b).

  • Free, no sign-up
  • Shows the working
  • Runs on your device

Algebra

Log Calculator

Common log, natural log, or a log in any base.

Result

—

Logarithms look hard, but they answer one simple question: what exponent do I need? This guide explains what a log is, how to use the log calculator above, the three bases you will see most, and how to find a log in any base. It also covers the log rules, antilogs, solving equations and real uses like pH and decibels. Every example was checked in Python.

What Is A Logarithm?

A logarithm is an exponent. The statement log_b(x) = y means the same thing as b^y = x. You read log_b(x) as "log base b of x."

So when you ask for log₂(8), you are asking, "2 to what power gives 8?" The answer is 3, since 2 × 2 × 2 = 8.

Exponent formLog formRead as
10² = 100log₁₀(100) = 2log base 10 of 100 is 2
2⁵ = 32log₂(32) = 5log base 2 of 32 is 5
3⁴ = 81log₃(81) = 4log base 3 of 81 is 4
5⁰ = 1log₅(1) = 0log base 5 of 1 is 0
10⁻² = 0.01log₁₀(0.01) = −2log base 10 of 0.01 is −2

A log has three parts:

Logarithms are the inverse of exponents, the same way subtraction undoes addition. If 10³ = 1000, then log₁₀(1000) takes you back to 3.

How To Use The Log Calculator

The log calculator above has three tabs. Each one shows its steps, so you can copy the method onto paper.

  1. Logarithm: enter a number and pick a base (10, e, 2 or your own). You get the answer plus the same number's log in all three common bases.
  2. Solve for x, Base or Exponent: fill in any two parts of log_b(x) = y and the tool finds the third. Use it for antilogs and equations like 2^y = 50.
  3. Log Rules Checker: pick a rule, enter your numbers and see both sides of the rule worked out.

If you get an error, check the inputs. The number must be greater than 0, and the base must be positive and not 1.

Common Log, Natural Log And Log Base 2

Three bases cover almost every log you will meet: base 10, base e and base 2. Each has its own symbol and its own home field.

BaseNameUsual symbolCalculator keyWhere it shows up
10Common loglog(x) or log₁₀(x)LOGpH, decibels, earthquake magnitude, school algebra
e ≈ 2.71828Natural logln(x)LNCalculus, growth and decay, finance, physics
2Binary loglog₂(x), lb(x)logBASE or change of baseComputer science, bits, halving and doubling

Common Logarithm (Base 10)

The common log uses base 10, so it counts powers of ten. log(100) = 2, log(1000) = 3, and log(0.001) = −3. On most calculators and in most U.S. algebra classes, "log" with no base written means base 10.

A handy fact: the common log tells you roughly how many digits a number has. Any number from 100 up to 999 has a log between 2 and 3, and it has 3 digits.

Natural Logarithm (Base e)

The natural log uses base e, a constant equal to about 2.71828. It is written ln(x). For example, ln(10) = 2.302585 and ln(e) = 1.

The number e shows up whenever something grows in proportion to its current size, like continuously compounded interest or bacteria in a dish. That is why calculus and science use ln far more than base 10. In many programming languages, such as Python and JavaScript, the function named log() is actually the natural log.

Binary Logarithm (Base 2)

The binary log uses base 2. It counts how many times you can halve a number until you reach 1, or how many doublings it takes to grow from 1. log₂(1024) = 10, since 2¹⁰ = 1024.

Computer scientists use it all the time. Searching a sorted list of 1,000,000 items with binary search takes about log₂(1,000,000) ≈ 19.93 steps, so at most 20 checks. That is why sorted data can be searched so fast.

How To Find A Log In Any Base: The Change Of Base Formula

To find a log in a base your calculator does not have, divide two logs in a base it does have:

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

Both versions give the same answer. Use whichever key is easier.

Example: log base 3 of 20

  1. Find ln(20) = 2.995732.
  2. Find ln(3) = 1.098612.
  3. Divide: 2.995732 ÷ 1.098612 = 2.726833.
  4. Check: 3^2.726833 ≈ 20. ✔

Example: log base 2 of 100

Using base 10 this time: log(100) = 2 and log(2) = 0.30103. So log₂(100) = 2 ÷ 0.30103 = 6.643856. That makes sense, because 2⁶ = 64 and 2⁷ = 128, and 100 sits between them.

Example: log base 5 of 125

ln(125) ÷ ln(5) = 4.828314 ÷ 1.609438 = 3. Some calculators show 3.0000000000000004 here. That tiny tail is rounding error inside the computer, not part of the answer, so round it off.

Quick sanity check: before you trust any log answer, find the two whole powers of the base that the number sits between. The answer must fall between those two exponents.

How To Estimate A Log Without A Calculator

You can get close to most common logs by hand if you remember two values: log(2) ≈ 0.30103 and log(3) ≈ 0.47712. The log rules then build almost everything else.

NumberHow to build itCommon log
42 × 2, so 2 × log(2)0.60206
510 ÷ 2, so 1 − log(2)0.69897
62 × 3, so log(2) + log(3)0.77815
82³, so 3 × log(2)0.90309
93², so 2 × log(3)0.95424
5005 × 100, so log(5) + 22.69897

Here is the method for any number:

  1. Write the number in scientific notation. For example, 500 = 5 × 10².
  2. The power of 10 gives the whole-number part of the log. Here it is 2.
  3. Add the log of the front number. log(5) ≈ 0.69897.
  4. So log(500) ≈ 2.69897.

The whole-number part is called the characteristic, and the decimal part is called the mantissa. Old log tables only listed mantissas, because the characteristic comes straight from the power of 10. If you need a refresher on that form, the scientific notation calculator converts any number for you.

Log Rules And Properties

The log rules let you split, combine and simplify logs. They work in every base, as long as all the numbers inside the logs are positive.

RuleFormulaExample
Productlog_b(xy) = log_b(x) + log_b(y)log(4) + log(25) = log(100) = 2
Quotientlog_b(x/y) = log_b(x) − log_b(y)log(1000) − log(10) = log(100) = 2
Powerlog_b(xⁿ) = n × log_b(x)log₂(8³) = 3 × 3 = 9
Log of 1log_b(1) = 0ln(1) = 0
Log of the baselog_b(b) = 1log₇(7) = 1
Inverselog_b(bⁿ) = n and b^(log_b x) = x10^(log 5) = 5
Reciprocallog_b(1/x) = −log_b(x)log(1/1000) = −3
Change of baselog_b(x) = log_a(x) ÷ log_a(b)log₈(2) = 1/3

Example: expand log₃(9x²)

Use the product rule, then the power rule: log₃(9) + log₃(x²) = 2 + 2 log₃(x).

Example: combine 2 log(5) + log(4)

Use the power rule first: log(25) + log(4). Then the product rule: log(100) = 2.

Rules that do not exist: some "rules" look right but are false, and they cost students more points than anything else.

Antilogs: Turning A Log Back Into A Number

An antilog undoes a log. If log_b(x) = y, then the antilog is x = b^y. In base 10, the antilog of 2.5 is 10^2.5 = 316.2278.

BaseAntilog formulaCalculator keyExample
1010^y2nd + LOG (10ˣ)10^2.5 = 316.2278
ee^y2nd + LN (eˣ)e^1.5 = 4.481689
22^y^ key2^5 = 32

Before calculators, people multiplied large numbers this way. To find 5.89 × 4.73, add their common logs: 0.770115 + 0.674861 = 1.444976. The antilog, 10^1.444976, is 27.8597. That matches the exact product, 27.8597. Slide rules did the same trick by sliding two log scales side by side.

Solving Logarithmic And Exponential Equations

Logs are the main tool for solving equations where the unknown sits in an exponent, and exponents are the tool for solving equations where the unknown sits inside a log. The trick is to switch between the two forms.

Exponential Equations: The Unknown Is An Exponent

When x is in the exponent, take the log of both sides and use the power rule to bring x down.

Example: 2^x = 50

  1. Take ln of both sides: ln(2^x) = ln(50).
  2. Bring the exponent down: x × ln(2) = ln(50).
  3. Divide: x = ln(50) ÷ ln(2) = 3.912023 ÷ 0.693147 = 5.643856.
  4. Check: 2^5.643856 ≈ 50. ✔

The same steps answer real money questions. How long does it take savings to double at 5% interest compounded once a year? Solve 1.05^t = 2: t = ln(2) ÷ ln(1.05) ≈ 14.21 years. The compound interest calculator runs the full growth schedule for you.

Logarithmic Equations: The Unknown Is Inside A Log

When x is inside a log, rewrite the equation in exponent form. If there are several logs, combine them into one first.

Example: log₂(x) = 5

Rewrite as 2⁵ = x, so x = 32.

Example: log(x) + log(x − 3) = 1

  1. Combine with the product rule: log(x(x − 3)) = 1.
  2. Rewrite in exponent form: x(x − 3) = 10¹ = 10.
  3. Expand: x² − 3x − 10 = 0.
  4. Factor: (x − 5)(x + 2) = 0, so x = 5 or x = −2.
  5. Check both. x = −2 would put a negative number inside log(x), which is not allowed. So the only answer is x = 5.

Step 3 turned a log equation into a quadratic, which happens often. If it does not factor neatly, the quadratic equation solver finds the roots. Always plug your answers back in, because combining logs can create "extra" answers that do not work in the original.

Logs Of Zero, Negative Numbers And Numbers Between 0 And 1

A logarithm only works for positive numbers. The log of 0 and the log of any negative number are undefined in real numbers, while the log of a number between 0 and 1 is negative.

InputResultWhy
x > 1 (with base > 1)PositiveYou need a positive power to grow past 1. log(50) = 1.69897
x = 10Any base to the power 0 equals 1
0 < x < 1NegativeYou need a negative power to shrink below 1. log(0.5) = −0.30103
x = 0UndefinedNo power of a positive base ever reaches 0. The log heads toward −∞ as x shrinks
x < 0Undefined (real numbers)A positive base raised to any real power is always positive

The base has rules too. It cannot be 1, because 1 to any power is still 1, so log₁(5) has no answer. It cannot be 0 or negative either. A base between 0 and 1, like 0.5, is allowed but flips the signs: log₀.₅(8) = −3, because 0.5⁻³ = 8.

In advanced math, the log of a negative number can be defined using complex numbers. For example, ln(−1) = iπ. School and everyday work stay with real numbers, so a regular log calculator treats these as errors.

Common Log Values Table

These are the values people look up most. They are rounded to five decimal places.

xlog₁₀(x)ln(x)log₂(x)
0.01−2−4.60517−6.64386
0.1−1−2.30259−3.32193
0.5−0.30103−0.69315−1
1000
20.301030.693151
30.477121.098611.58496
40.602061.386292
50.698971.609442.32193
60.778151.791762.58496
70.845101.945912.80735
80.903092.079443
90.954242.197223.16993
1012.302593.32193
201.301032.995734.32193
501.698973.912025.64386
10024.605176.64386
1,00036.907769.96578

Notice two patterns. Multiplying x by 10 adds exactly 1 to the common log. Doubling x adds exactly 1 to the binary log.

Where Logarithms Are Used In Real Life

Logs turn huge ranges of numbers into small, easy ones. That is why many science scales are logarithmic: each step up means multiplying, not adding.

A Short History Of Logarithms

Logarithms were invented to make hard arithmetic easy. Scottish mathematician John Napier published the first log tables in 1614 in a book called Mirifici Logarithmorum Canonis Descriptio.

English mathematician Henry Briggs worked with Napier on a base 10 version, and in 1624 he published Arithmetica Logarithmica, with common logs of many thousands of numbers to 14 decimal places. Those base 10 logs are the "common logs" still used today.

Around the 1620s, Edmund Gunter and then William Oughtred built log scales into physical tools, which led to the slide rule. Engineers, scientists and students used slide rules for multiplication and division for more than 300 years, until pocket calculators replaced them in the 1970s.

Common Log Mistakes And How To Fix Them

Most log errors come from mixing up bases, breaking a fake rule or forgetting the domain.

MistakeExampleFix
Wrong base on the calculatorUsing LOG when the problem says lnLOG is base 10, LN is base e. Check which one the problem wants
Splitting a sumlog(x + 3) = log(x) + log(3)No rule splits a sum. Only products and quotients split
Dividing logs the wrong waylog₂(100) = log(2) ÷ log(100)The number goes on top: log(100) ÷ log(2)
Keeping answers that do not workx = −2 in log(x) + log(x − 3) = 1Plug every answer back in and drop any that make a log input 0 or negative
Assuming "log" always means base 10Reading log(x) in a Python script as base 10In most code and in many college texts, log means ln. Check the context
Rounding too earlyRounding ln(2) to 0.7 in the middle of a problemKeep at least 6 digits until the final step

Summary

Next step: enter your number and base in the log calculator at the top of this page, or browse more math tools on the Calc Solver homepage.

Frequently Asked Questions

Is log the same as ln?

No. ln always means the natural log, with base e ≈ 2.71828. log with no base usually means base 10 on calculators and in high school math. In higher math, physics and most programming languages, though, log often means the natural log. The two are linked by a fixed ratio: ln(x) is always about 2.302585 times log₁₀(x). When a problem is unclear, check the textbook or the documentation.

How do I find log base 2 on a TI-84?

On a TI-84 Plus CE, press MATH, scroll to logBASE( and press ENTER. Type the number, move to the base box, type 2, and press ENTER. Older TI-84 models without logBASE( can use the change of base formula instead: type LOG(100) ÷ LOG(2) to get log₂(100) = 6.643856. The same method works on any calculator with a LOG or LN key.

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

Because 1 raised to any power is still 1. If the base were 1, then log₁(5) would ask "1 to what power equals 5?" and no answer exists. Meanwhile log₁(1) would have endless answers, since every power works. A log must give exactly one answer for each input, so base 1 is ruled out. Bases of 0 and negative numbers are excluded for similar reasons.

What is the number e?

The number e is a math constant equal to about 2.718281828. It is the value that (1 + 1/n)ⁿ approaches as n grows very large, which is why it appears in continuously compounded interest. It is also the only base whose exponential curve has a slope equal to its own height at every point. That property makes ln(x) the simplest log to use in calculus.

What is the log of infinity?

The log of infinity is not a number, but it has a limit. As x grows without bound, log_b(x) also grows without bound for any base greater than 1, so we say the limit is infinity. It grows very slowly, though. log₁₀ of a trillion is only 12. For a base between 0 and 1, the log heads toward negative infinity instead.

Can a log calculator handle very large or very small numbers?

Yes, as long as the number is positive. Most online calculators accept inputs in scientific notation, such as 6.02e23 or 3.2e-4, and return the log directly. log₁₀(6.02 × 10²³) is about 23.7796. Logs are often the easiest way to work with numbers too big for a normal display, because the log of even a huge number is small and easy to handle.

Try it with your own numbers

The calculator at the top of this page uses the same formulas as the examples.

Use the calculator