Arithmetic & Numbers

Log Calculator

This log calculator finds the logarithm of x to any base: log base 10, natural log (ln), log base 2 or a base you type.

Try
Calculate

A positive number. Decimals, fractions and E notation (1e-6) work.

Result

log₁₀(50): 1.698970004

log₁₀(50)

log10⁡50=1.698970004\log_{10} 50 = 1.698970004

Natural log, ln x
3.912023005
Common log, log₁₀ x
1.698970004
Binary log, log₂ x
5.64385619
Exact formThe value is irrational, so the decimal is rounded.
ln⁡50ln⁡10\frac{\ln 50}{\ln 10}

log₁₀(50) ≈ 1.698970004, so 10 raised to the power 1.698970004 is 50.

50 is not a rational power of 10, so the logarithm is irrational. The decimal is rounded to 10 significant digits.

y = log₁₀ x, through (50, 1.698970004)
01210203040506070xyy = log₁₀ xlog₁₀(50)
Step-by-step working (3 steps)
  1. Write the question as a power

    log₁₀(50) is the exponent y that turns the base into 50.

    10y=5010^{y} = 50
  2. Use the change-of-base formula

    Most calculators only have ln and log₁₀, so divide the logarithm of the number by the logarithm of the base.

    log10⁡50=ln⁡50ln⁡10=3.9120230052.302585093=1.698970004\log_{10} 50 = \frac{\ln 50}{\ln 10} = \frac{3.912023005}{2.302585093} = 1.698970004
  3. Check

    Raise the base to the answer and you get the original number back (up to rounding).

    101.698970004≈5010^{1.698970004} \approx 50

It applies logb⁡x=ln⁡xln⁡b\log_b x = \frac{\ln x}{\ln b}, shows each step, gives an exact answer when one exists, such as log8⁡2=13\log_8 2 = \frac{1}{3}, and works backwards as an antilog calculator or to solve for the base.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Choose Logarithm to find an exponent, Antilog to raise the base to a power, or Solve for base to find b when you know x and the logarithm y.
  2. Pick the base: natural log (e ≈ 2.718), common log (10), binary log (2), or Other base b to type your own. The base must be positive and not 1.
  3. Enter the number x. It must be greater than 0. Decimals, fractions such as 1/8, and E notation such as 1e-6 all work.
  4. Read the answer at the top. An exact fraction appears when one exists, with its decimal underneath. Unlike a plain logarithm calculator that returns only a decimal, the steps show the change of base and a check.
  5. The results also list ln x, log₁₀ x and log₂ x together, so one entry answers all three common bases.

Formulas

Definition

logb⁡x=y⇔by=x,b>0,b≠1,x>0\log_b x = y \iff b^{y} = x, \quad b > 0,\ b \ne 1,\ x > 0

Plain-text formula: log_b x = y ⇔ b^y = x, b > 0, b ≠ 1, x > 0

bb
the base
xx
the number, also called the argument
yy
the logarithm, which is an exponent

A logarithm answers the question "to what power must I raise b to get x?" A positive base raised to any real power is positive, so only positive x have real logarithms.

Change of base

logb⁡x=ln⁡xln⁡b=log10⁡xlog10⁡b\log_b x = \frac{\ln x}{\ln b} = \frac{\log_{10} x}{\log_{10} b}

Plain-text formula: log_b x = (ln x)/(ln b) = (log_10 x)/(log_10 b)

ln\ln
natural logarithm, base e≈2.718281828e \approx 2.718281828
log10\log_{10}
common logarithm, base 10

Any logarithm can be computed from natural or common logarithms. Both versions give the same result, because the ratio does not depend on the base used.

Antilogarithm

antilogby=by,logb(by)=y\operatorname{antilog}_b y = b^{y}, \quad \log_b\left(b^{y}\right) = y

Plain-text formula: antilog_by = b^y, log_b(b^y) = y

The antilog undoes the logarithm: raise the base to the logarithm and you get the number back. The base-10 antilog of 2 is 100, and the natural antilog of y is eye^{y}.

Solving for the base

logb⁡x=y⇔b=x1/y,y≠0,x≠1\log_b x = y \iff b = x^{1/y}, \quad y \ne 0,\ x \ne 1

Plain-text formula: log_b x = y ⇔ b = x^(1/y), y ≠ 0, x ≠ 1

Raise both sides of by=xb^{y} = x to the power 1/y. For example, logb⁡64=3\log_b 64 = 3 gives b=641/3=4b = 64^{1/3} = 4. When x = 1, every base gives y = 0, so the base cannot be found.

Reading the result

The answer is an exponent. log5⁡100≈2.861\log_5 100 \approx 2.861 means 52.861≈1005^{2.861} \approx 100: a bit less than 3, since 53=1255^{3} = 125. With a base greater than 1, a logarithm is positive for x greater than 1, zero for x = 1 and negative for x between 0 and 1.

Most logarithms are irrational, so their decimals never end. They are rounded here to 10 significant digits, and the exact form ln⁡xln⁡b\frac{\ln x}{\ln b} is shown alongside. When x is an exact rational power of b, as in log10⁡0.001=−3\log_{10} 0.001 = -3 or log8⁡2=13\log_8 2 = \frac{1}{3}, the calculator finds the fraction and verifies it with whole-number arithmetic.

Log base 10, natural log and log base 2

Log base 10 (the common log, written log or log₁₀) counts powers of ten: log₁₀ 1000 = 3. It is the log key on most calculators and the base behind pH, decibels and the Richter scale, where each step of 1 means ten times more.

Natural log (ln, base e ≈ 2.718) comes from continuous growth and calculus. To use this page as a natural log calculator, choose the ln base. The derivative of ln x is 1/x, and an amount growing at a continuous rate r doubles after ln 2 ÷ r, about 0.693 ÷ r.

Log base 2 (log₂, sometimes lb) counts doublings, so it appears in computing. log₂ 1024 = 10, a number needs ⌊log₂ n⌋ + 1 binary digits, and binary search through n sorted items takes about log₂ n steps.

ln, log and lg: ln always means base e. log means base 10 on calculators and in science, but base e in much of pure mathematics and in most programming languages, so check the convention. lg usually means base 10. Choosing the base explicitly here avoids the ambiguity.

Rules of logarithms

These laws hold for any valid base b and positive x and y. They turn multiplication into addition and powers into multiplication, which is why logarithms were used for hand calculation.

Logarithm rules with examples in base 10
RuleFormulaExample
Product rulelogb(xy)=logb⁡x+logb⁡y\log_b(xy) = \log_b x + \log_b ylog⁡200=log⁡2+log⁡100≈2.30103\log 200 = \log 2 + \log 100 \approx 2.30103
Quotient rulelogb⁡xy=logb⁡x−logb⁡y\log_b\frac{x}{y} = \log_b x - \log_b ylog⁡14=log⁡1−log⁡4≈−0.60206\log \frac{1}{4} = \log 1 - \log 4 \approx -0.60206
Power rulelogb(xk)=klogb⁡x\log_b(x^{k}) = k\log_b xlog⁡8=3log⁡2≈0.90309\log 8 = 3\log 2 \approx 0.90309
Log of 1logb⁡1=0\log_b 1 = 0log⁡1=0\log 1 = 0
Log of the baselogb⁡b=1\log_b b = 1log⁡10=1\log 10 = 1
Inverseblogb⁡x=xb^{\log_b x} = x10log⁡7=710^{\log 7} = 7
Reciprocal baselog1/b⁡x=−logb⁡x\log_{1/b} x = -\log_b xlog1/2⁡8=−3\log_{1/2} 8 = -3

Expanding and condensing logarithms

To expand, split products, quotients and powers with the rules above: log2⁡8x3y=log2⁡8+3log2⁡x−log2⁡y=3+3log2⁡x−log2⁡y\log_2 \frac{8x^{3}}{y} = \log_2 8 + 3\log_2 x - \log_2 y = 3 + 3\log_2 x - \log_2 y.

To condense, run the rules backwards. Move each coefficient into a power first, then combine sums into products and differences into quotients: 2ln⁡x+ln⁡3−ln⁡y=ln⁡3x2y2\ln x + \ln 3 - \ln y = \ln \frac{3x^{2}}{y}.

Both directions need every logarithm in the same base, so convert with change of base first if they differ. The rules apply only when x and y are positive, so ln(x2)=2ln⁡x\ln(x^{2}) = 2\ln x holds for x > 0 but not for x = −3.

Common log values

Values to 10 significant digits. The base-10 logs of powers of 10, the base-2 logs of powers of 2 and ln 1 = 0 are exact. Every other entry is irrational.

log₁₀ x, ln x and log₂ x for common values of x
xlog10⁡x\log_{10} xln⁡x\ln xlog2⁡x\log_2 x
0.1−1−2.302585093−3.321928095
0.5−0.3010299957−0.6931471806−1
1000
20.30102999570.69314718061
30.47712125471.0986122891.584962501
40.60205999131.3862943612
50.69897000431.6094379122.321928095
60.77815125041.7917594692.584962501
70.845098041.9459101492.807354922
80.9030899872.0794415423
90.95424250942.1972245773.169925001
1012.3025850933.321928095
10024.6051701866.64385619
100036.9077552799.965784285

How to calculate a log without this calculator

On a scientific calculator: most have only log (base 10) and ln. For any other base, use change of base and divide: log₂ 50 = ln 50 ÷ ln 2 ≈ 5.64385619. Some models have a direct key: the Casio fx-991EX has a log with an empty base box, and the TI-84 Plus (operating system 2.55 or later) has logBASE( in the MATH menu.

On a phone: switch the built-in calculator to scientific mode (on most phones, turn it sideways), which has ln and log. Then use the same division for other bases.

By hand: split the number into a power of ten and a few known values, then apply the rules above. With log 2 ≈ 0.30103 and log 3 ≈ 0.47712: log 200 = log 2 + 2 ≈ 2.30103, and log 6 = log 2 + log 3 ≈ 0.77815.

The exponent calculator works in the other direction, raising a number to any power. The scientific notation calculator relates base-10 logarithms to powers of ten.

Errors, precision and exact answers

Zero or a negative number: no real exponent makes a positive base equal 0 or a negative number, so the calculator reports an error and explains why. In the complex numbers, ln(−x)=ln⁡x+πi\ln(-x) = \ln x + \pi i, and the error message gives that value.

Base 1, 0 or a negative base: every power of 1 is 1, so log₁ x has no single answer. Zero and negative bases do not give a continuous logarithm. Bases between 0 and 1, such as 1/2, are allowed.

Precision: decimals are rounded to 10 significant digits. Inputs are read exactly, so 0.1 means exactly 1/10, and exact answers come from integer arithmetic rather than floating-point rounding. The methodology page describes how the results are tested.

Worked example

Find log₅ 100

To what power must 5 be raised to give 100?

  1. Set up the equation: 5y=1005^{y} = 100. Since 52=255^{2} = 25 and 53=1255^{3} = 125, y is between 2 and 3.
  2. Change of base: log5⁡100=ln⁡100ln⁡5=4.6051701861.609437912\log_5 100 = \frac{\ln 100}{\ln 5} = \frac{4.605170186}{1.609437912}.
  3. Divide: y ≈ 2.861353116.
  4. Check: 52.861353116≈1005^{2.861353116} \approx 100.

Answer: log5⁡100≈2.861353116\log_5 100 \approx 2.861353116, an irrational number.

Frequently asked questions

What is the difference between log and ln?

ln is the natural logarithm, base e ≈ 2.718. log usually means base 10 on calculators, so log 1000 = 3 while ln 1000 ≈ 6.907755279. They differ by a constant factor: ln x ≈ 2.302585093 × log₁₀ x.

How do I calculate log base 2 on a calculator?

Divide the log of the number by the log of 2, using either ln or log: log₂ x = ln x ÷ ln 2 = log x ÷ log 2. For example, log₂ 5 = log 5 ÷ log 2 ≈ 0.6989700043 ÷ 0.3010299957 ≈ 2.321928095. Here, choose Binary log and the division is done for you.

What are the values of log 1 to log 10?

In base 10: log 1 = 0, log 2 ≈ 0.30103, log 3 ≈ 0.47712, log 4 ≈ 0.60206, log 5 ≈ 0.69897, log 6 ≈ 0.77815, log 7 ≈ 0.84510, log 8 ≈ 0.90309, log 9 ≈ 0.95424 and log 10 = 1. The common log values table above gives them to 10 digits, with ln and log₂.

Why is the log of a negative number or zero undefined?

A positive base raised to any real power gives a positive result, so no real exponent produces 0 or a negative number. As x approaches 0, the logarithm heads toward minus infinity without reaching a value.

How do I convert ln back to a number?

Raise e to the power: if ln x = y, then x = eye^{y}. For example, ln x = 2 gives x = e2≈7.389056099e^{2} \approx 7.389056099. Choose Antilog with the natural log base to do this, or base 10 to undo a common log.

What is an antilog?

The antilog undoes a logarithm: the antilog of y to base b is byb^{y}. For example, the base-10 antilog of 2.5 is 102.5≈316.22776610^{2.5} \approx 316.227766.

What does 10 log 10 equal?

10 log₁₀ 10 = 10 × 1 = 10. The form 10 log₁₀(ratio) is the decibel formula for power: a power ratio of 100 is 10 × 2 = 20 dB.

How do I find the base of a logarithm?

Rewrite logb⁡x=y\log_b x = y as by=xb^{y} = x, then take the y-th root: b=x1/yb = x^{1/y}. For example, logb⁡81=4\log_b 81 = 4 gives b=811/4=3b = 81^{1/4} = 3. Choose Solve for base, enter x and y, and the calculator gives the exact base when the root is rational.

Can the base be between 0 and 1?

Yes. With a base such as 1/2, the logarithm decreases as x increases. For example, log1/2⁡8=−3\log_{1/2} 8 = -3 because (1/2)−3=8(1/2)^{-3} = 8. Only bases of 1, 0 or negative numbers are excluded.

Exponent Calculator

Powers a^b with exact fractions and steps, plus solving a^b = y for the exponent or the base.

Arithmetic & Numbers

Square Root Calculator

Square, cube and nth roots in simplest radical form, with decimals and prime-factor steps.

Arithmetic & Numbers

Scientific Notation Calculator

Convert to scientific, E and engineering notation, or add, subtract, multiply and divide, with steps.

Arithmetic & Numbers

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.

Tools

Graphing Calculator

Plot functions, equations, inequalities, parametric and polar curves; find roots and intersections.

Tools

Sources and further reading

  1. Exponential and logarithmic functions (Chapter 6, College Algebra 2e) (opens in a new tab), OpenStax, Rice University
  2. NIST Digital Library of Mathematical Functions, §4.2 Logarithm, Exponential, Powers: Definitions (opens in a new tab), National Institute of Standards and Technology

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?