How to Use the Log Function on a Calculator

Whether you're solving a chemistry equation, working through an algebra problem, or converting decibel levels, the log function on a calculator is one of those buttons that looks intimidating but follows a very consistent logic once you understand what it's actually doing.

What "Log" Means on a Calculator

The log button on a standard calculator computes the base-10 logarithm of a number — also called the common logarithm. When you press log(100), the calculator returns 2, because 10² = 100.

There's also the ln button, which computes the natural logarithm — base e (approximately 2.71828). These two are related but not interchangeable, and mixing them up is one of the most common calculator mistakes in math and science courses.

ButtonNameBaseExample
logCommon logarithm10log(1000) = 3
lnNatural logarithme ≈ 2.718ln(1) = 0
log_bCustom base (some calculators)Any base blog₂(8) = 3

How to Press Log on Different Calculator Types 🔢

The exact steps depend on what kind of calculator you're using.

Basic Scientific Calculator (Physical)

On most scientific calculators like a Casio fx-series or TI-30:

  1. Type the number first or press log first, depending on the model
  2. On most modern calculators: press log, then enter your number, then = or ) + =
  3. On older models: enter the number first, then press log

Check whether your calculator uses "input-then-function" or "function-then-input" order — this varies by brand and model generation.

Graphing Calculator (TI-84, Casio fx-9750, etc.)

On graphing calculators:

  • Press the log key (usually near the top-left of the keypad)
  • The calculator automatically opens a parenthesis: log(
  • Type your number, close the parenthesis, and press ENTER
  • Example: log(500) → press log, 5, 0, 0, ), ENTER

For logarithms with a different base on a TI-84 Plus CE or newer:

  • Use the logBASE template found under MATH → MATH menu
  • This lets you compute log₂(8) or log₅(25) directly

Smartphone Calculators

On iOS Calculator:

  • Rotate to landscape mode to unlock the scientific layout
  • The log button appears in the expanded keypad

On Android Calculator (Google Calculator or Samsung):

  • Tap the function expansion button (usually an arrow or "INV" label)
  • log and ln become visible in the expanded row

Online and Browser-Based Calculators

Tools like Desmos, WolframAlpha, and Google's built-in calculator accept log(x) typed directly. WolframAlpha also accepts log base 2 of 8 in plain English.

Common Scenarios Where Log Is Used

Understanding the why helps you use it correctly:

  • pH calculations in chemistry: pH = –log[H⁺]
  • Decibels in audio/acoustics: dB = 10 × log(P₁/P₀)
  • Richter scale for earthquakes
  • Compound interest and exponential growth problems
  • Binary and computer science concepts (log base 2)

In most school and general-purpose contexts, when a problem just says "log" without specifying a base, it means base 10. In higher mathematics and many programming languages, "log" often defaults to natural log (base e) — so context matters.

Variables That Change the Experience

How you actually use the log function depends on several factors:

  • Calculator model and generation — Input order and menu structure differ between brands and even between versions of the same product line
  • Whether you need a non-base-10 log — Older calculators may require using the change-of-base formula: log_b(x) = log(x) ÷ log(b)
  • The subject or discipline — Physics, chemistry, finance, and CS each have conventions about which log base is standard
  • Whether you're using hardware or software — Physical calculators, phone apps, and web tools each have different interfaces and may handle edge cases (like log of a negative number) differently

The Change-of-Base Formula: A Practical Workaround 📐

If your calculator only has log (base 10) and ln (base e), you can still calculate any logarithm using this formula:

log_b(x) = log(x) ÷ log(b)

For example, to find log₂(64): log(64) ÷ log(2) = 1.806 ÷ 0.301 = 6

This works because 2⁶ = 64. The same formula works using ln in both the numerator and denominator.

When Log Returns an Error

Calculators return an error — or in software, a non-real or undefined result — when you try to take the log of:

  • Zero (undefined — there's no power of 10 that equals zero)
  • A negative number (not defined in real numbers — requires complex math)

If you're getting an unexpected error, checking the sign and value of your input is the first place to look.


The mechanics of pressing the log button are simple once you know your calculator's input order and which log base you need. What varies significantly is how those factors stack up in your specific situation — the calculator you have, the math you're doing, and whether your context treats "log" as base 10 or base e by default. Those details are the ones only your own setup can answer.