Log Calculator

Calculate logarithms with any base

Solve logarithmic equations by finding the logarithm value, or determine unknown variables

Frank Zhao - Creator
CreatorFrank Zhao

The number for which you want to find the logarithm. Must be positive. Type "e" for Euler's number.

The base of the logarithm. Common bases: 10 (common log), 2 (binary), or type "e" for natural log (e ≈ 2.71828)

← Calculating this

The result of the logarithm operation (the exponent). Type "e" for Euler's number.

Log Calculator Overview

This Log Calculator is a versatile tool designed to solve logarithmic equations instantly. Whether you need to find the logarithm value itself, determine the base, or calculate the number argument, this tool handles it all with high precision.

It solves for any variable in the equation y=logb(x)y = \log_b(x). You might be a student tackling algebra homework, a scientist working with pH scales, or a software engineer analyzing algorithm complexity—this calculator is built for you.

Looking for exponents?

Logarithms are just the inverse of exponents! If you're working with growth rates or compound interest directly, you might also find our Generation Time Calculator useful for exponential growth scenarios.

How to Use / Quick Start

Follow these simple steps to solve your logarithmic equation:

  1. Select what to solve for: Choose "Logarithm (y)", "Number (x)", or "Base (b)" from the radio buttons.
  2. Enter the known values: Fill in the two fields that appear.
    • If solving for y, enter Base (b) and Number (x).
    • If solving for x, enter Base (b) and Logarithm (y).
    • If solving for b, enter Number (x) and Logarithm (y).
  3. Read the result: The answer appears instantly below.

Example: Calculating log2(8)\log_2(8)

1. Select "Solve for Logarithm (y)".

2. Enter 2 for Base (b).

3. Enter 8 for Number (x).

4. Result flashes: 3.

Calculation: 3=log2(8)3 = \log_2(8) because 23=82^3 = 8.

Real-World Examples

Earthquake Magnitude

The Richter scale uses base-10 logarithms. How much stronger is an amplitude of 100,000 compared to a standard baseline?

Base (b):10
Number (x):100,000

Result: 5.0

5=log10(100,000)5 = \log_{10}(100,000). This is a Magnitude 5.0 earthquake.

Sound Intensity (dBs)

Decibels are logarithmic. If sound intensity is 10001000 times the threshold, what is the level in Bels?

Base (b):10
Number (x):1000

Result: 3 Bels

Multiplied by 10 gives 30 dB.
3=log10(1000)3 = \log_{10}(1000)

Doubling Money

At 100% growth (base 2), you want to reach 16x your initial investment. How many periods?

Base (b):2
Number (x):16

Result: 4 periods

It takes 4 doubling periods to grow 16x.4=log2(16)4 = \log_{2}(16)

When to Use Logarithms

Comparing Huge Ranges

When data spans many orders of magnitude (like star brightness or internet traffic), logs make the scale manageable to visualize.

Algorithm Analysis

Computer scientists use log2\log_2 to determine how efficient a binary search algorithm is.

Measuring Acidity (pH)

pH is the negative log of Hydrogen ion concentration. pH=log10[H+]\text{pH} = -\log_{10}[H^+].

Solving for Time

If you know the constant growth rate and the final amount, use logs to find how long it took.

Tips & Best Practices

Valid Inputs Only

The base bb must be positive and not 1. The argument xx must be positive.

Use 'e' for Base

You can type "e" in the Base field to calculate the Natural Logarithm (ln\ln).

Common Logs

In many textbooks, "log" without a base implies base 10 (Common Log), while "ln" implies base ee (Natural Log). Always check your base!

Calculation Method & Formulas

The fundamental relationship between logarithms and exponents is:

logb(x)=y\log_b(x) = yby=xb^y = x

When solving for different variables, we use these rearrangements:

Solve for y (Logarithm)

y=ln(x)ln(b)y = \frac{\ln(x)}{\ln(b)}

Change of Base Formula

Solve for x (Number)

x=byx = b^y

Solve for b (Base)

b=x(1/y)b = x^{(1/y)}

Nth root of x

Where:
bb is the base
xx is the number (argument)
yy is the logarithm (exponent)