Skip to content

Exponent & Logarithm Calculator (log, ln)

Calculate exponents (powers), square and nth roots, and logarithms: log base 10, ln (the natural log, base e) or a log in any base, with steps.

Calculator Details

Square Root:4See results ↓

Square root, nth root, power, common log (base 10), natural log (base e) or log in any base

Number to find the square root of

Your Results

Square Root: 4

Square Root

4

Exact result

Result Details

Result Type

Exact

The result is mathematically exact

Precision

12 significant digits

Results are rounded to 12 significant digits

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Your calculation: Square Root
PartValue
OperationSquare Root
Value16
Result4
Exact?Yes, exact

How This Calculator Works

How Exponents and Logarithms Work

Your calculation: Square Root

√16
= 16^(1/2)
= 4

Square Root & Nth Root

√x = x^(1/2)
ⁿ√x = x^(1/n)

Example: √16 = 4 because 4² = 16
Example: ³√27 = 3 because 3³ = 27

Exponentiation

base^exponent

Example: 2³ = 2 × 2 × 2 = 8
Example: 5⁻² = 1/(5²) = 1/25 = 0.04
Example: 4^0.5 = √4 = 2

Logarithms

log_a(x) = y means a^y = x
log_a(x) = ln(x) / ln(a)

Common log: log₁₀(100) = 2 because 10² = 100
Natural log: ln(e) = 1 because e¹ = e
Binary log: log₂(8) = 3 because 2³ = 8

Frequently Asked Questions

What is the difference between square root and nth root?

Square root is a specific case of nth root where n=2. The nth root allows you to specify any degree: cube root (n=3), fourth root (n=4), etc. For example, the 3rd root of 27 is 3 because 3³ = 27.

Can I take the square root of a negative number?

Not in real numbers. The square root of a negative number requires complex numbers (imaginary numbers). However, odd roots (like cube root) can be taken of negative numbers: ³√(-8) = -2.

What does a negative exponent mean?

A negative exponent means reciprocal. For example, 5⁻² = 1/(5²) = 1/25 = 0.04. Any number to the power of -n equals 1 divided by that number to the power of n.

What does a fractional exponent mean?

A fractional exponent represents a root. For example, x^(1/2) = √x, and x^(1/3) = ³√x. More generally, x^(m/n) = ⁿ√(x^m). So 8^(2/3) = ³√(8²) = ³√64 = 4.

What is the difference between log and ln?

log (common logarithm) uses base 10, while ln (natural logarithm) uses base e (approximately 2.718). log₁₀(100) = 2, while ln(e) = 1. Natural logarithms are used extensively in calculus and exponential growth/decay.

Why can't I take the logarithm of 0 or negative numbers?

Logarithms are only defined for positive numbers because you cannot raise any positive base to any power and get 0 or a negative number. For example, there is no value of x where 10^x = 0 or 10^x = -5.

What does it mean when a result is marked as "exact"?

An exact result is the precise answer with no rounding: √16 = 4, 2⁻¹⁰ = 0.0009765625, log₂(8) = 3. Everything else (√2, log₁₀(50), ln(10)) is irrational and is shown rounded to 12 significant digits, e.g. √2 ≈ 1.41421356237.

How precise are the results?

Integer powers are worked out exactly with decimal arithmetic and then shown to 12 significant digits, so 3⁴⁰ shows as 1.21576654591 × 10¹⁹. Roots and logarithms use double-precision maths (about 15–16 correct digits) and are rounded to 12 significant digits, which hides floating-point noise such as 2.9999999999999996.

Why can't I raise a negative number to a fractional power?

A fractional power is a root: (-8)^0.5 would be the square root of -8, which is not a real number. Use a whole-number exponent with a negative base, or use the nth root with an odd degree (the cube root of -8 is -2).

Real numbers only: square and nth roots (degree 1–100), powers (exponent -1,000 to 1,000) and logarithms in base 10, e or any positive base other than 1. Integer powers are exact; roots and logarithms are rounded to 12 significant digits. Not included: complex results (roots of negative numbers), fractional powers of negative numbers and results larger than about 1.8 × 10³⁰⁸.

Exponent and Logarithm Calculator: Powers, Roots and Logs Explained

By FindMySum · Last reviewed

An exponent and logarithm calculator handles the operations a basic calculator leaves out: raising a number to a power, taking square roots and higher roots, and finding logarithms: log (base 10), ln (the natural logarithm, base e) or a log in any base you choose. These are all the same idea seen from different sides. A power asks what you get when you multiply a base by itself a number of times; a root asks which base produces a given result; a logarithm asks how many times you need to multiply. This article explains how the three connect, how the calculator works each one out, and where the answers turn up outside a math class.

Powers, roots and logarithms are one relationship

Start with 2³ = 8. That single fact can be read three ways:

  • Power: 2 raised to the 3rd power is 8.
  • Root: the cube root of 8 is 2.
  • Logarithm: log base 2 of 8 is 3, because 3 is the exponent that turns 2 into 8.

Roots are powers with fractional exponents: the square root of x is x to the power 1/2 and the nth root is x to the power 1/n. Logarithms are the inverse of powers: if b to the power y equals x, then log base b of x equals y.

The rules that make them work

RulePowersLogarithms
Productbᵐ × bⁿ = bᵐ⁺ⁿlog(xy) = log x + log y
Quotientbᵐ ÷ bⁿ = bᵐ⁻ⁿlog(x ÷ y) = log x − log y
Power(bᵐ)ⁿ = bᵐⁿlog(xⁿ) = n × log x
Zerob⁰ = 1log 1 = 0
Negativeb⁻ⁿ = 1 ÷ bⁿlog(1 ÷ x) = −log x

The logarithm rules are why logarithms were invented. Before electronic calculators, John Napier's tables (1614) and the slide rule let people multiply large numbers by adding their logarithms.

The calculator uses one more rule constantly, the change of base formula: log base b of x = ln x ÷ ln b. Any logarithm can be found from natural logarithms, so the calculator computes the common log and any-base log this way and shows the step.

How the calculator works each one out

  • Integer powers (whole-number exponents up to 1,000) are calculated exactly in decimal arithmetic and then shown to 12 significant digits. A negative exponent becomes a reciprocal: 5 to the power −2 is 1 ÷ 25 = 0.04.
  • Fractional powers, roots and logarithms come from double-precision floating point (the IEEE 754 format, good to about 15 to 16 digits) and are rounded to 12 significant digits, which removes trailing noise like 2.9999999999999996.
  • Exactness is checked rather than assumed. A result is flagged exact only when it reverses perfectly: a root raised back to its power gives the value you typed, or the base raised to a whole-number log gives the value back.

Some inputs have no real answer, and the calculator says so instead of guessing: the square root (or any even root) of a negative number, a negative base with a fractional exponent, 0 to a negative power, and the logarithm of 0 or of a negative number.

Worked example: the calculator's defaults

The calculator opens on the square root of 16.

  1. The square root of 16 is the same as 16 to the power 1/2.
  2. 4 × 4 = 16, so the answer is 4.
  3. Squaring 4 gives back exactly 16, so the result is marked exact.

The other operations start from their own defaults. Switch to exponent and the calculator uses a base of 2 and an exponent of 3: 2³ = 2 × 2 × 2 = 8, also exact.

Three logarithms

  • Any base: log base 2 of 1024. The calculator shows ln(1024) ÷ ln(2) = 6.9314718056 ÷ 0.69314718056 = 10, exact because 2¹⁰ = 1,024.
  • Common log: log₁₀(50) = 1.69897000434. This is not exact: 50 is not a whole power of 10, so the answer is irrational and rounded. It makes sense because 50 sits between 10 (log 1) and 100 (log 2).
  • Natural log: ln(2) = 0.69314718056, the constant behind every doubling-time calculation.

The square root of 2 is a good reminder of what "rounded" means: the calculator shows 1.41421356237, and the digits after that go on forever without repeating.

Where these operations turn up

  • Compound growth. A balance growing at a fixed rate is multiplied by the same factor every period, so it follows a power. The compound interest calculator applies this with deposits and compounding frequency; this calculator can answer the inverse question of how many periods a target takes.
  • Scientific notation. A number like 6.02 × 10²³ is a power of 10. The common logarithm tells you the order of magnitude: log₁₀ of any number from 100 to 999 starts with 2.
  • Scales that compress huge ranges. pH, decibels, stellar magnitudes and earthquake magnitudes are logarithmic so that a range of a billion fits on a scale of about nine steps.
  • Computing. Powers of 2 size memory and storage, and base-2 logarithms count the bits or the halving steps in a binary search. The number system converter shows numbers in binary directly.

What to watch for

Twelve significant digits is plenty for most work, but extreme inputs can run past what a double-precision number holds. Results larger than about 1.8 × 10³⁰⁸ are reported as too large rather than as infinity. Rounding in the inputs carries through as well: log₁₀ 2 is 0.30102999566…, so 10 to the power 0.30103 gives 2.00000001997 and 10 to the power 0.301 gives 1.99986186963, neither of them exactly 2. When you chain results, keep as many digits as you can until the last step, and use the significant figures calculator to round the final answer to the precision of your data.

More questions

How do I find how many periods it takes for something to double?

Use a logarithm with the growth factor as the base. Something growing 5% per period is multiplied by 1.05 each time, so the number of periods to double is log base 1.05 of 2. Choose the any-base logarithm, enter 2 as the value and 1.05 as the base, and the calculator gives 14.2066990829 periods. The rule of 72 (72 ÷ 5 = 14.4) is a quick approximation of the same answer.

Why is any number to the power of zero equal to 1?

Because of how powers divide. 2³ ÷ 2³ must equal 1, and by the rule that you subtract exponents when dividing, it also equals 2⁰. The same argument works for any non-zero base, so every non-zero number to the power 0 is 1. It also keeps the pattern 2³ = 8, 2² = 4, 2¹ = 2, 2⁰ = 1 going, halving at each step.

What does the calculator give for 0 to the power of 0?

It gives 1, the convention used in algebra, combinatorics and most programming languages, including the IEEE 754 pow function. Some calculus texts leave 0⁰ undefined because the limit of x to the power y depends on how x and y approach zero. For polynomial and counting problems, 1 is the value you want.

What is e, and why is it called the natural base?

The number e, about 2.718281828, is the limit of (1 + 1/n) to the power n as n grows without end. It is what one dollar grows to in a year at 100% interest compounded continuously. It is natural because the function e to the power x is its own rate of change, which makes calculus with base e far simpler than with any other base.

How are logarithms used in pH, decibels and earthquake scales?

Each is a base-10 logarithm, so every step of 1 is a factor of 10. pH is the negative log of hydrogen ion concentration, so pH 4 is ten times more acidic than pH 5. Sound level in decibels is 10 × log of an intensity ratio, so +10 dB is ten times the intensity. Earthquake magnitude scales grow by a factor of about 32 in energy per whole step.

What does log base 2 tell me about bits?

The base-2 logarithm of a count tells you how many binary digits you need to label that many things. log₂(1024) = 10, so 10 bits can number 1,024 different items. When the result isn't whole, round up: 1,000 items still need 10 bits because log₂(1000) is about 9.97.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy