Logarithm Rules: Formulas, Calculator and Solved Examples

Updated 15 November 2026

A logarithm answers an exponent question: “What power of the base gives this number?” Logs undo exponentiation.

Definition and real-number conditions\[\log_a x=y\quad\Longleftrightarrow\quad a^y=x\]\[a>0,\quad a\ne1,\quad x>0\]

For example, \(\log_2 32=5\) because \(2^5=32\), and \(\log_3 81=4\) because \(3^4=81\). A logarithm is not the number being logged: it is the exponent.

Logarithm and antilogarithm calculator

Use a positive base other than 1. Antilogarithm means raising that base to a power. Results are numerical approximations, shown to up to 12 significant digits.

Explore powers and their logarithms

A negative exponent gives a reciprocal. With a base between 0 and 1, increasing the exponent makes the value smaller.

Common logs and natural logs

In common-log tables, \(\log x\) means \(\log_{10}x\). In some advanced contexts, “log” means the natural log instead, so check the stated convention. \(\ln x\) always denotes base \(e\). Thus \(\log_{10}1000=3\) and \(\ln e=1\).

Log laws

The following laws use \(a>0\), \(a\ne1\), and positive \(x,y\). In the change-of-base rule, \(b>0\) and \(b\ne1\).

LawFormula
Product\(\log_a(xy)=\log_a x+\log_a y\)
Quotient\(\log_a(x/y)=\log_a x-\log_a y\)
Power, real \(r\)\(\log_a(x^r)=r\log_a x\)
Change of base\(\log_a x=\frac{\log_b x}{\log_b a}\)
Reciprocal bases\(\log_a b=\frac1{\log_b a}\)
One and the base\(\log_a1=0,\quad\log_a a=1\)

There is no real value for \(\log_a0\), and a negative argument is outside the real logarithm’s domain. There is also no rule that turns \(\log_a(x+y)\) into \(\log_a x+\log_a y\).

Worked examples

1. Product rule

\[\log_2(4\times16)=\log_2 4+\log_2 16=2+4=6\]

The argument is 64, and \(2^6=64\).

2. Power rule

\[\log_3(3^{27})=27\log_3 3=27\]

3. Quotient rule

\[\log_4 1024-\log_4 16=\log_4(1024/16)=\log_4 64=3\]

4. Reciprocal bases

\[\log_{128}2=\frac1{\log_2 128}=\frac17\approx0.142857\]

5. Keep the signs in a mixed expression

Start with the expression exactly as written. The minus before the base-5 log must stay a minus.

\[\log_3 9+\log_3 81-\log_5 1250+\log_5 2\]\[=2+4-\log_5(1250/2)\]\[=6-\log_5 625=6-4=2\]

Changing the last two signs gives a different question with answer 10.

6. Expand a variable expression

Assume \(k>0\) and \(n>0\), so every separated logarithm is defined.

\[\log_8\!\left(\frac{64k^4}{n^9}\right)=\log_8 64+4\log_8 k-9\log_8 n\]\[=2+4\log_8 k-9\log_8 n\]

The constant is 2 because \(64=8^2\).

Download the rules reference

The on-page rules above include the real-number conditions. Use them alongside the printable reference.

For calculus students

On \(x>0\), with a fixed valid base \(a\):

\[\frac{d}{dx}\log_a x=\frac1{x\ln a}\]\[\int\log_a x\,dx=\frac{x\ln x-x}{\ln a}+C\]

As \(x\to\infty\), \(\log_a x\to\infty\) when \(a>1\), while \(\log_a x\to-\infty\) when \(0

Practice

Find \(\log_2 8\), \(\log_{10}0.01\), and \(\log_5 25+\log_5 5\).

Check the answers

3, −2, and 3. The last expression equals \(\log_5 125\).

Next: read log and antilog tables.