Skip to content

Logarithm Calculator

Calculate logarithms with any base including natural log (ln), log base 10, and log base 2.

Logarithm Calculator tool

Loading...

Example

Input: Log base 2 of 1024 (log2)

Result: log2(1024) = 10 (log10 = 3.0102999566, ln = 6.9314718056)

Because 2^10 = 1,024, log2(1024) = 10. By change of base, ln(1024) / ln(2) = 6.9314718056 / 0.6931471806 = 10.

Common Logarithm Values

xlog10(x)ln(x)log2(x)
0.5-0.3010299957-0.6931471806-1
1000
20.30102999570.69314718061
e (2.71828...)0.434294481911.4426950409
80.9030899872.07944154173
1012.3025850933.3219280949
10024.6051701866.6438561898
100036.9077552799.9657842847
10243.01029995666.931471805610

Values from this calculator, rounded to 10 decimal places.

  1. Enter the value you want to find the logarithm of.
  2. Select the base: common log (base 10), natural log (ln), binary log (base 2), or enter a custom base.
  3. View the logarithm result along with log10, ln, and log2 of the same number for comparison.
  4. Review the change-of-base formula in the Formula section to understand the conversion.
  5. Click the copy button to copy the logarithm value.

What a Logarithm Tells You

A logarithm answers one question: what power do you raise the base to, to get this number? Since 10^3 = 1,000, log10(1000) = 3. This calculator finds logs in base 10, base e (the natural log, ln), base 2, or any base you choose. Whichever you pick, it also lists log10, ln and log2 side by side.

Each base has its own home. Base 10 counts orders of magnitude, so it shows up in pH, the Richter scale and decibels. The Decibel Calculator uses it. The natural log uses e, about 2.71828, and it is the one found in calculus and continuous growth. Base 2 counts doublings, so log2(1024) = 10 tells you 1,024 is 2 doubled 10 times.

Logs are how you solve for an exponent. How long does money take to double at 7% a year? Enter 2 as the number and 1.07 as a custom base, and you get about 10.24 years. How many times must you double 1 to pass 50? log2(50) is about 5.64, so the answer is 6.

For custom bases, the tool uses the change of base formula: log_b(x) = ln(x) / ln(b). The base must be positive and not equal to 1. The number must be greater than 0. The log of 1 is always 0, and numbers between 0 and 1 have negative logs. Results show up to 10 decimal places. To go back from a log to the number, raise the base to that power with the Exponent and Power Calculator.

Formula / How It Works

log_b(x) = y means b^y = x | Change of base: log_b(x) = ln(x) / ln(b) | ln(e) = 1 | log(10) = 1

Frequently Asked Questions

A logarithm is the exponent you need to raise a base to in order to get a number. Because 2^3 = 8, the log base 2 of 8 is 3. In symbols, log_b(x) = y means b^y = x. Logs turn multiplication into addition, which is why they were used for hand calculations before calculators existed.
They use different bases. log usually means base 10, ln is the natural log with base e (about 2.71828), and log2 uses base 2. Be careful: in many programming languages and some math books, log on its own means the natural log. The calculator labels each result, so you can see which base was used.
Use the change of base formula: log_b(x) = ln(x) / ln(b). For example, log base 3 of 81 is ln(81) / ln(3) = 4.3944 / 1.0986 = 4, since 3^4 = 81. In this calculator, choose Custom Base, enter 3 as the base and 81 as the number.
Not with real numbers. No power of a positive base ever gives 0 or a negative number, so those logs are undefined. As a number gets closer to 0, its log heads toward minus infinity. The calculator asks for a positive number instead of showing a result.
Take the log of both sides: x = log2(50). Enter 50 with the Binary Log option and you get about 5.6439. Check it with the power: 2^5.6439 is about 50. The same method solves growth questions, such as how many years a value takes to reach a target.

Related Tools

Exponent and Power Calculator

Calculate powers, exponents, and exponential expressions with support for any base and exponent.

Math and Numbers

Scientific Notation Converter

Convert between standard numbers and scientific notation with E-notation support.

Math and Numbers

Square Root and Nth Root Calculator

Calculate square roots, cube roots, and any nth root of a number with precision.

Math and Numbers

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any custom base.

Math and Numbers

Math Expression Evaluator

Evaluate arbitrary math expressions with variables, functions, and operator precedence. Multi-line support.

Math and Numbers

Angle Converter

Convert between degrees, radians, gradians, and turns for any angle measurement quickly.

Unit Converters