Calculate logarithms with any base instantly. Solve log, ln, log₂, and custom base problems with step-by-step solutions. Free online logarithm calculator with formula explanations, rules, and real-world examples.
log() =
The logarithm, or log, is the inverse of the mathematical operation of exponentiation. This means that the log of a number is the number that a fixed base has to be raised to in order to yield the number. Conventionally, log implies that base 10 is being used, though the base can technically be anything. When the base is e, ln is usually written, rather than loge. log₂, the binary logarithm, is another base that is typically used with logarithms.
Base 10 is commonly used in science and engineering, base e in math and physics, and base 2 in computer science.
Let's start with the basics. A logarithm is just a fancy way of asking a simple question:
"What exponent do I need to raise this base to, to get that number?"
Sounds confusing? Let's break it down with an example.
Say you have 2³ = 8. That's 2 raised to the power of 3 equals 8. The logarithm asks the reverse: "2 raised to WHAT power equals 8?" The answer is 3. So log₂(8) = 3.
See? You already knew the answer. You just didn't know you knew it.
Here's another way to think about it. Imagine you're baking cookies. The recipe says "multiply ingredients by 2 to get 16 cookies." If you have 8 cookies worth of ingredients, the log is asking: "How many times do I need to double this to get 16?" The answer is 1 (because 8 × 2 = 16). That's basically what a log does.
Using our calculator is stupidly simple. Here's how:
Let's try a real example. Say you want log₁₀(1000). Type 1000 as the number, 10 as the base. What do you get? 3. Because 10³ = 1000. Makes sense, right?
What about log₂(32)? Type 32, base 2. You get 5. Because 2⁵ = 32.
Here's a trick I learned the hard way. If you're ever stuck, just think: "What number do I put as the exponent to make this work?" That number is your answer.
There are two special logs that show up all the time. You've probably seen them on your calculator.
This is just log with base 10. When you see "log" without a base written, it usually means base 10. Scientists and engineers use this a lot. For example, the Richter scale for earthquakes uses log₁₀. A 6.0 earthquake is 10 times stronger than a 5.0. That's logs in action.
This is log with base e. And e is a special number (about 2.718). It shows up in nature – like population growth, radioactive decay, and compound interest. When you see "ln" on your calculator, that's the natural log.
So what's the difference? Honestly, it's just the base. Common log uses 10. Natural log uses e. That's it. Don't overthink it.
There are three main rules for logs. They look scary in textbooks, but they're just shortcuts. Here they are in plain English:
log(x × y) = log(x) + log(y)
Translation: If you multiply two numbers inside a log, you can split them into two logs added together. This is super useful for breaking down big numbers.
log(x / y) = log(x) - log(y)
Translation: Division inside a log becomes subtraction outside. Handy for fractions.
log(xⁿ) = n × log(x)
Translation: An exponent inside a log becomes multiplication outside. This one saves so much time.
Let's see these in action. Say you want log(100 × 1000). Instead of multiplying first, just do log(100) + log(1000) = 2 + 3 = 5. Way easier.
I've seen students (and honestly, adults too) make these mistakes all the time. Don't be that person.
Mistake #1: Thinking log(0) works. It doesn't. There's no exponent that gives you zero. Your calculator will show "error" or "undefined." That's normal.
Mistake #2: Thinking log of a negative number works. Nope. Same reason. You can't raise a positive base to any exponent and get a negative number. If you see "error," check your input.
Mistake #3: Forgetting the base. log(100) with base 10 is 2. But log₂(100) is about 6.64. Big difference. Always check your base.
Mistake #4: Mixing up log and ln. They're different bases. log₁₀(100) = 2, but ln(100) ≈ 4.6. Use the right one for your problem.
You might be thinking, "When will I ever use this?" More often than you'd think.
The Richter scale is logarithmic. A 7.0 earthquake is 10 times stronger than a 6.0. That's because it's log₁₀. So the difference between a 5.0 and an 8.0 isn't 3 units – it's 1,000 times stronger (10³). Logs help us compare huge differences without using crazy numbers.
Decibels use logs too. A whisper is about 30 dB. A rock concert is about 120 dB. That's not a 4x difference in actual sound pressure – it's a 1,000,000,000x difference. Logs compress that massive range into something we can understand.
pH is log₁₀ of hydrogen ion concentration. A pH of 3 is 10 times more acidic than a pH of 4. That's why small pH changes mean big differences in acidity.
Ever wonder how long it takes your money to double? Use the Rule of 72, but the real math uses natural logs. ln(2) / interest rate gives you the exact time. Banks use this.
What if you need log₃(20) but your calculator only does base 10 or e? No problem. Use the change of base formula:
logₐ(b) = log(b) / log(a)
So log₃(20) = log(20) / log(3). Just use your calculator for both parts. Easy.
Our log calculator handles any base automatically, so you don't need to do this manually. But it's good to know how it works.
Before calculators and computers, people used log tables to do multiplication. Seriously. They'd look up the log of each number, add them, then find the antilog. It was the only way to multiply big numbers without spending hours.
John Napier invented logarithms in the 1600s. He basically saved astronomers' lives. They were spending months doing calculations by hand. Logs cut that down to days. Imagine that – a math discovery that literally changed how fast science could progress.
Fun fact: The word "logarithm" comes from Greek. "Logos" means ratio, and "arithmos" means number. So it's literally "ratio number."
Got a strange result? Here's what might be happening.
Problem: Calculator shows "Error" or "NaN"
You probably entered 0 or a negative number. Logs only work for positive numbers. Check your input.
Problem: Answer seems too big or too small
Double-check your base. log₁₀(100) = 2, but log₂(100) ≈ 6.64. If you used the wrong base, the answer will be off.
Problem: You're getting a decimal when you expected a whole number
That's normal. Most logs aren't nice round numbers. log₁₀(50) ≈ 1.699. That's fine.
Problem: The answer is negative
That happens when your number is between 0 and 1. For example, log₁₀(0.5) ≈ -0.301. That's correct. It just means the exponent is negative.
Logs can feel weird at first. Here's what helped me.
Practice with powers of 10 first. log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(1000) = 3. Once you see the pattern, it clicks.
Use our calculator to check your work. Do a problem by hand, then verify with the calculator. You'll build confidence fast.
Remember: logs are just exponents. Every time you see "log," think "what exponent?" That mental shift makes everything easier.
Don't memorize the rules – understand them. The product rule makes sense if you think about exponents: 2³ × 2⁴ = 2⁷. So log(8 × 16) = log(8) + log(16) = 3 + 4 = 7. See the connection?
Most online calculators only do base 10 or natural log. Ours handles any base you throw at it. Need log₅(125)? Done. log₇(49)? Easy. log₁₀₀(10000)? We've got you.
Plus, it's completely free. No sign-ups. No ads popping up every two seconds. Just type and go.
And if you're on your phone? It works perfectly. The buttons are big enough to tap without zooming in. We designed it for real people, not just desktop users.
A logarithm asks: "What exponent do I need to raise this base to, to get that number?" For example, log₂(8) asks "2 to what power equals 8?" The answer is 3 because 2³ = 8. That's all a log is – a question about exponents.
For simple cases, think about powers. log₁₀(1000) = 3 because 10³ = 1000. For harder numbers, you can use the change of base formula: logₐ(b) = log(b) / log(a). But honestly, using our log calculator is way faster and less error-prone.
Logs are only defined for positive numbers. There's no exponent you can raise a positive base to and get a negative result. So if you try log(-5), your calculator will show an error. That's normal – the answer doesn't exist in real numbers.
log usually means base 10 (common log). ln means base e (natural log). e is about 2.718. They work the same way – just different bases. Use log for things like the Richter scale, and ln for things like population growth or compound interest.
First, isolate the log term. Then rewrite the equation in exponential form. For example, log₂(x) = 3 becomes 2³ = x, so x = 8. If there are multiple logs, use the log rules to combine them first. Our calculator can handle the final step for you.
The change of base formula is logₐ(b) = log(b) / log(a). You use it when your calculator only does base 10 or natural log, but you need a different base. For example, log₃(20) = log(20) / log(3). Our calculator does this automatically for any base.
Absolutely. Our log calculator works on any device – phone, tablet, or computer. The buttons are designed to be easy to tap on a touchscreen. No zooming or squinting required.