Log Calculator (Logarithm Calculator)
Calculate a logarithm of any base, or solve for the number when the log is known. Enter the number and the base to get logₑ(x), plus ln, log₁₀ and log₂ of the same number, with change-of-base steps. Example: log₂(32) = 5 because 2⁵ = 32, and log₁₀(1000) = 3.
Type the problems from this lesson and check each step.
Show steps
How to use the Log Calculator (Logarithm Calculator)
- Choose the logarithm or the antilog mode.
- Enter the number x and pick the base: 2, 10, e (natural log) or any custom base.
- For the antilog, enter the log value y instead.
- Press Calculate to see the result with the change-of-base steps and the same number in the other common bases.
Formula and method
logₑ(x) = y means by = x, for b > 0, b ≠ 1 and x > 0.
Change of base: logₑ(x) = ln(x) ÷ ln(b) (or log₁₀(x) ÷ log₁₀(b)).
Example: log₂(32) = ln 32 ÷ ln 2 = 3.4657 ÷ 0.6931 = 5. Antilog: if log₁₀(x) = 2.5, then x = 102.5 = 316.23.
What is a logarithm?
A logarithm answers the question: to what power must the base be raised to get this number? log₂(8) = 3 because 2³ = 8. Logarithms turn multiplication into addition, which is why they are used in slide rules, decibels, pH and the Richter scale.
Common, natural and binary logs
| Name | Base | Written | Used in |
|---|---|---|---|
| Common log | 10 | log x or log₁₀ x | Science, pH, decibels |
| Natural log | e ≈ 2.71828 | ln x | Calculus, growth and decay |
| Binary log | 2 | log₂ x | Computer science, information |
Logarithm rules
| Rule | Formula |
|---|---|
| Product | log(xy) = log x + log y |
| Quotient | log(x/y) = log x − log y |
| Power | log(xⁿ) = n log x |
| Base is 1 power | log_b(b) = 1, log_b(1) = 0 |
| Inverse | b^(log_b x) = x |
| Change of base | log_b x = ln x / ln b |
Worked example: solving 3^x = 20
Take logs of both sides: x = log₃(20) = ln 20 ÷ ln 3 = 2.9957 ÷ 1.0986 = 2.727. Use the calculator with x = 20 and a custom base of 3 to check.
Domain: why x must be positive
No power of a positive base is zero or negative, so log(0) and log of a negative number do not exist among real numbers. The calculator tells you when the input is out of domain.
Antilogarithm
The antilog undoes the log. If log₁₀(x) = y then x = 10y. It is the same as the power key on a calculator, and is used to convert pH to a hydrogen ion concentration or decibels to a power ratio.
Common mistakes
log(x + y) is not log x + log y. log(x) ÷ log(y) is not log(x ÷ y). And logₑ of a number less than 1 is negative for b > 1, which is correct.
Accuracy and limits
Results use double-precision floating point and are shown to 8 decimals. Whole-number results are detected within 1e-10.
Frequently asked questions
How do I calculate log base 2?
Divide ln(x) by ln(2). For example log₂(32) = 5.
What is the difference between log and ln?
log usually means base 10 and ln means base e. Some texts use log for either, so check the context.
Can you take the log of a negative number?
Not among real numbers. The domain of log is x > 0.
What is log of 1?
0, for any base.
What is an antilog?
The inverse of a log: x = b^y. For common logs, antilog(y) = 10^y.
Sources
Related calculators
Related to This Article
More math articles
- Family Change, Cohabitation, Divorce, and the Second Shift
- The Best Grade 7 ELA Practice Tests for Pennsylvania Students
- Triangle Theorems Every Student Should Know in 2027
- Presidential veto
- Free Printable Grade 2 English Worksheets for Washington
- North Carolina Paycheck Calculator
- Two-party system and electoral rules
- Integrals Made Easier Using Tables: A Complete Explanation And Examples
- 49 Printable Michigan M-STEP Grade 3 Math Worksheets — Free Download with Step-by-Step Keys
- Random Group Generator: Split a List into Teams or Groups












What people say about "Log Calculator: Log Base b, Natural Log, Antilog and Change of Base"?
No one replied yet.