---
slug: logarithm-calculator
title: "Logarithm Calculator"
category: math
updated: 2026-11-17
canonical: https://calcseed.com/c/math/logarithm-calculator/
html: /c/math/logarithm-calculator/
---

# Logarithm Calculator

Calculate the logarithm of a number in any base. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (100, 10), the logarithm is **2**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| Number | 100 |  |
| Base | 10 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Logarithm | 2 |  |

## Formula

```text
log_base_(x) = y    means    base^y = x
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| Number | number |  | 100 |
| Base | number |  | 10 |

## Outputs

| Result | Format |
| --- | --- |
| Logarithm | primary |
| Logarithm | number |

## How it works

### What this calculator does

Enter a number x and a base, and the calculator returns the exponent that turns the base into x. At the defaults it computes log base 10 of 100 and returns 2, because 10² = 100. Any base from just above 1 to a million works, and the number can be as small as a millionth, which produces negative logarithms such as log base 10 of 0.001 = −3.

### What a logarithm is

A logarithm runs exponentiation backwards. Where 10² = 100 asks for the result of a power, log base 10 of 100 = 2 asks for the power itself. The two statements carry identical information, which is why logarithms feel awkward at first: you are reading the exponent off the answer instead of the value.

Three anchor values fix the intuition. The logarithm of 1 is always 0, whatever the base, because base&#8317; = 1. The logarithm of the base itself is 1. And the logarithm of a number smaller than 1 is negative, since a negative power means division. Everything else sits between or beyond those markers.

Fractional results mean fractional powers, and they check out the same way. Since 9&#8305;&#178; = 3 — the square root of 9 — the value log base 9 of 3 is exactly 0.5. A result of 2.5 in base 10 corresponds to 10².&#8309; ≈ 316, halfway between 100 and 1,000 on a log scale, which is exactly how the minor gridlines on logarithmic graph paper are spaced.

#### Worked example: log base 10 of 100

The calculator evaluates it through natural logs: log base 10 of 100 = ln(100) ÷ ln(10) = 4.6052 ÷ 2.3026 = 2. Check the direction by exponentiating: 10² = 100, so the answer is right. The same method runs for any base, because the ratio of two natural logs is a pure number with no units of scale.

### The change-of-base rule

Any logarithm can be computed from any other base by division: log base b of x equals ln(x) ÷ ln(b), or equally log base 10 of x ÷ log base 10 of b. That is the only formula this calculator needs, and it is the trick that unlocks base-2 and base-3 problems on calculators that only carry ln and log buttons.

A second worked example shows the rule in action. To find log base 2 of 100, divide ln(100) by ln(2): 4.6052 ÷ 0.6931 ≈ 6.64. Verify by exponentiating: 2&#8310;.&#8310;&#8308; ≈ 100, which checks out. In whole-number terms, 2&#8310; = 64 falls short of 100 while 2&#8311; = 128 overshoots, so the true answer must lie between 6 and 7, exactly where 6.64 sits.

### Logarithms at a glance

| Base | x | log |
| --- | --- | --- |
| 10 | 100 | 2 |
| 10 | 1,000 | 3 |
| 10 | 0.001 | −3 |
| 10 | 1 | 0 |
| 2 | 8 | 3 |
| 2 | 1,024 | 10 |
| 2 | 100 | ≈ 6.64 |

The base-2 rows matter in computing because they count halvings and doublings. A value of 1,024 items needs log base 2 of 1,024 = 10 comparisons in a binary search, and storing a number up to 1,000 requires about 6.64 bits&rsquo; worth of information, rounded up to 10 bits in practice. Each whole step in a base-2 logarithm is one doubling.

### Where logarithms show up

#### Science scales

Science uses base-10 logarithms to compress enormous ranges. pH is −log base 10 of hydrogen ion concentration, so a pH 4 solution is ten times more acidic than pH 5. Earthquake magnitude works the same way: each whole step is a tenfold jump in shaking amplitude. Decibels compress sound pressure with a similar ratio, which is why 90 decibels is not a little louder than 70 but a hundred times the intensity.

#### Money and machines

Money and growth lean on natural logarithms. The time for an investment to double at 5 percent annual growth is ln(2) ÷ ln(1.05) = 0.6931 ÷ 0.0488 ≈ 14.2 years, and the shortcut Rule of 72 gives 72 ÷ 5 = 14.4, close to the exact figure. Computer science reaches for base 2 in algorithm analysis, since a binary search over a million sorted records needs only log base 2 of 1,000,000 ≈ 20 steps.

### Common mistakes

- Reading log(100) as 100 multiplied by something; it is the exponent, 2 in base 10
- Adding logarithms of the same base expecting a larger log; log(100) + log(1000) = log(100,000) = 5, because logs add when values multiply
- Assuming log means base e; on most calculators log is base 10 and ln is base e, and mixing them skews results badly
- Taking the log of a non-positive number; zero and negatives have no real logarithm
- Dividing logs in the wrong order in the change-of-base rule; ln(x) ÷ ln(base) is not the same as ln(base) ÷ ln(x)

The addition property is worth memorizing because it reverses most arithmetic errors: logarithms turn multiplication into addition, powers into multiplication, and division into subtraction. If you compute log(200) ≈ 2.301 in base 10, sanity-check it against log(2) ≈ 0.301 plus log(100) = 2, and the pieces should reassemble exactly.

## FAQ

### How do I calculate a logarithm?

Divide the natural log of the number by the natural log of the base. For log base 10 of 100 that is ln(100) ÷ ln(10) = 4.6052 ÷ 2.3026 = 2. This change-of-base rule works for any base.

### What is the difference between log and ln?

ln is the natural logarithm in base e ≈ 2.718, while log conventionally means base 10. The value log base 10 of 100 is 2, while ln(100) ≈ 4.605.

### What is the log of 1 in any base?

Zero, because any positive base raised to the power 0 equals 1. This holds for base 2, base 10, base e and every other valid base.

### How do I find log base 2 of a number?

Divide ln(x) by ln(2) ≈ 0.6931. For x = 100 the result is 4.6052 ÷ 0.6931 ≈ 6.64, and indeed 2&#8310; = 64 and 2&#8311; = 128 bracket 100.

### Can a logarithm be negative?

Yes, when the input is between 0 and 1. Since 10²³ = 0.001, log base 10 of 0.001 = −3. The logarithm of exactly 1 is 0, the crossover point.

### Why is pH a logarithm?

Hydrogen ion concentrations span many orders of magnitude, and pH = −log base 10 of the concentration compresses them into a 0 to 14 scale. Each one-step change is a tenfold concentration change.

### How long does money take to double at 5 percent?

Solve 1.05&#8311; = 2 by taking logs: t = ln(2) ÷ ln(1.05) ≈ 14.2 years. The Rule of 72 shortcut gives 72 ÷ 5 = 14.4, within about 0.2 years.

### How many steps does a binary search need?

About log base 2 of the list size. A million sorted records need log base 2 of 1,000,000 ≈ 19.9, so at most 20 comparisons locate any item.

### Why does the calculator refuse x = 0 or a negative x?

No real power of a positive base produces zero or a negative result, so the logarithm is undefined there. The input floor of 0.000001 keeps the computation meaningful.

## Method and sources

Methodology: Results follow exact mathematical definitions; the arithmetic is deterministic and can be verified by hand from the steps shown.

Last updated: 2026-11-17.
- Logarithm identity and change of base: log_base(x) = ln(x) / ln(base).
