Logarithm Calculator Formula

Understand the math behind the logarithm calculator. Each variable explained with a worked example.

Formulas Used

Log10 Val

log10_val = log10(x)

Ln Val

ln_val = log(x)

Custom Log

custom_log = log(x) / log(base_val)

Variables

VariableDescriptionDefault
xNumber100
base_valCustom Base2

How It Works

How Logarithms Work

Definition

log_b(x) = y means b^y = x

The logarithm answers: "To what power must I raise the base to get this number?"

Common Types

  • log₁₀(x): Common logarithm (base 10)
  • ln(x): Natural logarithm (base e ≈ 2.71828)
  • log₂(x): Binary logarithm (base 2)
  • Change of Base Formula

    log_b(x) = ln(x) / ln(b)

    Worked Example

    Calculate the logarithms of 100.

    x = 100base_val = 2
    1. 01log₁₀(100) = 2 (because 10² = 100)
    2. 02ln(100) ≈ 4.605170
    3. 03log₂(100) = ln(100)/ln(2) ≈ 6.643856

    Ready to run the numbers?

    Open Logarithm Calculator