Skip to content
Test versionSearch

Mathematics

Logarithm and inverse power calculator

Calculate natural, base-10, base-2 or custom-base logarithms, or find the argument from a base and exponent, with a reverse check of the result.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. JSON, HTML and TXT downloads keep your inputs and all result rows; long integers keep every digit you entered. Automatic recalculation after editing is off unless you switch it on. Nothing is saved, imported or sent automatically.

Real logarithms require positive x, positive base and base≠1; bases below one are allowed. Calculations are floating-point approximations; the scientific value, inverse check and relative check error are reported. The fraction is an approximation, not an exact identity: search denominators up to the chosen bound 1–10000 using the raw result. Inverse exponents are limited to ±1000; overflow and nonzero underflow are refused. Press Calculate to update the result; TXT and CSV downloads are available. Automatic recalculation is off unless you switch it on; nothing is stored and no share link is created automatically.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Exact bounded integer powers or explicitly approximate floating-point roots/logarithms; formula and interpretations appear with the result. Real logarithms require positive x, positive base and base≠1; bases below one are allowed. Calculations are floating-point approximations; the scientific value, inverse check and relative check error are reported. The fraction is an approximation, not an exact identity: search denominators up to the chosen bound 1–10000 using the raw result. Inverse exponents are limited to ±1000; overflow and nonzero underflow are refused. Press Calculate to update the result; TXT and CSV downloads are available. Automatic recalculation is off unless you switch it on; nothing is stored and no share link is created automatically.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Operation
Base-2 logarithm
Argument x (>0)
8
Approximate fraction: maximum denominator (1–10000)
1000

Result

Result
3
Logarithm base
2
Argument x, or angle in radians for roots
8
Exponent
3
Reconstructed argument
8
Relative reverse-check error
0
Scientific notation (leading digits for exact integers)
3.000000000000e+0
Approximate fraction (not exact)
3/1

Frequently asked questions

How do I calculate a logarithm with any base?

The logarithm calculator offers ln, base-10, base-2 and a custom base. It uses log_b(x) = ln(x)/ln(b), so any positive base other than 1 works, including bases below one.

How do I get the argument back from a base and an exponent?

Choose the inverse power operation and enter the base and exponent. The calculator reconstructs the argument as x = b^y. Inverse exponents are limited to plus or minus 1000, and overflow or nonzero underflow is refused.

Why does the logarithm need a positive argument?

Real logarithms are only defined for a positive argument x and a positive base that is not equal to 1. The logarithm calculator refuses other inputs rather than returning a complex or undefined value.

Is the logarithm result exact?

No. Logarithms and roots are calculated as floating-point approximations. The result is shown with a scientific value, an inverse check and the relative reverse-check error so you can judge the precision.

What is the approximate fraction shown with a logarithm?

It is a fraction close to the raw result, found by searching denominators up to a bound you choose between 1 and 10000. It is an approximation, not an exact identity, so log2(8) appears as 3/1 while irrational results only come close.

How many decimal places can the logarithm result show?

You can choose between 0 and 12 decimal places for the numeric display. Integer text remains exact, while decimal values keep the approximation of the calculation engine.

What is log base 2 of 8?

The worked example in the logarithm calculator uses base 2 and x = 8. The result is 3, the reconstructed argument is 8 and the relative reverse-check error is 0.