Skip to main content

Logarithms & exponentials

Log Calculator – Calculate Log Base, Natural Log & More

Enter any number and base to instantly calculate its logarithm. This log calc supports common log (base 10), natural log (base e), binary log (base 2), and any custom log base, with step-by-step inverse proof and change of base formula.

Logarithm

Choose a base and enter a positive number. The result is the exponent: by = x means logb(x) = y.

Result
log10(100) = 2

The exponent y such that by = x.

Inverse proof

Logarithm and exponent are inverses:

102 = 100

Check: 102 ≈ 100.000000

Worked Examples

Use the calculator above: choose common log (base 10), natural log (base e), binary log (base 2), or custom base, and enter a positive number. Definitions (characteristic, mantissa), log laws, and change of base are in the article below. All calculations run locally.

Worked Examples

Custom base example

log₅(125) = 3, because 5³ = 125. Select "Custom base," enter base 5 and number 125 to verify, the calculator will show the change of base steps: ln(125) / ln(5) = 3.

Common log example

log₁₀(1000) = 3, because 10³ = 1000. Useful for pH and decibel calculations.

Natural log example

ln(e²) = 2. Select "Natural log" and enter 7.389 (≈ e²) to see the result.

Log Calculator: Common, Natural, Binary & Custom Base

Free log calculator: common log (base 10), natural log ln(x), binary log base 2, and custom base. Inverse proof on every result; change-of-base numeric steps in Custom mode. Characteristic, mantissa, and log laws. No sign-up; runs locally.

What This Calculator Does & Who It's For

Calculator Purpose & Ideal Users

This log calculator computes logarithms for base 10 (common log), base e (natural log), base 2 (binary log), and any custom base. It shows the result (up to 10 decimal places), the inverse proof (by = x), and for custom base the change of base formula steps using ln(x) / ln(b).
  • What You'll Get:
    Result: logb(x) = y. Inverse proof: Displays by = x. Change of base: For custom base, shows logb(x) = ln(x) / ln(b) with numeric steps. Domain validation: Explains when the number or base is invalid (x ≤ 0, base ≤ 0 or base = 1).
  • Scope & Limits:
    Positive numbers only (x > 0). Base must be positive and not equal to 1. Results within JavaScript floating-point range. All calculations run in your browser; no data is sent to servers.

How to Use This Calculator

Select a logarithm type. Common (base 10), Natural (base e), Binary (base 2), or Custom base, then enter a positive number. For Custom base, also supply the base (any positive number other than 1). The calculator instantly returns the result to up to 10 decimal places, an inverse proof showing the base raised to the result equals your number, and for custom bases the change-of-base formula steps using ln(x) / ln(b).
  • Log Type Selector:
    Choose Common log for base-10 calculations (pH, decibels), Natural log for base-e (calculus, growth and decay), Binary log for base-2 (computer science, information theory), or Custom base for any other positive base.
  • Number Field:
    Enter any positive number (x > 0). Logarithms are undefined for zero and negative inputs; the calculator validates this and explains why if you enter an invalid value.
  • Custom Base Field:
    Appears when Custom base is selected. Enter a positive base other than 1. The result uses the change-of-base formula and shows the numeric substitution step by step.
  • Inverse Proof:
    Confirms the result by displaying b raised to the power y equals x. This reinforces the fundamental logarithm–exponent relationship and serves as a built-in verification.

What Is a Logarithm? Inverse of Exponentiation

A logarithm answers: "To what power must we raise the base to get this number?" So
logb(x)=y\log_b(x) = y
means
by=xb^y = x
For example, log₁₀(100) = 2 because 10² = 100. The common log uses base 10 (written log or log₁₀); the natural log uses base e (≈ 2.718), written ln. Logarithms and exponents undo each other: logb(by) = y and blog_b(x) = x. When you need powers, roots, or missing exponents numerically, use the exponent calculator as the forward partner to this log tool. For "What is log base e?" and "Why is log(1) always 0?", see the FAQ above

Common log (base 10): orders of magnitude

Common log (base 10) shows up in pH (pH = −log₁₀[H⁺]), decibels, and any time you count factors of 10. When you rewrite a number as a mantissa times a power of 10, you are leaning on the same idea; the scientific notation calculator helps you move between decimal form and a × 10n. Pick Common log (base 10) in the tool above, enter a positive x, and read log₁₀(x) plus the inverse proof 10y = x.

Common logarithm values (quick reference)

These are anchor values you can sanity-check in your head. They are exact for the entries shown; the live calculator handles arbitrary positive x.
ExpressionValue
log₁₀(1)0
log₁₀(10)1
log₁₀(100)2
log₁₀(1000)3
ln(1)0
ln(e)1
log₂(1)0
log₂(2)1
log₂(8)3

What is the natural log (ln)?

Natural log ln(x) is log base e (Euler's number, about 2.718). It is the default log in calculus because the derivative of ln(x) is 1/x and it describes continuous growth and decay. In the calculator, choose Natural log (base e), type a positive x, and you get ln(x) together with an inverse proof ey = x. For log base e versus common log, see the FAQ above.

How do you calculate log base 2 (binary log)?

Binary log log₂(x) counts powers of 2: it is central to bits, information theory, and divide-by-two algorithms. Pick Binary log (base 2), enter a positive x, and the tool returns y with the check 2y = x. On paper you can use log₂(x) = ln(x) / ln(2); this page's Custom base mode shows the same idea with explicit numeric substitution for any base.

Custom base: change of base in the tool

When the base is not 10, e, or 2, choose Custom base, enter base b (positive, not 1) and number x. The result uses logb(x) = ln(x) / ln(b) and prints the numeric substitution so you can follow the division. The dedicated Change of Base Formula section below repeats the idea with display math if you want the clean formula first.

Characteristic and Mantissa

In decimal form, a logarithm can be split into characteristic (integer part) and mantissa (fractional part). For example, log₁₀(150) ≈ 2.176: the characteristic is 2 (so 10² ≤ 150 < 10³) and the mantissa is 0.176. Historically, log tables (e.g. John Napier's) listed mantissas; you found the characteristic from the size of the number. This calculator gives the full decimal result; the integer part is the characteristic and the remainder is the mantissa.

John Napier and Log Tables

John Napier (1550–1617) published the first tables of logarithms, which turned multiplication into addition and division into subtraction, enormously simplifying calculation before electronic computers. Napier's work used a base related to 1/e; later common logarithms (base 10) became standard for hand calculation. Today we use natural logarithms (base e) in calculus and science. This log calculator gives instant results for any base; the article explains the change of base formula so you can relate different bases.

Three Fundamental Log Laws: Product, Quotient, Power

Product rule:
logb(xy)=logb(x)+logb(y)\log_b(xy) = \log_b(x) + \log_b(y)
, the log of a product is the sum of the logs. Quotient rule:
logb(x/y)=logb(x)logb(y)\log_b(x/y) = \log_b(x) - \log_b(y)
, the log of a quotient is the difference of the logs. Power rule:
logb(xn)=nlogb(x)\log_b(x^n) = n \cdot \log_b(x)
, the log of a power brings the exponent down. These follow from the definition by = x and the laws of exponents. Use this calculator to compute single logarithms; the inverse proof box reinforces the relationship b^y = x

Change of Base Formula

To compute log_b(x) using only natural or common log:
logb(x)=ln(x)ln(b)\log_b(x) = \frac{\ln(x)}{\ln(b)}
So you can find any logarithm with a calculator that has ln or log. Select "Custom base" in this log calculator to see the change of base formula steps applied to your base and number. For a quick summary, see the FAQ "What is the change of base formula?" above

Log Calculator FAQ

How do I use the log base calculator for a custom base?

Select "Custom base" from the mode selector. Enter your base (e.g. 5) in the base field and your number (e.g. 125) in the number field. The log base calculator will compute the result and display the change of base formula steps: logb(x) = ln(x) / ln(b).

What does "log base" mean?

The base of a logarithm is the number being raised to a power. In log₅(125) = 3, the base is 5, meaning 5³ = 125. Common bases are 10 (common log), e (natural log), and 2 (binary log), but this log base calculator accepts any positive base other than 1.

What is log base e?

Log base e is the natural logarithm, written ln(x). The base e (Euler's number, ≈ 2.718) is the natural choice for growth, decay, and calculus. So ln(x) = loge(x). For example, ln(e) = 1 because e¹ = e. Select "Natural log (base e)" in the calculator to compute ln(x).

Can you have a negative log base?

No. Logarithms are defined only for a positive base not equal to 1. If the base were negative or zero, the exponential function by would not be well-behaved for all real y (e.g. negative base with fractional exponent gives non-real results). Base 1 is excluded because 1y = 1 for every y, so there is no unique exponent. This calculator requires base > 0 and base ≠ 1.

Why is log(1) always 0?

Because b⁰ = 1 for any positive base b ≠ 1. The logarithm asks: "To what power must we raise the base to get this number?" So logb(1) = 0 means b⁰ = 1. That holds by definition of zero exponent. So log₁₀(1) = 0, ln(1) = 0, and logb(1) = 0 for any valid base.

How do you convert an exponential equation to a logarithmic one?

If by = x, then logb(x) = y. The base b stays the base, the result x becomes the argument of the log, and the exponent y becomes the value of the log. Example: 10² = 100 → log₁₀(100) = 2. The calculator's "Inverse proof" box shows this relationship for your result.

What is the change of base formula?

To evaluate log_b(x) using another base (e.g. 10 or e):
logb(x)=ln(x)ln(b)\log_b(x) = \frac{\ln(x)}{\ln(b)}
So you can compute any log with a calculator that only has ln or log₁₀. Select "Custom base" in this calculator to see the change of base formula steps

How do you calculate log base 2?

Use log₂(x) = ln(x) / ln(2) (change of base), or open this calculator and choose Binary log (base 2). Example: log₂(8) = 3 because 2³ = 8. The result panel includes an inverse proof so you can check 2^y = x for your number.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools