Log Calculator
- Change of base: log_10(1,000) = ln(1,000) ÷ ln(10) = 6.9078 ÷ 2.3026 = 3.
- Check: 10^3 ≈ 1,000. The answer is the power you must raise the base to.
- For reference: log10 = 3, natural log = 6.9078, log2 = 9.9658.
A log calculator answers a simple but powerful question: b to what power equals x? That result is written as log base b of x. For example, log10(1000) = 3 because 10^3 = 1000, and log2(1024) = 10 because 2^10 = 1024. The three everyday bases are 10 for science scales (pH, decibels, Richter), 2 for computing (bits, doublings), and e for growth and decay. The natural log uses base e ≈ 2.71828, and ln(20) = 2.9957. Note that logarithms are only defined for positive x, and the base must be positive and not equal to 1.
When a calculator lacks a button for a specific base, it uses the change of base formula: log_b(x) = ln(x) / ln(b). This is the accepted standard method because it lets any base be computed from the natural log, which every scientific calculator already handles. The same logic underlies the classic log rules: log(a x b) = log a + log b; log(a / b) = log a − log b; log(a^n) = n log a. Logs turn multiplication into addition, which was their original purpose for hand calculation. This page shows the formula, step-by-step workings, worked examples, and sources.
Worked examples
log base 10 of 1000
Exactly 3 — because 10³ = 1000. (1000 · 10 (common log) · 5)
| log base 10 of 1,000 | 3 |
| log10 (common log) | 3 |
| ln (natural log) | 6.9078 |
| log2 | 9.9658 |
log base 2 of 1024
Exactly 10 — the reason 1024 shows up everywhere in computing. (1024 · 2 (binary log) · 5)
| log base 2 of 1,024 | 10 |
| log10 (common log) | 3.0103 |
| ln (natural log) | 6.9315 |
| log2 | 10 |
Natural log of 20
ln(20) ≈ 2.9957 — the log behind continuous growth and decay. (20 · e (natural log) · 5)
| log base e of 20 | 2.9957 |
| log10 (common log) | 1.301 |
| ln (natural log) | 2.9957 |
| log2 | 4.3219 |
A logarithm is a question about powers
A logarithm is a question about powers. When you see an equation like 10^3 = 1000, the logarithm reads that sentence backwards and asks the question: 10 to what power equals 1000? The answer is 3, so log10(1000) = 3. The same logic applies to any base. For example, 2^10 = 1024 means log2(1024) = 10. Every log problem is that sentence read backwards.
The base matters because it determines what kind of question you are asking. The three everyday bases each serve a distinct purpose. Base 10 appears in science scales such as pH, decibels, and the Richter scale. Base 2 shows up in computing, where it counts bits and doublings. Base e, approximately 2.71828, drives calculations involving growth and decay. The natural log, written as ln, uses this base. For instance, ln(20) = 2.9957. A log calculator lets you switch between these bases without memorizing separate procedures.
Logarithms follow a set of rules that make them powerful tools for simplifying calculations. The key rules are: log(a × b) = log a + log b, log(a / b) = log a − log b, and log(a^n) = n × log a. These rules mean logs turn multiplication into addition, which was their original purpose for hand calculation. Before computers, multiplying large numbers by hand was slow and error-prone, but adding their logarithms was far simpler.
When a calculator does not have a button for a specific base, it uses the change of base formula: log_b(x) = ln(x) / ln(b). This is how every calculator evaluates bases it does not have a button for. For example, if you need log2(1024) and your device only has a natural log button, you compute ln(1024) / ln(2) to get 10.
One important restriction: logarithms are only defined for positive values of x, and the base must be positive and not equal to 1. A base of 1 cannot produce distinct outputs because 1 raised to any power is always 1. Similarly, there is no real number power that makes a positive base equal to zero or a negative number.
- log10(1000) = 3 because 10^3 = 1000
- log2(1024) = 10 because 2^10 = 1024
- ln(20) = 2.9957 because the natural log uses base e ≈ 2.71828
- log(a × b) = log a + log b
- log(a / b) = log a − log b
- log(a^n) = n × log a
- log_b(x) = ln(x) / ln(b)
The three bases that run the world
A log calculator lets you work in any base, but three bases dominate the real world. Each one shows up wherever a particular kind of measurement or growth makes the most sense, so knowing which base to use is half the battle.
Common logarithms use base 10 and power the scales you see in science class and the news. The log base 10 of x answers the question: 10 to what power equals x? A quick check confirms the pattern — log10(1000) = 3 because 10^3 = 1000. Base 10 logs put pH, decibels, and the Richter scale on a human-friendly scale, where each whole-number step represents a tenfold change in the underlying quantity.
Binary logarithms use base 2 and rule computing. Here the question becomes: 2 to what power equals x? The math lines up neatly with digital systems — log2(1024) = 10 because 2^10 = 1024. Base 2 logs measure bits, address spaces, and the number of doublings needed to reach a given size, which is why they appear whenever computers sort, search, or scale.
Natural logarithms use base e, where e is approximately 2.71828, and they describe continuous growth and decay. The natural log of x, written ln(x), answers: e to what power equals x? As a worked example, ln(20) = 2.9957. Natural logs are the backbone of calculus, compound growth, and any process that changes at a rate tied to its current size.
No matter which base you need, the change-of-base formula — log_b(x) = ln(x) / ln(b) — lets a log calculator evaluate any base by routing it through the natural log. Keep two limits in mind: logarithms are only defined for positive x, and the base must be positive and not equal to 1. Beyond that, three rules keep the algebra tidy: log(a x b) = log a + log b, log(a / b) = log a − log b, and log(a^n) = n log a. Logs turn multiplication into addition, which was their original purpose for hand calculation long before electronics.
Change of base: the one formula behind this calculator
The log base b of x answers a simple question: b to what power equals x? That definition is easy to check when the numbers are clean. For example, log10(1000) = 3 because 10^3 = 1000, and log2(1024) = 10 because 2^10 = 1024. But most calculators only have buttons for base 10 and base e, so what happens when you need a different base? That is where the change of base formula comes in.
The change of base formula is log_b(x) = ln(x) / ln(b). It lets a log calculator evaluate any base by using natural logs, which use base e ≈ 2.71828. The natural log, written ln, is built into nearly every calculator. So instead of needing a separate button for every base, the calculator converts the problem into two natural log calculations and divides the results. This single formula is how every calculator evaluates bases it does not have a button for.
To see the formula work, take log2(1024). We know the answer should be 10 because 2^10 = 1024. Using the change of base formula, log2(1024) = ln(1024) / ln(2). When you compute those natural logs and divide, you get 10. The formula reproduces the exact answer, which means any base becomes computable with just natural logs. The same method works for base 3, base 7, or any other valid base you choose.
There are a few restrictions to keep in mind. Logarithms are only defined for positive x, and the base must be positive and not equal to 1. A base of 1 does not work because 1 raised to any power is always 1, so it can never produce any other number. A negative base creates inconsistent results, so it is excluded as well. As long as x is positive and the base is positive and not 1, the change of base formula will handle the rest.
How to use this log calculator
Using this log calculator is straightforward. Enter a positive value for x and a positive base b that is not equal to 1. The tool then computes log base b of x, which answers the question: b to what power equals x? For example, log10(1000) = 3 because 10^3 = 1000, and log2(1024) = 10 because 2^10 = 1024. Those two examples show how the answer is the exponent needed to raise the base to your input value.
The result panel shows more than just your custom base. Alongside the answer for your chosen base, it displays log2, ln, and log10 together so you can compare all three everyday bases at a glance. Those three bases cover most real uses: base 10 for science scales such as pH, decibels, and Richter magnitudes; base 2 for computing tasks involving bits and doublings; and base e for growth and decay. The natural log uses base e, which is approximately 2.71828, and a verified example is ln(20) = 2.9957.
Every result also includes a power-check line. This line shows the base raised to the computed exponent so you can confirm it equals your original input. The power-check line makes the result easy to verify without any extra steps on your part.
Behind the scenes, the tool applies the change of base formula: log_b(x) = ln(x) / ln(b). This is how every calculator evaluates bases it does not have a dedicated button for. The result is exact for the value and base you enter, and the same formula works whether you enter base 10, base 2, base e, or any other valid base. Remember that logarithms are only defined for positive x, and the base must be positive and not equal to 1. If you enter a non-positive value or a base of 1, the calculator cannot produce a result because no exponent can satisfy the equation in those cases.
- Log rules that may help you check your inputs: log(a × b) = log a + log b; log(a / b) = log a − log b; log(a^n) = n log a. Logs turn multiplication into addition, which was their original purpose for hand calculation.
The log rules, each with a check
A log calculator is only as useful as your grasp of the rules that let you reshape logarithmic expressions. The three rules below are the ones you will reach for again and again. Each one is verified with a concrete number so you can see the arithmetic line up.
Remember that log base b of x answers the question 'b to what power equals x?' So log10(1000) = 3 because 10^3 = 1000, and log2(1024) = 10 because 2^10 = 1024. Keep that definition in mind and every rule below becomes easy to check.
One constraint to keep in mind: logarithms are only defined for positive x, and the base must be positive and not equal to 1. A negative or zero input has no real logarithm, and a base of 1 produces no meaningful exponent since 1 raised to any power is always 1.
| Rule | Formula | Numeric verification |
|---|---|---|
| Product | log(a × b) = log a + log b | log10(1000) = log10(100) + log10(10) = 2 + 1 = 3 |
| Quotient | log(a / b) = log a − log b | log10(10) = log10(100) − log10(10) = 2 − 1 = 1 |
| Power | log(a^n) = n × log a | log10(1000) = log10(10^3) = 3 × log10(10) = 3 × 1 = 3 |
Where logs hide in real life
Logarithms show up far more often than most people realize. A log base b of x answers one question: b to what power equals x? That is why log10(1000) = 3, because 10^3 = 1000. The same backward question explains three common bases: 10 for science scales, 2 for computing, and e for growth and decay.
Consider chemistry. The pH scale runs on base 10, so every step of 1 means 10 times more acidity. A solution at pH 4 is ten times more acidic than one at pH 5, and a shift of two full steps means 100 times the acidity. Decibels work the same way for sound: adding 10 decibels equals 10 times the sound intensity. The Richter scale for earthquakes follows the same pattern. Each of these scales compresses a huge range into manageable numbers by asking how many times you multiplied by the base.
Base 2 logs handle anything that doubles. In computing, log2(1024) = 10 because 2^10 = 1024, which is why 10 bits can represent 1024 distinct values. The same logic applies to doubling times in computing power or in an epidemic. If cases double every few days, log2 tells you how many doubling periods fit into a given total. It is still the same backward question, just with 2 as the base instead of 10.
Natural logs use base e, which is approximately 2.71828, and they describe continuous compound growth and decay. For example, ln(20) = 2.9957. When a quantity grows at a rate proportional to its current size, the natural log tells you how long it takes to reach a certain level. Whether the base is 10, 2, or e, every logarithm is the same kind of backwards-power question in disguise.
If you need a base your log calculator lacks, use the change of base rule: log_b(x) = ln(x) / ln(b). This is how every calculator evaluates bases it does not have a button for. Just remember that logarithms are only defined for positive x, and the base must be positive and not equal to 1.
- pH: each step of 1 means 10 times more acidity
- Decibels: adding 10 equals 10 times the sound intensity
- Computing and epidemics: log2 measures how many doublings fit into a total
- Compound growth: ln uses base e to model continuous growth and decay
FAQs
What is log base 10 of 1000?
Exactly 3, because 10^3 = 1000. Powers of ten give whole-number logs: log10(100) = 2, log10(10) = 1, log10(1) = 0. This pattern makes base 10 logs intuitive for scientific notation and order-of-magnitude estimates.
What is the natural log of 20?
ln(20) = 2.9957 (base e ≈ 2.71828). Check: e^2.9957 ≈ 20. The natural log function answers the question, what power of e gives us 20? It is roughly 3, because e^3 ≈ 20.0855.
How do I calculate a log with an unusual base?
Use the change of base formula: log_b(x) = ln(x) / ln(b). That is exactly what this calculator does internally for any base you enter. For example, log base 5 of 50 equals ln(50) divided by ln(5), giving a result in one step.
Why can't I take the log of 0 or a negative number?
No power of a positive base ever reaches 0 or goes negative, so the backwards question has no answer. The calculator flags those inputs instead of guessing. A positive base raised to any real exponent always yields a positive result, never zero or below.
What is log base 2 used for?
Anything that doubles: bits in computing (log2(1024) = 10 bits of address space), binary search steps, and doubling-time problems. Log base 2 tells you how many times you must halve a quantity to reach 1, making it essential for algorithms and information theory.
What is the difference between log and ln?
ln is just log with base e. 'log' without a base usually means base 10 in science and engineering, base e in mathematics, and base 2 in computing — this calculator shows all three so there is no ambiguity. Always check context when you see 'log' written without a base.