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
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 form | Log form | Read as |
|---|---|---|
| 10² = 100 | log₁₀(100) = 2 | log base 10 of 100 is 2 |
| 2⁵ = 32 | log₂(32) = 5 | log base 2 of 32 is 5 |
| 3⁴ = 81 | log₃(81) = 4 | log base 3 of 81 is 4 |
| 5⁰ = 1 | log₅(1) = 0 | log base 5 of 1 is 0 |
| 10⁻² = 0.01 | log₁₀(0.01) = −2 | log base 10 of 0.01 is −2 |
A log has three parts:
- The base (b): the number being raised to a power. It must be positive and not equal to 1.
- The argument (x): the number you want to reach. It must be positive.
- The result (y): the exponent, which can be any real number, including negatives and decimals.
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.
- 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.
- 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.
- 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.
| Base | Name | Usual symbol | Calculator key | Where it shows up |
|---|---|---|---|---|
| 10 | Common log | log(x) or log₁₀(x) | LOG | pH, decibels, earthquake magnitude, school algebra |
| e ≈ 2.71828 | Natural log | ln(x) | LN | Calculus, growth and decay, finance, physics |
| 2 | Binary log | log₂(x), lb(x) | logBASE or change of base | Computer 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
- Find ln(20) = 2.995732.
- Find ln(3) = 1.098612.
- Divide: 2.995732 ÷ 1.098612 = 2.726833.
- 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.
| Number | How to build it | Common log |
|---|---|---|
| 4 | 2 × 2, so 2 × log(2) | 0.60206 |
| 5 | 10 ÷ 2, so 1 − log(2) | 0.69897 |
| 6 | 2 × 3, so log(2) + log(3) | 0.77815 |
| 8 | 2³, so 3 × log(2) | 0.90309 |
| 9 | 3², so 2 × log(3) | 0.95424 |
| 500 | 5 × 100, so log(5) + 2 | 2.69897 |
Here is the method for any number:
- Write the number in scientific notation. For example, 500 = 5 × 10².
- The power of 10 gives the whole-number part of the log. Here it is 2.
- Add the log of the front number. log(5) ≈ 0.69897.
- 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.
| Rule | Formula | Example |
|---|---|---|
| Product | log_b(xy) = log_b(x) + log_b(y) | log(4) + log(25) = log(100) = 2 |
| Quotient | log_b(x/y) = log_b(x) − log_b(y) | log(1000) − log(10) = log(100) = 2 |
| Power | log_b(xⁿ) = n × log_b(x) | log₂(8³) = 3 × 3 = 9 |
| Log of 1 | log_b(1) = 0 | ln(1) = 0 |
| Log of the base | log_b(b) = 1 | log₇(7) = 1 |
| Inverse | log_b(bⁿ) = n and b^(log_b x) = x | 10^(log 5) = 5 |
| Reciprocal | log_b(1/x) = −log_b(x) | log(1/1000) = −3 |
| Change of base | log_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.
- log(x + y) is not log(x) + log(y). Test it: log(10 + 10) = 1.301, but log(10) + log(10) = 2.
- log(x) × log(y) is not log(xy).
- log(x) ÷ log(y) is not log(x/y). It is actually log_y(x), the change of base formula.
- (log x)² is not 2 log(x). Only the exponent inside the log comes out front.
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.
| Base | Antilog formula | Calculator key | Example |
|---|---|---|---|
| 10 | 10^y | 2nd + LOG (10ˣ) | 10^2.5 = 316.2278 |
| e | e^y | 2nd + LN (eˣ) | e^1.5 = 4.481689 |
| 2 | 2^y | ^ key | 2^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
- Take ln of both sides: ln(2^x) = ln(50).
- Bring the exponent down: x × ln(2) = ln(50).
- Divide: x = ln(50) ÷ ln(2) = 3.912023 ÷ 0.693147 = 5.643856.
- 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
- Combine with the product rule: log(x(x − 3)) = 1.
- Rewrite in exponent form: x(x − 3) = 10¹ = 10.
- Expand: x² − 3x − 10 = 0.
- Factor: (x − 5)(x + 2) = 0, so x = 5 or x = −2.
- 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.
| Input | Result | Why |
|---|---|---|
| x > 1 (with base > 1) | Positive | You need a positive power to grow past 1. log(50) = 1.69897 |
| x = 1 | 0 | Any base to the power 0 equals 1 |
| 0 < x < 1 | Negative | You need a negative power to shrink below 1. log(0.5) = −0.30103 |
| x = 0 | Undefined | No power of a positive base ever reaches 0. The log heads toward −∞ as x shrinks |
| x < 0 | Undefined (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.
| x | log₁₀(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 |
| 1 | 0 | 0 | 0 |
| 2 | 0.30103 | 0.69315 | 1 |
| 3 | 0.47712 | 1.09861 | 1.58496 |
| 4 | 0.60206 | 1.38629 | 2 |
| 5 | 0.69897 | 1.60944 | 2.32193 |
| 6 | 0.77815 | 1.79176 | 2.58496 |
| 7 | 0.84510 | 1.94591 | 2.80735 |
| 8 | 0.90309 | 2.07944 | 3 |
| 9 | 0.95424 | 2.19722 | 3.16993 |
| 10 | 1 | 2.30259 | 3.32193 |
| 20 | 1.30103 | 2.99573 | 4.32193 |
| 50 | 1.69897 | 3.91202 | 5.64386 |
| 100 | 2 | 4.60517 | 6.64386 |
| 1,000 | 3 | 6.90776 | 9.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.
- pH (chemistry): pH = −log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration. A concentration of 3.2 × 10⁻⁴ gives pH = 3.49. Each pH step is a tenfold change in acidity.
- Decibels (sound): dB = 10 × log₁₀(I ÷ I₀). A sound 1,000,000 times more intense than the reference level is 10 × 6 = 60 dB. Every 10 dB is ten times the intensity.
- Earthquakes: magnitude scales are logarithmic. According to the USGS explanation of earthquake magnitude and energy, each whole-number step means ten times the measured wave amplitude and about 32 times more energy. Two steps is roughly 32 × 32 ≈ 1,000 times the energy.
- Computing: the number of bits needed to store n different values is log₂(n), rounded up. 256 values need log₂(256) = 8 bits.
- Counting digits: a positive whole number x has ⌊log₁₀(x)⌋ + 1 digits. Since log₁₀(2¹⁰⁰) = 100 × 0.30103 = 30.103, the number 2¹⁰⁰ has 31 digits.
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.
| Mistake | Example | Fix |
|---|---|---|
| Wrong base on the calculator | Using LOG when the problem says ln | LOG is base 10, LN is base e. Check which one the problem wants |
| Splitting a sum | log(x + 3) = log(x) + log(3) | No rule splits a sum. Only products and quotients split |
| Dividing logs the wrong way | log₂(100) = log(2) ÷ log(100) | The number goes on top: log(100) ÷ log(2) |
| Keeping answers that do not work | x = −2 in log(x) + log(x − 3) = 1 | Plug every answer back in and drop any that make a log input 0 or negative |
| Assuming "log" always means base 10 | Reading log(x) in a Python script as base 10 | In most code and in many college texts, log means ln. Check the context |
| Rounding too early | Rounding ln(2) to 0.7 in the middle of a problem | Keep at least 6 digits until the final step |
Summary
- A logarithm is an exponent: log_b(x) = y means b^y = x.
- Base 10 (log), base e (ln) and base 2 (log₂) cover most real problems.
- For any other base, divide: log_b(x) = ln(x) ÷ ln(b).
- The product, quotient and power rules split and combine logs. No rule splits log(x + y).
- An antilog undoes a log: x = b^y.
- Logs only accept positive inputs, and the base must be positive and not 1.
- Always check answers to log equations in the original equation.
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.