Exponent & Logarithm Calculator
Calculate a power (a to the power b) or a logarithm (the log of b to base a). The result is labeled as an exact value or a rounded value.
Powers and logarithms
- Power a^b: a multiplied by itself b times (when b is a whole number). a^0 = 1, and a negative whole exponent gives a^(−n) = 1 ÷ a^n.
- Logarithm log_a b: the number x such that a^x = b. It is the inverse of taking a power. A logarithm with base 10 is the common logarithm, and one with base e (Euler's number, about 2.71828) is the natural logarithm (ln).
What can be calculated (real numbers only)
| Calculation | Condition | Result |
|---|---|---|
| Power | b is a whole number | Works for any a (except a = 0 with a negative b, which would divide by 0) |
| Power | b is not a whole number (decimal or fraction) | Only when a is greater than 0. With a negative a the result is not defined in the real numbers (this calculator does not compute odd roots such as (−8)^(1/3) = −2 either). If a = 0, the result is 0 for a positive b and not available for a negative b |
| 0⁰ | a = 0 and b = 0 | This calculator defines 0⁰ as 1. In calculus it is an indeterminate form, and some references leave it undefined |
| Logarithm | a is greater than 0 and not 1; b is greater than 0 | Works |
| Logarithm | a = 1 | Not available (1 to any power is 1, so x is not determined) |
| Logarithm | a or b is 0 or negative | Not defined in the real numbers |
Exact values and rounded values
- Exact value: a power with a whole-number exponent (integer, decimal or fraction base) is calculated exactly with fractions and integers, as long as the result has 1,000 digits or fewer (2^10 = 1,024, 1.5^2 = 9/4, 10^−3 = 1/1000). A logarithm is exact only when the argument is a whole-number power of the base (log₂ 8 = 3, log₁₀ 0.001 = −3). This is decided by comparing integer powers, not by checking whether a floating-point result looks like a whole number.
- Rounded value: everything else (decimal or fractional exponents, base e, logarithms that are not whole numbers) is computed with floating-point arithmetic and rounded to 12 significant digits. The screen shows 7 significant digits.
- Powers with more than 1,000 digits are not written out in full. They are shown as "about m × 10^e (n digits)", which is an approximation.
- If a floating-point result would be larger than 10^300 or smaller than 10^−300 (but not 0), the calculator does not compute it, and it never rounds such a result to 0.
- To avoid heavy calculations, whole-number exponents are limited to ±10,000 and other exponents to ±1,000,000.
Examples
| Input | Result |
|---|---|
| 2 to the power 10 | 1,024 (exact value) |
| −2 to the power 3 | −8 (exact value) |
| 10 to the power −3 | 0.001 (exact value) |
| 2 to the power 0.5 | about 1.414214 (rounded value) |
| e to the power 1 | about 2.718282 (rounded value) |
| log₂ 8 | 3 (exact value) |
| log₁₀ 1000 | 3 (exact value) |
| log₁₀ 5 | about 0.69897 (rounded value) |
| ln 10 (base e, argument 10) | about 2.302585 (rounded value) |
Notes
- Complex numbers, logarithms of negative numbers, graphs and chained expressions are not covered.
- To compare two values as a percentage, use the Percentage Change Calculator. To work with the greatest common divisor of whole numbers, use the GCD & LCM Calculator.
Frequently asked questions
Why is 0 to the power 0 equal to 1 here?
In combinatorics and algebra it is common to define 0⁰ = 1. In calculus it is often treated as an indeterminate form. This calculator defines it as 1 and says so on the page.
What is a negative number to the power 0.5?
It is not defined in the real numbers (the answer would be a complex number), so the calculator does not compute it.
Why is my logarithm a "rounded value"?
Most logarithms are irrational numbers, which have no finite or repeating decimal form. Only when the argument is a whole-number power of the base is the answer exact.