Exponent, Root and Logarithm Calculator

Powers, roots and logarithms in any base, exact wherever an exact answer exists, with the steps shown.

Inputs

These are example values. Change any of them to calculate your own.

Try:
Calculate

xʸ, ⁿ√x, log base b of x, or the y in bʸ = x. Each undoes another: 2⁵ = 32, ⁵√32 = 2 and log₂ 32 = 5.

Like 2, −8, 1.5, 3/4 or e.

Like 3, −2, 0.5 or 2/3.

Answer format

For decimals; 10 if blank.

Automatic or scientific.

Results

12 to the power 3/2

41.56921938

Rounded to 10 significant figures. Exact value: 24√3.

Simplest radical form
24√3
Scientific notation
4.156921938 × 10¹
Digits before the decimal point
2Leading zeros not counted.

How this was calculated

  1. An exponent 3/2 means the square root, then the power 3: 123/2 = (√12)3.
  2. Write it as one root: 123/2 = √(123) = √1,728.
  3. Pull out the largest perfect square: 1,728 = 242 × 3, so √1,728 = 24√3.
  4. 123/2 = 24√3 ≈ 41.56921938.
  5. In a spreadsheet: =POWER(12, 3/2)
Powers of 12 near your exponent
ExponentExact formValue
−3/2√3/720.02405626122
−1/2√3/60.2886751346
1/22√33.464101615
3/2 (yours)24√341.56921938
5/2288√3498.8306326
7/23,456√35,985.967591
9/241,472√371,831.61109
The curve y = 12ˣ
The curve y = 12ˣThe curve y = 12ˣ rises as x increases and passes through your result at x = 1.5, y = 41.57.0100200300400500-1012Your result
Chart data: The curve y = 12ˣ
The curve y = 12ˣ
Pointx (exponent)y = 12ˣ
Your result1.541.57

Assumptions

  • Exponents are read exactly: a decimal such as 0.75 is the fraction 3/4, and p/q means the q-th root raised to the power p.
  • A negative base has a real power only when the exponent in lowest terms has an odd denominator. Otherwise the principal complex value is shown for information.
  • Decimals are rounded (half up) to 10 significant figures from a calculation carried well past the 30 figures the page can show; exact forms are not rounded.

Calculated in your browser. This site doesn't send or store the numbers you enter.

Updated Report a problem with this calculator

What you can work out here

This calculator finds a power xyx^y, an nth root xn\sqrt[n]{x}, a logarithm log⁡bx\log_b x in any base, or the exponent yy that solves by=xb^y = x. The four are inverses of one another: 25=322^5 = 32, 325=2\sqrt[5]{32} = 2 and log⁡232=5\log_2 32 = 5 describe the same fact from three sides. Answers are exact whenever an exact answer exists and fits on the page (whole numbers with every digit, fractions, simplest radical forms such as 626\sqrt{2}, and logarithms such as log⁡48=3/2\log_4 8 = 3/2). Otherwise they are decimals rounded to the number of significant figures you choose. When there is no real answer, the result says so and explains why instead of showing an error.

How to use it

Choose what to Calculate (Power, Root, Log or Solve bʸ = x) and type the numbers. The answer updates as you type.

  • Base and Exponent (Power): each box takes a whole number, a decimal, a fraction such as 2/3 or -1/2, a mixed number such as 2 1/2, or scientific notation such as 1.2e-5. The base can also be e, for powers of Euler’s number. Write a negative base as -8 or (-8).
  • Which root and Number (Root): square and cube roots have their own buttons; Other index asks for nn.
  • Log base and Number (Log): base 10, base ee and base 2 are buttons; Other base opens the Base box.
  • Base and Number (Solve bʸ = x): bb and xx.
  • Answer format: significant figures (1 to 30; 10 when left blank) and automatic or scientific notation.

The Try chips load cases from this page. Under each answer are the steps with your numbers, a table of neighboring powers or roots with a CSV download, and the curve through your answer. Switching modes keeps your numbers, so after log⁡21,000,000\log_2 1{,}000{,}000 you can press Solve and see the same answer as the exponent in 2y=1,000,0002^y = 1{,}000{,}000.

How to calculate exponents, including negative and fractional powers

A whole-number exponent counts repeated multiplication, a negative exponent takes the reciprocal, and a fractional exponent p/qp/q takes the qqth root and then the ppth power:

xn=x×x×⋯×x⏟n,x−n=1xn,xp/q=(xq)p=xpq,x0=1x^n = \underbrace{x \times x \times \cdots \times x}_{n}, \qquad x^{-n} = \frac{1}{x^n}, \qquad x^{p/q} = \left(\sqrt[q]{x}\right)^p = \sqrt[q]{x^p}, \qquad x^0 = 1
  • xx is the base and nn a whole number;
  • p/qp/q is the exponent as a fraction in lowest terms.

So 25=322^5 = 32, 5−3=1/53=1/125=0.0085^{-3} = 1/5^3 = 1/125 = 0.008, and 82/3=(83)2=22=48^{2/3} = (\sqrt[3]{8})^2 = 2^2 = 4. The calculator reads an exponent typed as a decimal as the exact fraction it stands for: 0.75 is 3/4, 0.2 is 1/5, and 0.3333 is 3,333/10,000, not 1/3. For positive bases that only matters in the last digits, but for negative bases it decides whether there is an answer at all (see below).

Worked example: 12 to the power 3/2

Enter Base 12 and Exponent 3/2.

  1. The exponent 3/2 means the square root, then the cube: 123/2=(12)312^{3/2} = (\sqrt{12})^3.
  2. Write it as one root: 123/2=123=1,72812^{3/2} = \sqrt{12^3} = \sqrt{1{,}728}.
  3. Pull out the largest perfect square: 1,728=242×31{,}728 = 24^2 \times 3, so 1,728=243\sqrt{1{,}728} = 24\sqrt{3}.
  4. As a decimal to 10 significant figures: 243≈41.5692193824\sqrt{3} \approx 41.56921938.

The table shows the neighboring powers of 12 at 1/2, 5/2 and so on, each 12 times the one before. Switch modes and the same numbers answer the inverse questions: Root gives 1,728=243\sqrt{1{,}728} = 24\sqrt{3} again, and Log and Solve keep the base 12 and give log⁡121,728=3\log_{12} 1{,}728 = 3, the exponent in 123=1,72812^3 = 1{,}728.

How to find a square root, cube root or nth root

The nth root of xx is the number that gives xx when raised to the power nn; it equals x1/nx^{1/n}. The root sign always means the principal root. For an even index that is the root that is 0 or more: 9=3\sqrt{9} = 3, even though (−3)2=9(-3)^2 = 9 as well. For an odd index the root has the same sign as the number, so −273=−3\sqrt[3]{-27} = -3.

A perfect power has an exact root, which the calculator gives as a whole number or fraction. Anything else has an irrational root, shown in simplest radical form and as a rounded decimal.

Simplifying roots: simplest radical form

To simplify mn\sqrt[n]{m}, split mm into a perfect nth power times a leftover with no nth-power factor, then take the root of the perfect power:

  • 72=62×272 = 6^2 \times 2, so 72=62≈8.485281374\sqrt{72} = 6\sqrt{2} \approx 8.485281374.
  • 54=33×254 = 3^3 \times 2, so 543=323≈3.779763150\sqrt[3]{54} = 3\sqrt[3]{2} \approx 3.779763150.
  • 1/2=2/4=2/2\sqrt{1/2} = \sqrt{2}/\sqrt{4} = \sqrt{2}/2 (about 0.7071067812), which clears the root from the denominator.

The steps show the split the calculator used, so you can check it against your own factoring.

How to calculate a logarithm in any base (change of base)

log⁡bx\log_b x is the exponent that turns bb into xx: log⁡bx=y\log_b x = y means by=xb^y = x. The base must be greater than 0 and not 1, and xx must be greater than 0. For any base, divide natural logs:

log⁡bx=ln⁡xln⁡b\log_b x = \frac{\ln x}{\ln b}

For log⁡21,000,000\log_2 1{,}000{,}000:

log⁡21,000,000=ln⁡1,000,000ln⁡2=13.815510560.6931471806≈19.93156857\log_2 1{,}000{,}000 = \frac{\ln 1{,}000{,}000}{\ln 2} = \frac{13.81551056}{0.6931471806} \approx 19.93156857

That fits between whole powers: 219=524,2882^{19} = 524{,}288 and 220=1,048,5762^{20} = 1{,}048{,}576.

Some logarithms are exact fractions, and the calculator finds them. log⁡48=3/2\log_4 8 = 3/2, because 8=238 = 2^3 and 4=224 = 2^2, so 8=43/28 = 4^{3/2}. Likewise log⁡100.001=−3\log_{10} 0.001 = -3.

Natural log (ln) vs common log (log)

They are the same idea in different bases. The natural log, ln, uses base e≈2.718281828e \approx 2.718281828; the common log, usually written log, uses base 10. So ln⁡20≈2.995732274\ln 20 \approx 2.995732274 while log⁡1020≈1.301029996\log_{10} 20 \approx 1.301029996, and the two always differ by the same factor, ln⁡10\ln 10. In some computer science writing a bare “log” means base 2 instead, so check which base a formula assumes. In a spreadsheet, =LN(x) is the natural log and =LOG(x, base) works in any base, using base 10 when you leave the base out.

An antilog undoes a log: the antilog of 2.5 in base 10 is 102.5≈316.227766010^{2.5} \approx 316.2277660, and the natural antilog of 1.5 is e1.5≈4.481689070e^{1.5} \approx 4.481689070. Use Power with base 10 or e.

Solving for an exponent: bʸ = x

Taking logs of both sides gives y=log⁡bx=ln⁡x÷ln⁡by = \log_b x = \ln x \div \ln b. This answers “how many times do I multiply by bb to reach xx?”

  • Doublings to reach 1,000,000: 2y=1,000,0002^y = 1{,}000{,}000 gives y≈19.93156857y \approx 19.93156857, so 20 whole doublings are needed (220=1,048,5762^{20} = 1{,}048{,}576).
  • Growth of 7% per step: 1.07y=21.07^y = 2 gives y≈10.24476835y \approx 10.24476835. After 10 steps the total is 1.0710≈1.9671513571.07^{10} \approx 1.967151357, short of double; the 11th step reaches 1.0711≈2.1048519521.07^{11} \approx 2.104851952.

When the answer is between 0 and 24, the table in Solve mode lists every whole power from b0b^0 up to one past the answer, so you can see the step where xx is passed; otherwise it shows the eight whole powers around the answer.

When there is no real answer (negative roots, log of zero)

  • Even roots of negative numbers. No real number squared is negative, so −9\sqrt{-9} has no real value. The calculator says so and gives the complex value for information: −9=3i\sqrt{-9} = 3i, where i=−1i = \sqrt{-1}.
  • Negative bases with fractional exponents. A real answer exists only when the exponent in lowest terms has an odd denominator: (−8)1/3=−2(-8)^{1/3} = -2 and (−8)0.2=−85≈−1.515716567(-8)^{0.2} = -\sqrt[5]{8} \approx -1.515716567, because 0.2 is 1/5. But 0.3333 is 3,333/10,000, whose denominator is even, so (−8)0.3333(-8)^{0.3333} has no real value (its principal complex value is about 1.000112050+1.731826033i1.000112050 + 1.731826033i). If you meant the cube root, type 1/3.
  • Logarithms of 0 and of negative numbers. No power of a positive base is 0 or negative, so log⁡b0\log_b 0 has no value at all and log⁡2(−8)\log_2(-8) has no real value (its principal complex value is 3+4.532360142i3 + 4.532360142i).
  • Base 1, or a base of 0 or less, in Log and Solve, and 0 to a negative power, which would mean dividing by 0: these can’t be calculated, and the message under the box says why.

What is 0 to the power of 0?

This calculator gives 00=10^0 = 1 and adds a note. That value keeps the binomial theorem working, which is Donald Knuth’s argument for it in the paper listed in the sources. Some algebra courses, including the OpenStax text in the sources, leave 000^0 without a value, and in calculus it is an indeterminate form: when a base and an exponent both only approach 0, the limit can come out as any number. So if your course leaves 000^0 without a value, follow your course.

Very large and very small results

Whole-number results are exact up to about 30,000 digits, listed in full with a button that copies them. For 21002^{100} that is all 31 digits:

2100=1,267,650,600,228,229,401,496,703,205,3762^{100} = 1{,}267{,}650{,}600{,}228{,}229{,}401{,}496{,}703{,}205{,}376

Above about 1.8×103081.8 \times 10^{308}, ordinary double-precision arithmetic overflows to Infinity. When a result that large is too long to list, or isn’t a whole number or fraction at all (such as 71,000.57^{1{,}000.5}), the calculator works with its logarithm instead. For 21,000,0002^{1{,}000{,}000}:

log⁡1021,000,000=1,000,000×log⁡102≈301,029.9957\log_{10} 2^{1{,}000{,}000} = 1{,}000{,}000 \times \log_{10} 2 \approx 301{,}029.9957

The whole part of the logarithm gives the power of ten, and 10 raised to the rest gives the leading digits, so the result is about 9.900656229×10301,0299.900656229 \times 10^{301{,}029}.

Reading the result

  • The answer is exact when it says so; otherwise it is rounded to your significant figures. Irrational roots also show their simplest radical form.
  • The tiles add the exact form, scientific notation, the negative square root, the digit count, or the same number in other log bases, depending on the mode.
  • The steps show the method with your numbers and end with the spreadsheet formula that does the same calculation.
  • The table gives nearby powers (Power), roots of your number from square to 10th (Root), or whole powers of the base around your number (Log and Solve).
  • The check puts the rounded answer back in, so it can differ from your number in the last few digits, more so when the answer is a large number.

Assumptions and limitations

  • Only real numbers count as answers. Complex values appear for information only.
  • Decimals are rounded half up from a calculation carried well past the 30 figures the page can show, so the last figure shown is correctly rounded; exact forms are never rounded.
  • Exponents are limited to ±1,000,000,000 and root indexes to 1,000. Simplest radical form is found for numbers under the root up to about 9 × 10¹⁵; above that the calculator gives the decimal only.
  • The calculator works one operation at a time. For expressions such as 3×24−13 \times 2^4 - 1, use a scientific calculator.

Common mistakes

  • Reading −32-3^2 as (−3)2(-3)^2. Order of operations applies the exponent first, so −32=−(32)=−9-3^2 = -(3^2) = -9, while (−3)2=9(-3)^2 = 9. Type a negative base as -3 (or (-3)) to mean (−3)2(-3)^2.
  • Typing 0.333 for 1/3. With a positive base the difference is small, but with a negative base it removes the real answer; the Exponent box warns you when it spots this.
  • Forgetting the negative square root. 72\sqrt{72} is the positive root, 8.485281374; when solving x2=72x^2 = 72, x=−8.485281374x = -8.485281374 works too.
  • Mixing up log and ln. A result that is off by a factor of about 2.302585093 means one of the two used base ee and the other base 10.
  • Dividing instead of taking a root. 641/264^{1/2} is 64=8\sqrt{64} = 8, not 64÷2=3264 \div 2 = 32.

Questions

How do I multiply or divide powers with the same base?

Add the exponents to multiply and subtract them to divide: 2³ × 2⁴ = 2⁷ = 128, and 2⁷ ÷ 2³ = 2⁴ = 16. Raising a power to a power multiplies the exponents: (2³)² = 2⁶. These rules need the same base; 2³ × 3⁴ has no shortcut.

Can a logarithm be negative?

Yes. With a base above 1, the log of any number between 0 and 1 is negative, because it takes a negative power to get there. For example, log₁₀ 0.5 ≈ −0.3010299957, since 10 to that power is 0.5. What can’t be negative is the number you take the log of.

What is log 1 in any base?

0. Every allowed base raised to the power 0 is 1, so the log of 1 is 0 in any base greater than 0 other than 1. Likewise the log of the base itself is always 1, since b¹ = b.

Sources

  1. College Algebra 2e, 1.2 Exponents and Scientific Notation OpenStax (Rice University) The product, quotient and power rules, the zero exponent rule (a to the power 0 is 1 for nonzero a, with 0 to the power 0 left without a value in that course), the negative exponent rule (a to the power −n is 1 over a to the power n) and scientific notation.
  2. College Algebra 2e, 1.3 Radicals and Rational Exponents OpenStax (Rice University) Principal square roots and principal nth roots (the root with the same sign as the number), the index and the radicand, odd roots of negative numbers, simplifying radicals by factoring out perfect powers, rationalizing denominators, and rational exponents as roots.
  3. College Algebra 2e, 2.4 Complex Numbers OpenStax (Rice University) The imaginary unit i as the square root of −1 and square roots of negative numbers written as multiples of i, using the principal root.
  4. College Algebra 2e, 6.3 Logarithmic Functions OpenStax (Rice University) log base b of x = y means b to the power y = x, bases greater than 0 and not 1, no real logarithm of 0 or of a negative number, the common log (base 10, written log) and the natural log (base e, written ln), and log meaning base 2 in some computer science writing.
  5. College Algebra 2e, 6.5 Logarithmic Properties OpenStax (Rice University) log base b of 1 is 0 and log base b of b is 1, the product, quotient and power rules for logarithms, and the change-of-base formula log base b of M = ln M ÷ ln b.
  6. Two Notes on Notation Donald E. Knuth, arXiv:math/9205211 (1992) Why 0 to the power 0 should be 1 (the binomial theorem needs it), and why Cauchy was right to list it among indeterminate limiting forms when both parts only approach 0.
  7. College Algebra 2e, 1.1 Real Numbers: Algebra Essentials OpenStax (Rice University) Exponential notation (a to the power n as n factors of a) and the order of operations, with exponents before multiplication.
  8. Number.MAX_VALUE MDN Web Docs (Mozilla) The largest double-precision number, about 1.7976931348623157 × 10^308; larger values become Infinity.
  9. POWER function Microsoft Support POWER(number, power) raises a base to a power; the ^ operator does the same.
  10. EXP function Microsoft Support EXP(number) returns e raised to that power, with e = 2.71828182845904.
  11. LN function Microsoft Support LN(number) returns the natural logarithm of a positive number.
  12. LOG function Microsoft Support LOG(number, base) returns the logarithm in any base, and base 10 when the base is left out.