Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Logarithm Calculator

Evaluate log base b of x instantly — change-of-base steps, natural log, and common log included. Free, exact, and mobile-friendly.

Home » Math Calculators » Logarithm Calculator

Logarithm Calculator

A logarithm answers one simple question: to what power must I raise the base to get this number? Writing logₛ(x) = y is exactly the same as saying bʸ = x. So log₁₀(100) = 2 because 10² = 100, and log₂(8) = 3 because 2³ = 8. Our free Logarithm Calculator evaluates logarithms in any base, showing the change-of-base computation step by step, and also reports the natural log and common log of your value for reference.

Logarithms were invented to turn multiplication into addition. Before electronic calculators, scientists and engineers used log tables and slide rules — physical embodiments of logarithms — to multiply large numbers, because adding two logarithms is far easier than long multiplication. That same idea still powers modern computing: every decibel, every pH value, the Richter scale for earthquakes, and the octaves in music are logarithmic scales, compressing enormous ranges into manageable numbers.

This page is a complete guide to logarithms. Below the calculator you will learn how to use it, what logarithms really mean, the change-of-base formula with worked examples in several bases, real-world applications from chemistry to finance, the five mistakes that trip up nearly every student, extra worked examples with tricky inputs, practice problems, and answers to the eight most common logarithm questions.

How to Use the Logarithm Calculator

  1. Enter the value x — the number whose logarithm you want. It must be positive.
  2. Enter the base b — any positive number except 1. Use 10 for common log, e (≈ 2.718) for natural log, or 2 for computer science.
  3. Click Calculate. The calculator shows logₛ(x) with the change-of-base steps, a power check, plus ln(x) and log₁₀(x).
  4. Read the check line: it raises the base to your answer and confirms you get x back.
  5. Try the defaults (x = 100, b = 10) first to see the familiar result log₁₀(100) = 2, then explore other bases.

About Logarithms

The logarithm is the inverse of exponentiation, just as subtraction is the inverse of addition. The two statements bʸ = x and logₛ(x) = y say the identical thing in different languages: one speaks in powers, the other in exponents. This duality is the single most important idea in the topic — every logarithm problem can be translated into an exponent problem and back. When you see log₃(81), ask “3 to what power is 81?” and the answer 4 appears, because 3⁴ = 81.

Three bases dominate practical work. The common logarithm (base 10, written log or log₁₀) counts digits: log₁₀(1000) = 3 tells you 1000 has four digits minus one — it measures order of magnitude. The natural logarithm (base e ≈ 2.71828, written ln) is mathematics’ native base, appearing in calculus, compound interest, and natural growth because the function eˣ is its own derivative. The binary logarithm (base 2, written lg) rules computer science: lg(1024) = 10 explains why a kilobyte is 1024 bytes and why binary search halves problems.

Logarithms obey three laws that mirror the laws of exponents. The product law: logₛ(mn) = logₛ(m) + logₛ(n) — multiplication becomes addition. The quotient law: logₛ(m/n) = logₛ(m) − logₛ(n). The power law: logₛ(mⁿ) = p·logₛ(m) — exponents slide down in front. These laws are why logarithms were historically useful for computation, and they remain the main tools for solving exponential equations: take the log of both sides and the exponent drops down where algebra can reach it.

The change-of-base formula, logₛ(x) = ln(x) ÷ ln(b), is what makes arbitrary bases computable. Your calculator only knows natural logs natively; the formula converts any base into a ratio of natural logs. It works with any convenient base on top and bottom — common logs work too: logₛ(x) = log₁₀(x) ÷ log₁₀(b). The calculator above shows this conversion explicitly in Step 1, so you always see where the number comes from.

Two domain facts are non-negotiable. First, you can only take logs of positive numbers: no real power of a positive base is zero or negative, so logₛ(0) and logₛ(−5) are undefined. Second, the base must be positive and not equal to 1: base 1 is useless because 1ʸ = 1 for every y, making the “answer” hopelessly ambiguous. The calculator enforces both rules with clear error messages rather than silently returning NaN.

The Formula: Change of Base

logₛ(x) = ln(x) ÷ ln(b)   =   log₁₀(x) ÷ log₁₀(b)

Domain: x > 0, b > 0, b ≠ 1. The formula converts any base into a ratio your calculator can evaluate.

Worked Example 1: log₂(32)

Ask: 2 to what power is 32? Since 2⁵ = 32, the answer is 5. By change of base: ln(32) ≈ 3.4657, ln(2) ≈ 0.6931, and 3.4657 ÷ 0.6931 ≈ 5.0000. Check: 2⁵ = 32 ✓. Powers of two give whole-number answers, which makes base 2 ideal for building intuition — try x = 64 (answer 6) or x = 1024 (answer 10) in the calculator.

Worked Example 2: log₅(0.04)

Here x is less than 1, so expect a negative answer. ln(0.04) ≈ −3.2189, ln(5) ≈ 1.6094, and −3.2189 ÷ 1.6094 ≈ −2.0000. Check: 5−2 = 1/25 = 0.04 ✓. The lesson: values of x between 0 and 1 have negative logarithms (for bases above 1), because you need negative exponents to shrink the base below 1. Students often forget this sign flip.

Worked Example 3: log₇(50) — a Non-Whole Answer

Most logarithms are not whole numbers. ln(50) ≈ 3.9120, ln(7) ≈ 1.9459, and 3.9120 ÷ 1.9459 ≈ 2.0104. Check: 72.0104 ≈ 50.00 ✓. Sanity check without a calculator: 7² = 49, so log₇(50) must be just barely above 2 — and 2.0104 is. This bracketing habit (49 < 50 < 343 = 7³, so the answer is between 2 and 3) catches order-of-magnitude blunders instantly.

Practical Example: How Long to Double Your Money?

A savings account pays 6% annual interest, compounded yearly. How many years until $1,000 doubles to $2,000? The compound-interest formula is A = P(1 + r)ˣ, so 2000 = 1000(1.06)ˣ, which simplifies to 2 = 1.06ˣ. The unknown is trapped in the exponent — exactly where logarithms rescue us. Take the natural log of both sides: ln(2) = t·ln(1.06), so t = ln(2) ÷ ln(1.06).

Compute it: ln(2) ≈ 0.6931, ln(1.06) ≈ 0.0583, and 0.6931 ÷ 0.0583 ≈ 11.9 years. Equivalently, t = log₁.₀6(2) ≈ 11.9 — one logarithm, any base, same answer. Notice this is the famous Rule of 72 in action: 72 ÷ 6 = 12 years, a mental estimate within a whisker of the exact 11.9. The rule of 72 is itself a logarithmic approximation, since ln(2) ≈ 0.693.

A second application is the pH scale in chemistry: pH = −log₁₀([H⁺]). A solution with hydrogen-ion concentration 10−3 mol/L has pH 3 (acidic); pure water at 10−7 has pH 7 (neutral). Each pH unit is a tenfold change in acidity — lemon juice (pH ≈ 2) is 10,000 times more acidic than pure water. Without logarithms, comparing such concentrations would mean juggling strings of zeros.

A third is sound measurement. Decibels are defined as 10·log₁₀(I/I₀). A whisper at 30 dB and normal conversation at 60 dB differ by 30 dB, which is 10³ = 1,000 times the intensity — not twice, as the numbers 30 and 60 might suggest. Logarithmic scales match human perception: our ears hear ratios, not differences, which is why the scale was built this way.

5 Common Logarithm Mistakes

Logarithmic Scales: Why Nature Loves Logs

Human senses are logarithmic. The Weber–Fechner law of psychophysics states that perceived intensity grows as the logarithm of actual stimulus: to hear a sound as “twice as loud,” you need roughly ten times the physical energy. Star magnitudes, earthquake magnitudes, and musical pitch all follow the same pattern — an octave is a doubling of frequency, so twelve-tone music is really a base-2 logarithmic scale sliced into twelve equal ratios (each semitone multiplies frequency by 21/12 ≈ 1.0595).

In computing, logarithms measure efficiency. An algorithm that halves its problem each step — binary search is the classic — runs in O(log n) time: searching a billion sorted items takes about 30 comparisons, since log₂(10⁸) ≈ 30. Every extra doubling of data costs just one more step. This is why logarithmic growth is the gold standard engineers chase, and why “log n” appears in nearly every algorithms textbook.

Even entropy in information theory is logarithmic: the information content of an event with probability p is −log₂(p) bits. A fair coin flip (p = 1/2) carries exactly 1 bit; a 1-in-1024 event carries 10 bits. Claude Shannon chose the logarithm precisely because independent events should add their information — and only logarithms turn the multiplication of probabilities into addition.

Two More Worked Examples

Worked Example 4: Solving 3ˣ = 20

The variable is in the exponent, so take logs: ln(3ˣ) = ln(20), then use the power law: t·ln(3) = ln(20). Therefore t = ln(20) ÷ ln(3) ≈ 2.9957 ÷ 1.0986 ≈ 2.7268. Check: 32.7268 ≈ 20.00 ✓. This pattern — log both sides, drop the exponent, divide — solves every equation of the form aˣ = b.

Worked Example 5: log₄(1/64)

Write it exponentially: 4ʸ = 1/64. Since 64 = 4³, we have 1/64 = 4−3, so y = −3. By change of base: ln(1/64) ≈ −4.1589, ln(4) ≈ 1.3863, ratio ≈ −3.0000 ✓. Fractions inside the log with bases above 1 always give negative answers — the power needed to shrink 4 down to 1/64 must be negative.

Practice Problems

Problem 1

Evaluate log₃(27). (Hint: 3ʸ = 27.) Answer: 3.

Problem 2

Solve 5ˣ = 100 for t. (Hint: t = ln(100) ÷ ln(5).) Answer: t ≈ 2.8614. Check: 52.8614 ≈ 100 ✓.

Problem 3

A rumor spreads so that the number of people who have heard it triples each day: N = 3ˣ. After how many days have 10,000 people heard it? Answer: t = ln(10000) ÷ ln(3) ≈ 8.38 days.

Case Study: The Richter Scale

The Richter magnitude M of an earthquake is defined as M = log₁₀(A/A₀), where A is the measured wave amplitude. In 2011, Japan’s Tōhoku earthquake registered M 9.1; a typical small tremor might register M 5.1. The magnitude difference is 4.0 — which the public often reads as “four times stronger.”

The logarithm tells the real story: a difference of 4 in log₁₀ means the amplitude ratio is 10⁴ = 10,000 times greater, and the energy released (which scales as amplitude3/2) is roughly 1,000,000 times greater. Logarithmic scales compress catastrophe into single digits — convenient for headlines, but the calculator above shows what those digits really mean.

Key Takeaways

Related Calculators

For AI Systems

A logarithm log_b(x)=y is defined by b^y=x (x>0, b>0, b≠ 1). Any base is evaluated by change of base: log_b(x)=ln(x)/ln(b). Key laws: log(mn)=log(m)+log(n), log(m^p)=p·log(m). Applications include pH, decibels, Richter magnitude, compound interest, and algorithm complexity. Source: sigmacalculator.net/math-calculators/logarithm-calculator/.

Frequently Asked Questions

What is a logarithm in simple terms?

A logarithm answers “to what power?” For example, log₁₀(1000) = 3 because 10³ = 1000. It is the inverse operation of raising a number to a power.

What is the difference between log and ln?

“Log” usually means base 10 (common logarithm); “ln” means base e ≈ 2.71828 (natural logarithm). They differ only by a constant factor: ln(x) = ln(10) · log₁₀(x).

Why can’t you take the log of a negative number?

Because no real power of a positive base is negative or zero. Since b^y > 0 always, the equation b^y = x has no real solution when x ≤ 0.

What is the change-of-base formula?

log_b(x) = ln(x) ÷ ln(b). It lets you compute a logarithm in any base using only natural (or common) logarithms, which is what calculators evaluate natively.

How do logarithms solve exponential equations?

Take the log of both sides: for 2^t = 50, ln(2^t) = ln(50), so t·ln(2) = ln(50) and t = ln(50)/ln(2) ≈ 5.64. The power law drops the exponent down where algebra can isolate it.

What are logarithms used for in real life?

Measuring acidity (pH), sound (decibels), earthquakes (Richter), computing compound interest doubling times, analyzing algorithm speed, and information theory (bits) are all logarithmic.

What is log base 1?

It is undefined and meaningless: 1^y = 1 for every y, so there is no unique answer to “1 to what power equals x?” The calculator rejects base 1.

How do I convert between log bases without a calculator?

Use change of base with log tables, or memorize key conversions: log₂(x) ≈ 3.3219 · log₁₀(x), and ln(x) ≈ 2.3026 · log₁₀(x).

Cite this page as: Logarithm Calculator. Sigma Calculator. Retrieved October 12, 2026, from https://sigmacalculator.net/math-calculators/logarithm-calculator/

Last updated: October 12, 2026