Logarithm Calculator

Find the logarithm of a number in any base.

Enter a number and a base, then press Calculate.

Logarithm Calculator

Last summer I was at a cousin's wedding when the DJ pushed the speakers to the edge, and the sound meter on my phone read 100 dB. Then I typed 100 into the Logarithm Calculator on CalcSolver and it said 2, because 10² = 100. I typed 10,000 next, and it said 4, and that 4 was the answer to my real question: the music was carrying 10,000 times the sound intensity of an ordinary conversation, because every 10 dB multiplies the intensity by 10, and 40 dB is four tens. I have used the Logarithm Calculator since for the pH of a swimming pool, for how long money takes to double, and for how many steps a binary search needs, and this guide is everything I wish someone had told me that night.

At a glance:

  • A logarithm answers one question: to what power must the base be raised to get this number?
  • The Logarithm Calculator takes one number and one base, 10, e or 2, and gives the answer to 6 decimal places, with a check line that proves it.
  • The tool's only error is for 0 or a negative number, and it reads "Error: number must be greater than 0."
  • It has no custom base, no antilog button and no equation solving, so those are worked by hand in this guide.
  • The tool opens on 100, base 10, and answers 2, because 10² = 100.

What Is a Logarithm Calculator?

A Logarithm Calculator is a tool that answers the power question in one click, and I reach for it whenever a number has grown too big or too small to count by hand. When I type 100 with base 10, the answer is 2, because 10² = 100.

What Is a Logarithm in Mathematics?

A logarithm is an exponent written as a function, and once that clicks, the notation stops looking strange. log₁₀(100) = 2 says the same thing as 10² = 100. John Napier published the first logarithms in 1614, and he built them to turn multiplication into addition, which was the only shortcut available before electronic calculators existed.

Understanding the Logarithm Function

The logarithm function is the inverse of the exponential function, which means the two undo each other in the same way addition undoes subtraction. If 10² = 100, then log₁₀(100) = 2, and the function always takes a positive number and returns the exponent. An Exponent Calculator answers the power question, and a logarithm answers the question backwards.

How a Logarithm Calculator Works?

On CalcSolver, the tool works by the change of base formula, which is division behind the scenes: it divides the natural log of your number by the natural log of your base, and rounds the answer to 6 decimal places.

How to Use the Online Logarithm Calculator?

Using the Logarithm Calculator on CalcSolver takes two moves, and I do them the same way every time. First I type the number into the number box, and then I pick the base from the dropdown, and the answer appears with a steps panel that proves it.

Enter the Number and Logarithm Base

The number box takes any positive number, whole or decimal, and the dropdown gives you three bases to choose from: base 10 for a common log, base e for a natural log, and base 2 for a binary log. An Online Log Calculator like this one keeps the choice visible, so you always know which base the answer belongs to.

Calculate Logarithms and View Step-by-Step Solutions

The steps panel is the part I trust most, because it shows the answer as a check you can read. The first line asks the question in plain words: "Log asks: to what power must the base be raised to get 100?" The second line gives the check: "10^2 = 100". When I work a logarithm out on paper, I do the same check by hand, and the panel saves me the arithmetic, which is the whole point of a calculator.

Understanding the Calculator Results

The result line is bold, and it reads like the definition: log₁₀(100) = 2, or ln(100) = 4.60517, or log₂(100) = 6.643856, and the number after the equals sign is rounded to 6 decimal places. I check every result against the check line, and if 2^2.807355 gives 7 back, I know the answer is right.

Logarithm Formula and How It Works?

The formula for a logarithm is one line long, and the Logarithm is defined by it: log_b(x) = y means the same thing as b^y = x, where b is the base, x is the argument, and y is the answer. The Logarithm Calculator on CalcSolver is built on that one line.

Basic Logarithm Formula

The basic logarithm formula is log_b(x) = y, and it is equivalent to b^y = x, which is the test I apply to every answer. log₁₀(1000) = 3 because 10³ = 1000. The Logarithm Calculator works for every base, and it works for fractions too: log₁₀(0.01) = −2 because 10⁻² = 0.01, and log₂(0.5) = −1 because 2⁻¹ = 0.5.

Understanding the Base, Argument, and Exponent

The base is the number being raised to a power, the argument is the number you take the logarithm of, and the exponent is the answer the logarithm gives you. The base must be a positive number other than 1, because 1 raised to any power is still 1, and the argument must be greater than 0, because no power of a positive base can ever be 0 or negative.

Relationship Between Logarithms and Exponents

Logarithms and exponents are inverse operations, which means each one undoes the other, in the same way subtraction undoes addition. The exponential form 10² = 100 becomes the logarithmic form log₁₀(100) = 2, and the exponential form 2⁵ = 32 becomes the logarithmic form log₂(32) = 5, and the two forms are the same fact written twice. The two sit side by side in my head whenever I work with growth.

Types of Logarithms

The Logarithm Calculator on CalcSolver offers base 10, base e and base 2 in its dropdown.

Common Logarithm (Base 10)

The common logarithm is log base 10, written log₁₀(x) or just log(x) on most calculators, and it is the one a Common Log Calculator answers. The Logarithm Calculator counts powers of 10, so log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(1000) = 3, and log₁₀(0.01) = −2. log₁₀(2) = 0.30103 and log₁₀(5) = 0.69897 are the two values I keep in my head, because they add to 1, since 2 × 5 = 10.

Natural Logarithm (Base e)

The natural logarithm is log base e, written ln(x), and e is the number 2.718281828, named after Leonhard Euler, who showed how it appears wherever things grow or decay continuously. A Natural Log Calculator answers ln(x), and the values I use most are ln(e) = 1, ln(1) = 0, ln(10) = 2.302585 and ln(2) = 0.693147.

Binary Logarithm (Base 2)

The binary logarithm is log base 2, written log₂(x), and it counts doublings, which is why it belongs to computer science. log₂(8) = 3, log₂(16) = 4 and log₂(32) = 5, and each step of 1 in the answer doubles the number.

Logarithms with Other Bases

Logarithms with other bases are not in the tool's dropdown, so I work them out by the change of base formula, which the Rules section proves below. log₃(81) = 4, because 3⁴ = 81, and log₅(125) = 3, because 5³ = 125, and log₇(49) = 2, because 7² = 49. A Number Base Converter changes how a number is written, and a change of base changes how a logarithm is calculated, and the two ideas rhyme, because both are about the same number in a different base.

Logarithm Rules and Properties

The rules of logarithms are what turn a hard logarithm into easy arithmetic, and I use them every time a number is too big to type in directly. Logarithms sit in US Common Core Algebra II (F-LE), in UK GCSE, in India NCERT, in Khan Academy's Algebra II course, and in SAT and ACT preparation, and every one of them introduces a logarithm as an exponent first.

Product Rule of Logarithms

The product rule says the logarithm of a product is the sum of the logarithms: log_b(xy) = log_b(x) + log_b(y). log₁₀(100 × 1000) = log₁₀(100) + log₁₀(1000) = 2 + 3 = 5. The Logarithm Calculator applies the rule the same way, and the addition is always easier than the multiplication it replaces.

Quotient Rule of Logarithms

The quotient rule says the logarithm of a quotient is the difference of the logarithms: log_b(x/y) = log_b(x) − log_b(y). log₁₀(1000 ÷ 10) = log₁₀(1000) − log₁₀(10) = 3 − 1 = 2. The rule is how a pH difference becomes a ratio: a solution at pH 5 has 100 times the hydrogen ions of one at pH 7, because 10⁻⁵ ÷ 10⁻⁷ = 100, and the subtraction of the logarithms, −5 − (−7) = 2, is the same as log₁₀(100) = 2.

Power Rule of Logarithms

The power rule says the logarithm of a power is the exponent times the logarithm: log_b(x^n) = n × log_b(x). log₁₀(100²) = 2 × log₁₀(100) = 2 × 2 = 4, and log₁₀(5³) = 3 × log₁₀(5) = 3 × 0.69897 = 2.09691. I check the power rule on the Logarithm Calculator when the exponent is not a whole number, because log₁₀(5^0.5) = 0.5 × 0.69897 = 0.349485, and the square root of 5 is 2.23607, and log₁₀(2.23607) = 0.349485, which matches.

Change of Base Formula

The change of base formula says a logarithm in any base equals the natural log of the number divided by the natural log of the base: log_b(x) = ln(x) ÷ ln(b), and the same works with log base 10. log₃(81) = ln(81) ÷ ln(3) = 4.394449 ÷ 1.098612 = 4, because 3⁴ = 81.

Other Important Logarithm Properties

Three more properties finish the set, and I keep all three on the same mental shelf as the rules. The logarithm of 1 is 0 in every base, because any base raised to 0 is 1. The logarithm of the base is 1 in every base, because any base raised to 1 is itself.

How to Convert Between Logarithms and Antilogarithms?

An antilogarithm is the logarithm run backwards, and the Logarithm Calculator answers the forward direction, so the antilog is the part I work by hand.

What Is an Antilogarithm?

An antilogarithm is the number whose logarithm is a given value, and it is the inverse of the logarithm in the same way squaring is the inverse of taking a square root. The antilog of 2 in base 10 is 100, because log₁₀(100) = 2, and the antilog of 5 in base 2 is 32, because log₂(32) = 5.

How to Calculate an Antilog?

To calculate an antilog, raise the base to the logarithm: antilog₁₀(0.30103) = 10^0.30103 = 2, and antilog₁₀(1.30103) = 10^1.30103 = 20. The Logarithm Calculator on CalcSolver has no antilog button, so I raise the base to the power by hand, or I verify it the other way round: I type the answer into the Logarithm Calculator and confirm the logarithm comes back.

Converting Logarithms to Exponential Form

Converting a logarithm to exponential form is rewriting the sentence with the base raised to the answer, and the two forms say the same thing. log₁₀(100) = 2 becomes 10² = 100, and log₂(32) = 5 becomes 2⁵ = 32.

Logarithmic Curves and Graphs

The logarithmic curve is one of the most recognisable shapes in mathematics, and the Logarithm Calculator returns the points that draw it. The curve rises fast and then flattens, which is why a logarithm compresses a huge range into a small one.

Understanding the Logarithmic Curve

The logarithmic curve for base 10 passes through (1, 0), (10, 1) and (100, 2), and the pattern holds for every base: the curve passes through (1, 0) and through (base, 1). The curve is steep between 0 and 1, because the logarithm of a small fraction is a large negative number, and it flattens after 10, because each new power of 10 adds only 1 to the answer.

Domain, Range, and Asymptotes

The domain of a logarithm is all numbers greater than 0, and the range is every real number, and the graph has a vertical asymptote at x = 0, which means the curve falls towards negative infinity as x approaches 0 but never touches the y-axis. The domain is the reason the tool refuses 0 and negative numbers: no power of a positive base gives 0 or a negative number.

How the Logarithm Graph Changes with Different Bases?

The Logarithm Calculator returns the points for every base, and the base changes how fast the curve rises: a larger base makes the curve rise more slowly, because a bigger base reaches a given number in fewer steps. The base 2 curve passes through (2, 1) and (4, 2), and the base 10 curve passes through (10, 1) and (100, 2), so the base 2 curve is steeper at the start, and the two curves cross at (1, 0), where every logarithm is 0.

Logarithm Calculator with a bright blue log curve and glowing orange points on a dark navy grid beside a calculator
Type the number, pick the base, and read the power: the curve shows how fast the answer grows.

Logarithm Examples and Step-by-Step Solutions

The examples below are the ones I work first, because each one uses a different part of the Logarithm Calculator on CalcSolver, and together they cover every question the tool answers.

Basic Logarithm Calculation Examples

The simplest examples have whole-number answers, and they are the ones I confirm with the tool first. log₁₀(100) = 2, because 10² = 100, and log₁₀(1000) = 3, because 10³ = 1000. log₂(32) = 5, because 2⁵ = 32. The Logarithm Calculator answers each one in one click, and the steps panel shows the check line, so I never have to wonder whether the answer is right.

Examples Using Common and Natural Logarithms

The same number has a different logarithm in each base, and seeing the three side by side is the fastest way to understand bases. For 100, the common log is log₁₀(100) = 2 and the natural log is ln(100) = 4.60517, and both are correct, because each one raises a different base to a different power to reach 100. A Common Log Calculator answers the first one, and a Natural Log Calculator answers the second one, and the binary log is the answer a computer scientist wants.

Solving Logarithmic Equations Step by Step

A logarithmic equation is solved by converting it to exponential form, and the tool checks the answer at the end. If log₂(x) = 5, then x = 2⁵ = 32, and I type 32 into the Logarithm Calculator with base 2 and confirm it says 5. The hardest one is log(x) + log(x − 3) = 1, where the product rule joins the logs first: log(x(x − 3)) = 1, so x(x − 3) = 10, which gives x² − 3x − 10 = 0, and (x − 5)(x + 2) = 0. x = 5 is the answer, because log(5) + log(2) = 0.69897 + 0.30103 = 1, and x = −2 is rejected, because x − 3 would be −5, and a logarithm cannot take a negative number. An Equation Solver does the algebra in the middle, and the logarithm step at the end is mine.

Real-World Logarithm Calculation Examples

The real-world examples are where the numbers stop being abstract, and they are the ones I remember longest. A solution with pH 3 has a hydrogen ion concentration of 10⁻³ moles per litre, and a solution with pH 5 has 10⁻⁵, so the pH 3 solution is 100 times more acidic, because 10⁻³ ÷ 10⁻⁵ = 100. A sound at 100 dB carries 100 times the intensity of a sound at 80 dB, because 10^((100 − 80) ÷ 10) = 10² = 100. An Online Log Calculator answers each logarithm in these examples, and the story around the number is what makes it stick.

When to Use Different Logarithm Bases

Each logarithm base has a home, and choosing the right one is half the problem. The Logarithm Calculator offers all three bases, and the sections below tell you which to pick.

When to Use Common Logarithms

Use common logarithms when the scale is built on powers of 10, because the answer then reads like the scale itself. A Common Log Calculator is the right tool for pH, where pH 7 is neutral and pH 3 is 10,000 times more acidic, because 10⁻³ ÷ 10⁻⁷ = 10⁴, and for decibels, where 100 dB is 10,000 times the intensity of 60 dB.

When to Use Natural Logarithms

Use natural logarithms when the change is continuous, because the mathematics of continuous growth is written in e. I use the Logarithm Calculator's ln button for compound interest, where money at 6% doubles in ln(2) ÷ 0.06 = 11.55 years, and for population growth, where a population growing at 2% a year doubles in ln(2) ÷ 0.02 = 34.66 years.

When to Use Binary Logarithms

Use binary logarithms when the problem doubles, halves or splits in two, because log base 2 counts the doublings directly. I use it for binary search, where a million items take log₂(1,000,000) = 19.932 steps, about 20, and a billion items take log₂(1,000,000,000) = 29.897 steps, about 30.

Real-World Applications of Logarithms

Logarithms are everywhere a quantity spans many orders of magnitude, and the Logarithm Calculator on CalcSolver is the tool that makes those quantities readable.

Logarithms in Sound Intensity and Decibels

Sound intensity is measured in decibels, and the decibel scale is logarithmic, because the human ear hears ratios, not differences. A normal conversation is about 60 dB, and a jet engine is about 140 dB, and the gap from 60 to 140 dB is 10⁸, a hundred million times the intensity, even though it is only 80 on the scale. Every 10 dB multiplies the intensity by 10, so a sound at 100 dB is 10 times the intensity of one at 90 dB, and 100 times the intensity of one at 80 dB.

Logarithms in Earthquake Magnitude Scales

Earthquake magnitude is measured on the Richter scale, which is a base 10 logarithm of the amplitude. A magnitude 6 earthquake shakes with 10 times the amplitude of a magnitude 5, and a magnitude 7 shakes with 100 times the amplitude of a magnitude 5, and the energy is about 10^1.5 = 31.62 times per whole number, so a magnitude 7 releases about 1000 times the energy of a magnitude 5.

Logarithms in Computer Science and Binary Search

Computer science runs on base 2, and the binary logarithm, which the Logarithm Calculator answers, is its counting tool. A binary search halves the list at every step, so a sorted list of a million items takes about 20 steps, and a billion takes about 30, and the logarithm is what proves the search is fast. The number of bits needed to store a number is its binary logarithm: 256 values need 8 bits, because log₂(256) = 8.

Logarithms in Science, Finance, and Data Analysis

Science, finance and data analysis all use logarithms to compress wide ranges into readable ones. In finance, the natural log turns compound growth into a straight line, and money at 6% doubles in 11.55 years, because ln(2) ÷ 0.06 = 11.55.

Common Logarithm Mistakes to Avoid

The mistakes below are the ones I have made myself, and each one has a fix that takes seconds.

Taking the Logarithm of a Negative Number

Taking the logarithm of a negative number is the mistake the tool stops first, because no power of a positive base can ever be negative. log₁₀(−5) does not exist, and log₂(0) does not exist either, and the Logarithm Calculator says so plainly: "Error: number must be greater than 0."

Using an Invalid Logarithm Base

An invalid logarithm base is any base that is not a positive number other than 1, and the Logarithm Calculator's dropdown protects you from all of them, because it offers only 10, e and 2. A base of 1 is invalid, because 1 raised to any power is 1, so log₁(2) has no answer at all.

Confusing Log, ln, and Log Base 2

Confusing log, ln and log base 2 is the mistake from my wedding story, and it is the one I hear most often, because the three buttons look alike and the three answers are different. Log means base 10, ln means base e, and log₂ means base 2, and the same number gives a different answer in each: 100 gives log₁₀(100) = 2 and ln(100) = 4.60517. I check the base before I read the answer, because the number after the equals sign belongs to the base, and reading the wrong base is how a pH of 7 becomes a pH of 4.6. When I work a logarithm out for a problem, I say the base out loud first, and the habit has never failed me.

Applying Logarithm Rules Incorrectly

Applying the logarithm rules incorrectly is a quiet mistake, because the wrong version looks almost right. log(x + y) is not log(x) + log(y), and the product rule only works for multiplication: log(x × y) = log(x) + log(y), and log(x ÷ y) = log(x) − log(y). log(x²) = 2 × log(x) by the power rule, and it is not (log(x))², which is a different number entirely: log₁₀(100²) = 4, while (log₁₀(100))² = 2² = 4, and the two agree here by accident, so I test it with log₁₀(10²) = 2 against (log₁₀(10))² = 1, where they disagree.

Frequently Asked Questions

What exactly does a logarithm tell you?

A logarithm tells you the power you must raise a base to in order to get a number, and the Logarithm Calculator answers it in one click. log₂(32) = 5 tells you that 2 raised to the power 5 is 32, and log₁₀(100) = 2 tells you that 10 raised to the power 2 is 100.

What is the difference between log, ln, and log base 2?

The difference between log, ln and log base 2 is the base, and nothing else. Log means base 10, ln means base e, and log₂ means base 2, and the Logarithm Calculator has a button for each one. The number 100 gives three different answers: log₁₀(100) = 2, ln(100) = 4.60517, and log₂(100) = 6.643856.

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

The base of a logarithm cannot be 1 because 1 raised to any power is 1, so there is no power that gives 2, or 10, or any number other than 1. The base must be a positive number other than 1, and the tool's dropdown only offers bases that work.

Why can't I take the logarithm of a negative number?

You cannot take the logarithm of a negative number because no power of a positive base is negative. 10² = 100, 10⁻² = 0.01, and 10 to any power, positive or negative, is always a positive number, so there is no exponent that gives −5.

What is the change of base formula?

The change of base formula is log_b(x) = ln(x) ÷ ln(b), which lets you calculate a logarithm in any base from the natural log button. log₃(81) = ln(81) ÷ ln(3) = 4.394449 ÷ 1.098612 = 4, because 3⁴ = 81

What is an antilog and when should I use it?

An antilog is the number whose logarithm is a given value, and you use it when a problem gives you the logarithm and asks for the number. In base 10, the antilog of 2 is 100, and in base 2, the antilog of 5 is 32. An Online Log Calculator answers the forward direction, and the antilog is the step back, which is raising the base to the logarithm.

How do I calculate logarithms without a calculator?

You calculate logarithms without a calculator by the change of base formula and the values you know by heart. log₁₀(2) = 0.30103 and log₁₀(5) = 0.69897 are the two to memorise, because log₁₀(20) = log₁₀(2) + log₁₀(10) = 0.30103 + 1 = 1.30103, and log₁₀(4) = 2 × log₁₀(2) = 0.60206, and the product and power rules build the rest.

How are logarithms used in real life?

Logarithms are used in real life wherever a quantity spans many orders of magnitude, and the Logarithm Calculator is the tool I reach for first. The pH scale measures acidity in powers of 10, the decibel scale measures sound intensity in powers of 10, the Richter scale measures earthquakes in powers of 10, and binary search counts its steps in powers of 2.

Related Calculators and Math Resources

Scientific Calculator

There is no Scientific Calculator page on CalcSolver, so the Logarithm Calculator covers the log buttons a scientific calculator would have. The log, ln and log₂ buttons are the scientific calculator's logarithm keys, and this page answers all three.

Exponent Calculator

The Exponent Calculator is the logarithm's mirror image, and it answers the power question while this page answers the question backwards. If you know the exponent, you take the power; if you know the power, you take the logarithm, and the two tools cover both directions.

Natural Log Calculator

There is no separate natural-log page on CalcSolver, and there does not need to be one, because the Logarithm Calculator has a base e option in its dropdown, and that option is the natural log.

Number Base Converter

The Number Base Converter changes how a number is written, and a logarithm changes how a number is measured, and the two rhyme, because both are about the same number in a different base.

Equation Solver

The Equation Solver does the algebra in the middle of a logarithmic equation, and the logarithm step at the end is mine. When a logarithm equation becomes a quadratic, the Equation Solver handles the algebra, and I confirm which root the logarithm accepts.

The Logarithm Calculator is the tool I open first whenever a number has grown too big to count, and the habit has never failed me: type the number, pick the base, read the answer, and check it against the base raised to that power. Once that loop is in your hands, every logarithm in this guide is the same four steps.