Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Logarithm Calculator

How to use Logarithm Calculator
  1. Pick a mode with the three tabs at the top: Calculate finds one logarithm, Laws applies a logarithm law to your numbers, Compare sets two logarithms side by side. Learn more about the modes
  2. In Calculate mode, pick the base with the log₂, ln, log₁₀ or Custom button; the result updates at once and the argument stays. Learn more about the base buttons
  3. The chips under the buttons load a common argument for the chosen base: powers of 2, powers of e, or powers of 10. Learn more about the standard bases
  4. With Custom selected, type any base greater than 0 except 1 in the Base box. Learn more about custom bases
  5. Type the number you want the logarithm of in the Argument box; it must be greater than 0. Learn more about the argument
  6. The result appears after the equals sign as you type; the Result card lists it in several forms. Click Add to history to keep it in the Recent strip. Learn more about the results
  7. The How this works panel on the right explains the current base, law or comparison with your own numbers; its link opens the section below that explains the topic in full. Learn more about the panel
  8. In Laws mode, click a law on the left, edit its boxes, and read the numbered steps. Learn more about Laws mode
  9. In Compare mode, type a base and an argument for expression A and for expression B, then read the verdict. Learn more about Compare mode
  10. Click Reset to return to log₂(8) = 3. A message replaces the result when the argument is 0 or negative, or the base is 1. Learn more about getting started
Compute a logarithm
Base
Result
log base 2 of 8
Exact
3
Decimal
3
Scientific
3.0000e+0
As exponent equation
Change of base
Neighboring arguments (geometric, click to set)
1
2
3
4
5
Apply a logarithm law
Step-by-step
1
2
3
4
Compare two logarithms
Expression A
vs
Expression B
Verdict
A is larger — difference of 3.0000.
Decimal A
6
Decimal B
3.000000
A − B
3.0000
A / B
2.0000
How this works

Binary Logarithm

Base 22: the result is the power of 22 that gives the argument, log⁡2(8)=3\log_2(8) = 3. Whole numbers at the chips, decimals elsewhere. Learn more about the binary logarithm · All bases

What just happened

2 to the power 3 equals 8, so the logarithm is exactly 3.

The concept

A logarithm asks the inverse of an exponent: what power do I raise the base to, to get this number? Formally, .

Powers of 2
nExpressionValue
-20.25
-10.5
01
12
24
38
416
532
664
7128
8256






Getting Started with the Calculator

DemoThe three modes and Reset
Step 0 of 5
The calculator has three modes, picked with the tabs at the top: Calculate, Laws and Compare. Calculate finds one logarithm and shows it in several forms. Laws applies one logarithm rule to numbers you choose and lists the steps. Compare sets two logarithms side by side and says which is larger. Each mode keeps its own numbers, so you can switch tabs without losing anything. The demo above clicks through them and ends with Reset.

In Calculate mode, start with the Base row: the buttons log₂, ln and log₁₀ pick the three standard bases, and Custom opens a box for any other base. A row of chips under the buttons offers common arguments for the chosen base.

Type the number you want the logarithm of in the Argument box. It must be greater than 00: whole numbers like 88 or 10001000 and decimals like 2.52.5 both work. The result appears at once after the equals sign; the calculator starts with log⁡2(8)=3\log_2(8) = 3, and 1616 gives log⁡2(16)=4\log_2(16) = 4.

Click Add to history to keep the current logarithm in the Recent strip, and Reset to return to log⁡2(8)\log_2(8). What a logarithm is, and why the argument must be positive, is explained in what are logarithms.

Choosing Between Standard and Custom Base

DemoThe four base buttons
Step 0 of 5
The Base row holds four buttons. log₂ uses base 22, the binary logarithm of computer science. ln uses base e≈2.7183e \approx 2.7183, the natural logarithm of calculus and science. log₁₀ uses base 1010, the common logarithm of scientific notation and measurement scales. Pick one and the result updates at once; the argument stays, so you can compare log⁡2(8)=3\log_2(8) = 3, ln⁡(8)≈2.0794\ln(8) \approx 2.0794 and log⁡10(8)≈0.9031\log_{10}(8) \approx 0.9031 with three clicks.

Custom opens a Base box next to the argument, filled with 33 to begin with: log⁡3(8)≈1.8928\log_3(8) \approx 1.8928. Type any positive number except 11; with base 55, log⁡5(8)≈1.2920\log_5(8) \approx 1.2920. Decimal bases such as 2.52.5 work as well.

The chips under the buttons change with the base: powers of 22 for log₂, powers of ee for ln, powers of 1010 for log₁₀, and powers of 22 again for a custom base. Click a chip to load that argument.

Why the same number has a different logarithm in every base is explained in understanding different bases.

Using Standard Bases

DemoChips for base 2, base e and base 10
Step 0 of 5
With log₂ selected, the chips offer 2,4,8,…,10242, 4, 8, \dots, 1024, and every chip gives a whole number: log⁡2(1024)=10\log_2(1024) = 10 because 210=10242^{10} = 1024. Base 22 measures how many times a number can be halved, which is why it appears in information and algorithm analysis.

With ln selected, the chips are 11, ee, e2e^2, e3e^3, 1010 and 100100. The powers of ee give whole numbers, ln⁡(e2)=2\ln(e^2) = 2, while ln⁡(1024)≈6.9315\ln(1024) \approx 6.9315 and ln⁡(10)≈2.3026\ln(10) \approx 2.3026 do not. Natural logarithms describe growth and decay.

With log₁₀ selected, the chips are 1010 to 10000001000000: log⁡10(1000)=3\log_{10}(1000) = 3 because 103=100010^3 = 1000, and log⁡10(e2)≈0.8686\log_{10}(e^2) \approx 0.8686. The common logarithm counts the digits of a number, roughly, and runs the pH and decibel scales.

Switch between the three buttons with the same argument to see how the base changes the answer. The three logarithms are described one by one, starting with binary logarithm.

Working with Custom Base

DemoAny base, and a base that is not allowed
Step 0 of 5
Click Custom to unlock the Base box; it opens with base 33, so the argument 88 gives log⁡3(8)≈1.8928\log_3(8) \approx 1.8928. Type any base greater than 00 except 11. With argument 99 and base 33 the result is log⁡3(9)=2\log_3(9) = 2, because 32=93^2 = 9; change the base to 55 and log⁡5(9)≈1.3652\log_5(9) \approx 1.3652; with argument 125125, log⁡5(125)=3\log_5(125) = 3.

Decimal bases work: base 2.52.5 and argument 6.256.25 give 22, because 2.52=6.252.5^2 = 6.25. Large bases work too: base 100100 and argument 1000010000 give 22.

A base of 11, 00 or a negative number has no logarithm. The result line then reads Base must be positive and not equal to 1 and the Result card shows a matching status; correct the base and the result returns. Base 11 fails because 11 raised to any power is 11, so no exponent reaches 99.

The calculator computes a custom-base logarithm with the change of base formula, log⁡b(x)=ln⁡(x)/ln⁡(b)\log_b(x) = \ln(x) / \ln(b), which is explained in custom bases and change of base.

Entering Your Number

DemoArguments below 1, equal to 1, decimal, zero and large
Step 0 of 5
The Argument box holds the number you want the logarithm of, the NN in log⁡b(N)\log_b(N). Whole numbers like 88 or 10001000 and decimals like 2.52.5 or 50.7550.75 work; with base 22, log⁡2(2.5)≈1.3219\log_2(2.5) \approx 1.3219 and log⁡2(1000000)≈19.9316\log_2(1000000) \approx 19.9316. Very large and very small numbers are accepted.

Numbers between 00 and 11 give negative results: log⁡2(0.5)=−1\log_2(0.5) = -1, because 2−1=0.52^{-1} = 0.5. The argument 11 gives 00 in every base, because b0=1b^0 = 1.

Zero and negative numbers have no logarithm. The result line then reads Argument must be greater than 0, and an empty box reads Enter an argument; the Result card shows a matching status. Correct the box and the result returns at once; nothing has to be clicked.

The chips under the base buttons fill the box with a common argument for the chosen base. The reason zero and negative numbers are excluded is explained in what are logarithms.

Understanding Your Results and Errors

DemoResult forms, neighbors, history and a negative result
Step 0 of 5
The result appears after the equals sign as soon as the base and the argument are valid; you do not have to click anything. Whole-number results print in full, log⁡2(8)=3\log_2(8) = 3; others show four decimal places, log⁡2(5)≈2.3219\log_2(5) \approx 2.3219.

The Result card below the form lists the value in several forms: Exact when the argument is a whole power of the base, Decimal to six places, Scientific, the logarithm As exponent equation (23=82^3 = 8), and for a custom base the Change of base quotient. The copy icon next to each form copies it.

Under the forms, Neighboring arguments shows the argument multiplied and divided by the base once and twice, with their logarithms; click one to load it, for example 2020 next to 55, with log⁡2(20)≈4.3219\log_2(20) \approx 4.3219. Add to history stores the current logarithm in the Recent strip; click an entry to bring it back. The Powers of table on the right lists the arguments whose logarithm is a whole number and marks the current one; 6464 gives the exact value 66.

Messages replace the result when an input is not valid: Enter an argument, Argument must be greater than 0, Base must be positive and not equal to 1, and Overflow for a value beyond the computer's range; the Result card shows Waiting for input or a matching status. Negative results are not errors: log⁡2(0.01)≈−6.6439\log_2(0.01) \approx -6.6439 and log⁡10(0.01)=−2\log_{10}(0.01) = -2 are correct, as explained in common logarithm.

The How This Works Panel

DemoWhat the panel says for different arguments
Step 0 of 5
The How this works card at the top of the right-hand column changes with every click and keystroke. It opens with a short note on the current state: the base you have picked, the law, or the comparison, each ending with a link to the section on this page that explains it in full.

In Calculate mode the card then shows What just happened, which writes the logarithm as an exponent equation for your numbers, log⁡2(32)=5\log_2(32) = 5 because 25=322^5 = 32; Worth knowing, which appears only when something is special: an argument of 11, an argument equal to the base, an argument below 11 with its negative result such as log⁡2(0.25)=−2\log_2(0.25) = -2, or a note on how computers evaluate a logarithm that is not a whole number; and The concept, which states what the chosen base means, for example ln⁡(0.25)≈−1.3863\ln(0.25) \approx -1.3863 for the natural logarithm.

In Laws mode the card names the law, explains why it holds and shows a common mistake. In Compare mode it explains how the two logarithms are compared.

Below the card, Calculate mode also shows the Powers of table for the current base; click a row to load that argument. The laws the panel refers to are collected in simple logarithm rules.

Using Laws Mode

DemoProduct, quotient, power and change of base
Step 0 of 5
Click the Laws tab to apply one logarithm rule to numbers of your own. The left card lists seven laws as buttons, each with its formula: product rule, quotient rule, power rule, change of base, log of base, log of one and inverse pair. The product rule is selected when you open the mode.

Under the buttons, the input row shows the boxes the law needs: a base and the numbers xx and yy for the product and quotient rules, a base, xx and nn for the power rule, two bases and xx for the change of base, and a single base for the log of base and the log of one. The boxes start with sample values, so a result is visible at once: log⁡2(4)+log⁡2(8)=2+3=5=log⁡2(32)\log_2(4) + \log_2(8) = 2 + 3 = 5 = \log_2(32), and with y=16y = 16 the sum becomes 2+4=6=log⁡2(64)2 + 4 = 6 = \log_2(64). The quotient rule starts with log⁡2(32)−log⁡2(4)=3\log_2(32) - \log_2(4) = 3, the power rule with log⁡2(43)=3⋅2=6\log_2(4^3) = 3 \cdot 2 = 6, and the change of base with log⁡8(64)=6/3=2\log_8(64) = 6 / 3 = 2.

The Step-by-step list under the inputs rewrites your numbers with the law: the starting expression, the law applied, the value, and a direct check. Change a box and the steps follow at once.

The How this works card on the right explains the selected law and warns about its most common mistake. All seven laws are summarised in simple logarithm rules.

Using Compare Mode

DemoCompare two logarithms
Step 0 of 4
Click the Compare tab to set two logarithms side by side. The card shows Expression A and Expression B, each with a base box and an argument box, and prints the value of each as you type. The mode opens with log⁡2(64)=6\log_2(64) = 6 against log⁡10(1000)=3\log_{10}(1000) = 3, so A is larger.

The Verdict line says which expression is larger, or that they are equal, and gives the difference. Under it, a row of figures lists both values to six decimals, the difference A−BA - B, the ratio A/BA / B, and, when the bases are equal, the difference written as one logarithm by the quotient rule.

Type 88 as the argument of A to make the two equal, log⁡2(8)=3=log⁡10(1000)\log_2(8) = 3 = \log_{10}(1000); type 100100 as the argument of B and A is larger again by 11, since log⁡10(100)=2\log_{10}(100) = 2; change the base of B to 22 and log⁡2(100)≈6.6439\log_2(100) \approx 6.6439 makes B the larger one.

Negative and zero arguments show a dash, since they have no logarithm. How the base and the argument decide the size of a logarithm is explained in comparing two logarithms.

What Are Logarithms

A logarithm answers the question: "What exponent do I need?" If you know 2?=82^? = 8, the logarithm tells you the answer is 33. We write this as log⁡2(8)=3\log_2(8) = 3. Logarithms are the opposite (inverse) of exponents—they undo what exponents do.

Think of it like division versus multiplication. If 3×4=123 \times 4 = 12, then 12÷3=412 \div 3 = 4 reverses the operation. Similarly, if 23=82^3 = 8, then log⁡2(8)=3\log_2(8) = 3 reverses it. The logarithm "undoes" the exponent to reveal what power was used.

The general form is log⁡b(N)=x\log_b(N) = x, which means bx=Nb^x = N. The base (bb) is the number being raised to a power, the argument (NN) is the result you're trying to reach, and the logarithm (xx) is the exponent needed. So log⁡5(25)=2\log_5(25) = 2 because 52=255^2 = 25.

Logarithms only work with positive numbers. You cannot find log⁡(0)\log(0) or log⁡(−5)\log(-5) because no real exponent makes a positive base equal zero or negative. Also, base 11 doesn't work because 11 raised to any power always equals 11.

In Calculate mode the base buttons pick which logarithm is found: binary logarithm, natural logarithm, common logarithm, or a custom base. The definition is in what is a logarithm, the limits on base and argument in restrictions on base and argument, and the undoing of exponents in inverse identities.

Binary Logarithm (Base 2)

The binary logarithm log⁡2(x)\log_2(x) answers the question: how many times must 22 be multiplied by itself to reach xx? Its values at the powers of 22 are whole numbers: log⁡2(8)=3\log_2(8) = 3, log⁡2(1024)=10\log_2(1024) = 10, log⁡2(0.5)=−1\log_2(0.5) = -1. Between them it grows slowly: log⁡2(5)≈2.3219\log_2(5) \approx 2.3219 sits between log⁡2(4)=2\log_2(4) = 2 and log⁡2(8)=3\log_2(8) = 3.

Another reading: log⁡2(x)\log_2(x) is the number of times xx can be halved before it drops to 11. Halving 10241024 ten times gives 11. That is why log⁡2\log_2 counts the steps of a binary search and the bits needed to label xx items: 88 items need 33 bits.

To estimate by hand, find the two powers of 22 around xx: 64<100<12864 < 100 < 128, so log⁡2(100)\log_2(100) is between 66 and 77, in fact about 6.64396.6439. The common mistake is to expect log⁡2(100)\log_2(100) to be 5050; a logarithm grows far more slowly than its argument.

The reference values are in key logarithmic values; how a calculator converts between bases is in calculator conventions.

Natural Logarithm (Base e)

The natural logarithm ln⁡(x)=log⁡e(x)\ln(x) = \log_e(x) uses the base e≈2.71828e \approx 2.71828. Its whole-number values sit at the powers of ee: ln⁡(1)=0\ln(1) = 0, ln⁡(e)=1\ln(e) = 1, ln⁡(e2)=2\ln(e^2) = 2. For other arguments it is irrational: ln⁡(8)≈2.0794\ln(8) \approx 2.0794, ln⁡(10)≈2.3026\ln(10) \approx 2.3026, ln⁡(1024)≈6.9315\ln(1024) \approx 6.9315.

The base ee is chosen because it makes continuous change simple: a quantity that grows at a rate equal to its own size has ete^t as its formula, so ln⁡\ln turns a growth factor back into elapsed time. A population that has multiplied by 88 while doubling every hour has been growing for ln⁡(8)/ln⁡(2)=3\ln(8) / \ln(2) = 3 hours.

In the calculator, the chips for ln are 11, ee, e2e^2, e3e^3, 1010 and 100100. The common mistake is to read ln⁡\ln as the base-1010 logarithm: ln⁡(100)≈4.6052\ln(100) \approx 4.6052, while log⁡10(100)=2\log_{10}(100) = 2.

See the natural logarithm and the number e.

Common Logarithm (Base 10)

The common logarithm log⁡10(x)\log_{10}(x) counts powers of ten: log⁡10(10)=1\log_{10}(10) = 1, log⁡10(100)=2\log_{10}(100) = 2, log⁡10(1000)=3\log_{10}(1000) = 3, and log⁡10(0.01)=−2\log_{10}(0.01) = -2. For a number between two powers of ten the result lies between two whole numbers: log⁡10(8)≈0.9031\log_{10}(8) \approx 0.9031, just under 11.

The whole part of log⁡10(x)\log_{10}(x) is one less than the number of digits of a whole number xx: 10001000 has four digits and log⁡10(1000)=3\log_{10}(1000) = 3. That is why base 1010 drives scales that compress huge ranges: pH, decibels and earthquake magnitude all report a common logarithm, and one unit on them means a factor of 1010.

In many textbooks and on most hand calculators the button labelled log means log⁡10\log_{10}, while ln means the natural logarithm. The common mistake is to mix the two: log⁡10(e2)≈0.8686\log_{10}(e^2) \approx 0.8686, not 22.

See the common logarithm and when to use which.

Custom Bases and Change of Base

A logarithm can have any base b>0b > 0 with b≠1b \neq 1. log⁡3(9)=2\log_3(9) = 2 because 32=93^2 = 9; log⁡5(125)=3\log_5(125) = 3 because 53=1255^3 = 125; log⁡2.5(6.25)=2\log_{2.5}(6.25) = 2 because 2.52=6.252.5^2 = 6.25. Base 11 is excluded because 11 raised to any power is 11, so no exponent reaches another number; a base of 00 or below has no real powers of the needed kind.

Calculators do not store every base. They use the change of base formula, log⁡b(x)=ln⁡(x)ln⁡(b)\log_b(x) = \frac{\ln(x)}{\ln(b)}, or the same with log⁡10\log_{10}. For log⁡5(8)\log_5(8): ln⁡(8)≈2.0794\ln(8) \approx 2.0794 and ln⁡(5)≈1.6094\ln(5) \approx 1.6094, and their quotient is about 1.29201.2920. The calculator shows this quotient in the Result card as the Change of base form.

The common mistake is to divide the arguments instead of the logarithms: log⁡5(8)\log_5(8) is not 8/58 / 5. Another is to write ln⁡(8)−ln⁡(5)\ln(8) - \ln(5), which is ln⁡(8/5)\ln(8/5), a different number.

The formula is in the change of base formula and converting between bases.

Simple Logarithm Rules

The logarithm of 1 always equals 0, regardless of base: log⁡2(1)=0\log_2(1) = 0, log⁡10(1)=0\log_{10}(1) = 0, log⁡5(1)=0\log_5(1) = 0. This is because any number to the power 00 equals 11: 20=12^0 = 1, 100=110^0 = 1, 50=15^0 = 1.

The logarithm of the base equals 1: log⁡2(2)=1\log_2(2) = 1, log⁡10(10)=1\log_{10}(10) = 1, log⁡7(7)=1\log_7(7) = 1. This makes sense because the base to the first power equals itself: 21=22^1 = 2, 101=1010^1 = 10, 71=77^1 = 7.

Multiplication becomes addition with logarithms: log⁡b(xy)=log⁡b(x)+log⁡b(y)\log_b(xy) = \log_b(x) + \log_b(y). For example, log⁡2(8)+log⁡2(4)=3+2=5=log⁡2(32)\log_2(8) + \log_2(4) = 3 + 2 = 5 = \log_2(32) because 8×4=328 \times 4 = 32. This property makes logarithms useful for simplifying multiplication.

Division becomes subtraction: log⁡b(xy)=log⁡b(x)−log⁡b(y)\log_b(\frac{x}{y}) = \log_b(x) - \log_b(y). Try log⁡2(8)−log⁡2(4)=3−2=1=log⁡2(2)\log_2(8) - \log_2(4) = 3 - 2 = 1 = \log_2(2) because 8÷4=28 \div 4 = 2. And exponents become multiplication: log⁡b(xn)=n⋅log⁡b(x)\log_b(x^n) = n \cdot \log_b(x). So log⁡2(82)=2⋅log⁡2(8)=2×3=6\log_2(8^2) = 2 \cdot \log_2(8) = 2 \times 3 = 6.

Laws mode also covers the change of base formula and the inverse pair log⁡b(bx)=x\log_b(b^x) = x. Every rule is a rewriting of an exponent rule, because a logarithm is an exponent. The complete list with proofs is in logarithm rules and summary of logarithm rules.

The Product Rule

The product rule turns a logarithm of a product into a sum: log⁡b(xy)=log⁡b(x)+log⁡b(y)\log_b(xy) = \log_b(x) + \log_b(y).

It is the product rule of exponents read backwards. If x=bmx = b^m and y=bny = b^n, then xy=bm+nxy = b^{m+n}, so the exponent of xyxy is m+nm + n. Example: log⁡2(4×8)=log⁡2(4)+log⁡2(8)=2+3=5\log_2(4 \times 8) = \log_2(4) + \log_2(8) = 2 + 3 = 5, and indeed 4×8=32=254 \times 8 = 32 = 2^5. With y=16y = 16: 2+4=6=log⁡2(64)2 + 4 = 6 = \log_2(64).

The rule is how logarithm tables turned multiplication into addition before calculators: add the logarithms, then look up the antilogarithm. The common mistake is to apply it to a sum: log⁡b(x+y)\log_b(x + y) is not log⁡b(x)+log⁡b(y)\log_b(x) + \log_b(y); log⁡2(4+4)=3\log_2(4 + 4) = 3, while log⁡2(4)+log⁡2(4)=4\log_2(4) + \log_2(4) = 4.

See the product rule and expanding logarithmic expressions.

The Quotient Rule

The quotient rule turns a logarithm of a quotient into a difference: log⁡b(xy)=log⁡b(x)−log⁡b(y)\log_b\left(\frac{x}{y}\right) = \log_b(x) - \log_b(y).

It mirrors the quotient rule of exponents: bm/bn=bm−nb^m / b^n = b^{m-n}. Example: log⁡2(32/4)=log⁡2(32)−log⁡2(4)=5−2=3\log_2(32 / 4) = \log_2(32) - \log_2(4) = 5 - 2 = 3, and 32/4=8=2332 / 4 = 8 = 2^3. Read the other way, it condenses a difference into one logarithm, which is how Compare mode writes A−BA - B as a single logarithm when the bases agree.

The order matters: log⁡b(x)−log⁡b(y)\log_b(x) - \log_b(y) is the logarithm of x/yx / y, not of y/xy / x; swapping gives the opposite sign. The common mistake is to turn a quotient of logarithms into a difference: log⁡b(x)log⁡b(y)\frac{\log_b(x)}{\log_b(y)} is not log⁡b(x)−log⁡b(y)\log_b(x) - \log_b(y); the first is a change of base, the second the logarithm of a quotient.

See the quotient rule and condensing logarithmic expressions.

The Power Rule

The power rule brings an exponent down as a factor: log⁡b(xn)=n⋅log⁡b(x)\log_b(x^n) = n \cdot \log_b(x).

It follows from the power of a power: if x=bmx = b^m then xn=bmnx^n = b^{mn}, so the exponent of xnx^n is nn times the exponent of xx. Example: log⁡2(43)=3⋅log⁡2(4)=3×2=6\log_2(4^3) = 3 \cdot \log_2(4) = 3 \times 2 = 6, and 43=64=264^3 = 64 = 2^6. A root is a fractional power: log⁡2(16)=12log⁡2(16)=2\log_2(\sqrt{16}) = \frac{1}{2} \log_2(16) = 2.

The rule is what makes logarithms solve exponential equations: taking log⁡2\log_2 of both sides of 2x=1002^x = 100 gives x=log⁡2(100)≈6.6439x = \log_2(100) \approx 6.6439. The common mistake is to confuse (log⁡bx)2(\log_b x)^2 with log⁡b(x2)\log_b(x^2): the first squares the logarithm, the second doubles it; (log⁡28)2=9(\log_2 8)^2 = 9, while log⁡2(82)=6\log_2(8^2) = 6.

See the power rule and solving exponential equations via logarithms.

Change of Base

The change of base formula rewrites a logarithm in any base you can compute: log⁡b(x)=log⁡a(x)log⁡a(b)\log_b(x) = \frac{\log_a(x)}{\log_a(b)} for any base a>0a > 0, a≠1a \neq 1.

It follows from the power rule. Let y=log⁡b(x)y = \log_b(x), so by=xb^y = x. Taking log⁡a\log_a of both sides gives ylog⁡a(b)=log⁡a(x)y \log_a(b) = \log_a(x), and dividing by log⁡a(b)\log_a(b) isolates yy. Example: log⁡8(64)=log⁡2(64)log⁡2(8)=63=2\log_8(64) = \frac{\log_2(64)}{\log_2(8)} = \frac{6}{3} = 2, and 82=648^2 = 64. With natural logarithms, log⁡5(8)=ln⁡(8)/ln⁡(5)≈2.0794/1.6094≈1.2920\log_5(8) = \ln(8) / \ln(5) \approx 2.0794 / 1.6094 \approx 1.2920.

A useful consequence: log⁡b(x)\log_b(x) and log⁡a(x)\log_a(x) differ only by the constant factor 1/log⁡a(b)1 / \log_a(b), so all logarithms of xx are proportional. The common mistake is to drop the divisor and report log⁡a(x)\log_a(x) alone, or to put the base on top: the base's logarithm goes in the denominator.

See the change of base formula and converting between bases.

Log of the Base

For every valid base, log⁡b(b)=1\log_b(b) = 1: log⁡2(2)=1\log_2(2) = 1, log⁡10(10)=1\log_{10}(10) = 1, ln⁡(e)=1\ln(e) = 1, log⁡5(5)=1\log_5(5) = 1.

The reason is b1=bb^1 = b: the exponent that turns bb into itself is 11. The calculator points this out in Worth knowing whenever the argument equals the base. The identity marks the point where every logarithm curve reaches the height 11, and together with log⁡b(1)=0\log_b(1) = 0 it fixes the two anchor points of the graph.

It also explains the units of a logarithmic scale: on the base-1010 scale, going from 11 to 1010 is one unit because log⁡10(10)=1\log_{10}(10) = 1. The common mistake is to think log⁡b(b)\log_b(b) depends on bb; it is 11 for b=2b = 2 and for b=1000b = 1000 alike.

See key logarithmic values and inverse identities.

Log of One

For every valid base, log⁡b(1)=0\log_b(1) = 0: log⁡2(1)=0\log_2(1) = 0, log⁡10(1)=0\log_{10}(1) = 0, ln⁡(1)=0\ln(1) = 0.

The reason is b0=1b^0 = 1 for every b≠0b \neq 0: the exponent that produces 11 is 00, whatever the base. In the calculator, typing 11 as the argument gives 00 for any base, and Worth knowing says why.

The identity divides the arguments into two groups: arguments above 11 have positive logarithms and arguments between 00 and 11 have negative ones, since log⁡b(x)<log⁡b(1)=0\log_b(x) < \log_b(1) = 0 there for a base above 11. It is the point where every logarithm graph crosses the horizontal axis. The common mistake is to confuse it with log⁡b(0)\log_b(0), which does not exist: the curve falls without bound as the argument approaches 00 and never reaches it.

See key logarithmic values and the vertical asymptote.

Inverse Pair

Logarithm and exponential with the same base undo each other: log⁡b(bx)=x\log_b(b^x) = x and blog⁡b(x)=xb^{\log_b(x)} = x.

The first says: raise bb to the power xx, then ask which power of bb you have, and the answer is xx. Example: log⁡2(25)=5\log_2(2^5) = 5. The second runs the other way: 2log⁡2(5)=52^{\log_2(5)} = 5, because log⁡2(5)≈2.3219\log_2(5) \approx 2.3219 is by definition the exponent that produces 55. In Laws mode, the inverse pair law shows both directions for a base and an exponent of your choice.

These identities are the tool for solving equations: to solve 2x=1002^x = 100, apply log⁡2\log_2 to both sides and the left side collapses to xx; to solve log⁡2(x)=5\log_2(x) = 5, raise 22 to both sides and get x=32x = 32. The common mistake is to pair a logarithm with an exponential of a different base: log⁡2(10x)\log_2(10^x) does not collapse to xx; it equals xlog⁡2(10)x \log_2(10).

See inverse identities and inverse relationship with exponential functions.

Comparing Two Logarithms

Two logarithms are compared by their values, and two rules predict the order without computing.

With the same base above 11, the larger argument has the larger logarithm: log⁡2(64)>log⁡2(8)\log_2(64) > \log_2(8) because 64>864 > 8, and the difference is one logarithm, log⁡2(64/8)=3\log_2(64 / 8) = 3. With a base between 00 and 11 the order flips, because such a logarithm decreases as the argument grows.

With different bases, no shortcut by argument alone works: log⁡2(64)=6\log_2(64) = 6 beats log⁡10(1000)=3\log_{10}(1000) = 3 although 10001000 is far larger than 6464, because base 22 needs many more factors to reach a number. Convert both to one base with the change of base formula, or simply compute: log⁡2(100)≈6.6439\log_2(100) \approx 6.6439 against log⁡10(1000)=3\log_{10}(1000) = 3.

The common mistake is to compare arguments and ignore the bases. In Compare mode the verdict, the difference A−BA - B and the ratio A/BA / B make the comparison explicit.

See base greater than one: direction preserved, base between zero and one: direction reversed and effect of base on shape.

Understanding Different Bases

The base determines which number is being raised to a power. Base 22 means powers of 22: 21=22^1 = 2, 22=42^2 = 4, 23=82^3 = 8. So log⁡2(4)=2\log_2(4) = 2 because 44 is the second power of 22. Different bases give different answers for the same number.

Base 2 (binary logarithm) is fundamental in computer science. Computers use binary (base 22), so log⁡2\log_2 measures things like how many times you can divide by 22, or how many bits are needed. Eight items need log⁡2(8)=3\log_2(8) = 3 bits to represent.

Base e (natural logarithm) uses e≈2.71828e \approx 2.71828, a special mathematical constant. Natural logarithms appear in growth and decay: population growth, radioactive decay, compound interest. The notation ln⁡(x)\ln(x) means log⁡e(x)\log_e(x). For example, ln⁡(20)≈2.996\ln(20) \approx 2.996.

Base 10 (common logarithm) matches our decimal system. It tells you how many digits a number has (roughly). Since 102=10010^2 = 100 and 103=100010^3 = 1000, numbers between 100100 and 10001000 have logarithms between 22 and 33. This helps with scientific notation and measuring scales like pH or decibels.

The three standard bases are compared in side-by-side summary.

Practice Problems to Try

Easy problems with base 2: Calculate log⁡2(4)\log_2(4), log⁡2(16)\log_2(16), and log⁡2(32)\log_2(32). Answers: 22 (because 22=42^2 = 4), 44 (because 24=162^4 = 16), and 55 (because 25=322^5 = 32). These are all whole numbers because the inputs are perfect powers of 22.

Base 10 problems: Find log⁡10(100)\log_{10}(100), log⁡10(1000)\log_{10}(1000), and log⁡10(10000)\log_{10}(10000). Answers: 22, 33, and 44. Notice the pattern—each answer tells you how many zeros are in the number (plus one for the leading 11).

Problems with decimals: Try log⁡2(5)\log_2(5), log⁡10(50)\log_{10}(50), and log⁡3(10)\log_3(10). Answers: approximately 2.32192.3219, 1.69901.6990, and 2.09592.0959. These give decimals because the inputs aren't perfect powers of their bases.

Negative logarithms: Calculate log⁡2(0.5)\log_2(0.5), log⁡10(0.1)\log_{10}(0.1), and log⁡5(0.2)\log_5(0.2). Answers: −1-1, −1-1, and −1-1. All equal −1-1 because 2−1=0.52^{-1} = 0.5, 10−1=0.110^{-1} = 0.1, and 5−1=0.25^{-1} = 0.2.

Custom base challenges: Find log⁡3(27)\log_3(27), log⁡5(125)\log_5(125), and log⁡7(49)\log_7(49). Answers: 33, 33, and 22. Check: 33=273^3 = 27, 53=1255^3 = 125, and 72=497^2 = 49. More values to check against are in key logarithmic values.

Real-World Uses of Logarithms

pH Scale uses base 1010 logarithms to measure acidity. A pH of 77 is neutral, below 77 is acidic, above 77 is basic. The formula involves log⁡10\log_{10} of hydrogen ion concentration. Each whole number change represents a tenfold difference—pH 55 is ten times more acidic than pH 66.

Decibels measure sound intensity using log⁡10\log_{10}. The formula is 10⋅log⁡10(II0)10 \cdot \log_{10}(\frac{I}{I_0}) where II is intensity. A whisper is about 3030 dB, normal conversation 6060 dB, a rock concert 120120 dB. Every 1010 dB increase means the sound is ten times more intense.

Earthquake magnitude (Richter scale) uses logarithms. A magnitude 55 earthquake releases about 3232 times more energy than magnitude 44 because the scale is logarithmic. log⁡10\log_{10} helps compress the huge range of earthquake energies into manageable numbers.

Population growth and compound interest use natural logarithms (base ee). If bacteria double every hour, ln⁡\ln helps calculate how long to reach a certain population. The formula t=ln⁡(N/N0)ln⁡(2)t = \frac{\ln(N/N_0)}{\ln(2)} tells you how many doublings occurred.

Computer algorithms use log⁡2\log_2 to analyze efficiency. Binary search has complexity O(log⁡2n)O(\log_2 n)—it divides the problem in half each step. Searching 10241024 items takes only about log⁡2(1024)=10\log_2(1024) = 10 steps instead of checking all 10241024. Which base suits which application is discussed in when to use which.