Math Calculators

Log Calculator

Use this log calculator to find the logarithm of a number for any base, including base 10, base 2, and the natural log (base e). Enter the number and the base to get the logarithm, or solve for the missing value in the equation log base b of x = y.

Primary answer
Logarithm
Inputs to verify
Number, Base, and Decimal places
Use type
Use as a direct calculation check.
Keyword intent
log calculator

Calculator

Log Calculator

Calculates logarithm from number, base, decimal places. Defaults are filled in so you can review a working example before changing inputs.

Positive finite number whose logarithm will be calculated.

Positive finite base other than 1. Use 10 for common log or e for natural log.

Final rounded result precision from 0 to 12 decimal places.

Result

Result reflects the current submitted inputs.

  • Risk A
  • Reviewed 2026-05-26
  • 2 sources
Logarithm3
Rounded logarithm3
  • Only real-valued logarithms are returned; complex logarithms are out of scope.
  • The number must be greater than 0.
  • The base must be greater than 0 and must not equal 1.
  • Intermediate values are not rounded before raw output normalization.
  • Rounded output uses symmetric half-away-from-zero rounding.

Accuracy notes

Risk level
A
Reviewed
2026-05-26
Sources
2
Primary result
Logarithm

Formula logic is kept in a pure calculator module with fixtures, source notes, and page-visible assumptions.

What the result means

The result is the exponent (power). A positive result means the number is larger than the base; a result between 0 and 1 means it sits between the base raised to 0 (which is 1) and the base itself; a negative result means the number is a fraction less than 1. Logarithms grow slowly, so large changes in the input produce small changes in the log, which is why log scales compress wide ranges of values.

LogarithmRaw logarithm normalized to 12 decimal places.
Rounded logarithmLogarithm rounded to the requested number of decimal places.

Use the result this way

  1. Start with Logarithm, then use supporting outputs for context.
  2. Verify Number, Base, and Decimal places before copying the result.
  3. Check the formula, example, and assumptions before reusing the answer.

User job

How to use this calculator

Use Log Calculator when you need logarithm, then use rounded logarithm to check the context for quick number work, classwork, spreadsheet checks, and explaining a calculation to someone else.

Best for

  • Checking the core numeric relationship
  • Comparing the main result with supporting outputs
  • Reviewing a default example before entering your own number and base.

Check before relying

  • Confirm sign, decimal, percent, and rounding assumptions before copying the number.
  • Only real-valued logarithms are returned; complex logarithms are out of scope.
  • The number must be greater than 0.
  • Source context: OpenStax, reviewed 2026-06-16.

Next useful step

Formula

A logarithm answers the question: what power must the base be raised to in order to get the number? If b^y = x, then log base b of x = y. For example, log base 10 of 1000 = 3 because 10^3 = 1000. Common bases are 10 (written log), e (written ln, about 2.71828), and 2 (the binary log). To compute a log in any base from a calculator that only has log and ln, use the change-of-base rule: log base b of x = ln x / ln b.

  • Three common bases: base 10 (common log, used in science and engineering), base e (natural log written ln, used in math, physics, and growth/decay), and base 2 (binary log, used in computer science and information theory).
  • Product rule: log b(x * y) = log b x + log b y. Quotient rule: log b(x / y) = log b x - log b y. Power rule: log b(x^n) = n * log b x. These turn multiplication into addition, which is what makes logs useful.
  • Change of base: log base b of x = ln x / ln b = log x / log b. This lets you compute a log in any base using only the log or ln button on a calculator.
  • log b(1) = 0 for any base (since b^0 = 1), and log b(b) = 1 (since b^1 = b). The logarithm of zero or a negative number is undefined.
  • Logarithms power many real-world scales: pH in chemistry, decibels for sound, the Richter scale for earthquakes, and stellar magnitude in astronomy all use log scales to handle very large ranges.

Inputs

Enter the number (the argument) you want the logarithm of, and the base. Use 10 for the common log, e for the natural log, or 2 for the binary log. The argument must be greater than zero, and the base must be positive and not equal to 1. The calculator returns the exponent that the base must be raised to in order to produce your number.

NumberPositive finite number whose logarithm will be calculated.
BasePositive finite base other than 1. Use 10 for common log or e for natural log.
Decimal placesFinal rounded result precision from 0 to 12 decimal places.

Example

log base 10 of 1000 = 3, because 10^3 = 1000. log base 2 of 8 = 3, because 2^3 = 8. The natural log ln(e) = 1, because e^1 = e. Using change of base, log base 5 of 100 = ln 100 / ln 5 = 4.605 / 1.609 = 2.861.

FAQ

What is a logarithm?

A logarithm is the inverse of exponentiation. The log base b of a number x is the exponent that b must be raised to in order to equal x. Since 10^3 = 1000, the log base 10 of 1000 is 3.

How do you calculate a log?

Ask what power the base must be raised to in order to give the number. For log base 2 of 8, since 2^3 = 8, the answer is 3. For bases your calculator lacks, use change of base: log base b of x = ln x / ln b.

What is the difference between log and ln?

log usually means base 10 (the common log), while ln means base e, where e is about 2.71828 (the natural log). They follow the same rules but use different bases, so log(100) = 2 but ln(100) is about 4.605.

How do you calculate log base 2?

Find the power of 2 that gives your number, or use change of base: log base 2 of x = ln x / ln 2. For example, log base 2 of 16 is 4, because 2^4 = 16.

What is the log of a negative number or zero?

The logarithm of zero or any negative number is undefined for real numbers, because no real exponent of a positive base produces zero or a negative result. The argument of a log must be greater than zero.

What is the change of base formula?

The change of base formula is log base b of x = ln x / ln b, or equivalently log x / log b. It lets you compute a logarithm in any base using the natural log or common log on a standard calculator.

Sources

Last reviewed: 2026-05-26

Disclaimer

This calculator is for educational and general mathematical use. Results are computed for real-valued logarithms with a positive argument and a valid base; logarithms of zero or negative numbers are undefined.