Logarithm calculator
Find log base b of x in one step: log base 10 of 100 is 2, and the natural log of 100, 4.60517018599, appears alongside. Any positive base other than 1 works through the change-of-base formula. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Argument of the logarithm
- 100
- Base of the logarithm
- 10
- Log
- 2
- Ln
- 4.605170186
- Log10
- 2
A logarithm answers the exponent question: to what power must you raise base b to recover the argument x? Students first meet common logs (base ten) and natural logs (base e) when undoing exponential growth, converting orders of magnitude, or solving a^t equals N. Engineers and data workers use the same identity when converting between decibel scales, half-life models, and multiplicative factors.
What logarithms measure and why change of base matters
By definition, y equals log base b of x means that b raised to y equals x. That single identity is why logarithms undo exponential equations, turn products into sums, and convert multiplicative ratios into additive distances on a log scale. The natural logarithm uses base e and is written ln x; the common logarithm uses base ten and is often written log x or log10 x.
Any other base is equally valid as long as the base is positive and not equal to one, because only then is the exponential map strictly monotone and invertible on the positive reals. Both numerators and denominators use the same intermediate base, so the ratio is independent of which intermediate base you pick.
This capability always computes with natural logs under the hood and also surfaces ln(x) and log10(x) so you can check homework steps, plot against either axis, or feed downstream formulas that expect a specific base without a second call.
Practical use, pricing, limits, and delivery
Use the browser tool when you want an immediate log base b of x while checking homework, preparing a lecture slide, or converting a scale factor without installing a computer-algebra system. There is no language model, no external math service, and no randomness, so the capability is safe to pin in continuous-integration checks and reproducible lesson materials. Results are fully deterministic: the same x and b always yield the same log, ln, and log10.
Prefer this calculator when you need an arbitrary positive base; if you only ever need natural or common logs, the same response still gives both as side products. Keep inputs within ordinary floating-range magnitudes so cancellation in extreme ratios does not dominate; for classroom integers and typical engineering scales the result is exact within double precision. Source inputs and outputs follow the same retention rules as other KIT parse items, and a failed task is never charged after validation.
What you can do with it
Homework and tutoring verification
Students and graders confirm log base b of x, including domain errors that correctly fail, without a local CAS install.
Scale conversion in data pipelines
Scripts that convert growth factors, decibel-style ratios, or order-of-magnitude steps call a deterministic log oracle instead of reimplementing change of base in every language.
Teaching change of base
Lesson pages can show log, ln, and log10 side by side so learners connect the change-of-base formula to concrete numeric checks.
FAQ
What happens if x or b is not positive, or b equals 1?
Logarithms are only defined for positive arguments with a positive base other than one.
Which formula does the calculator use?
The natural and common logs of x are returned alongside the arbitrary-base result.
Is the logarithm calculator free?
The browser tool runs free on your device.
Why does the result also show ln and log10?
So you can check homework steps, plot on either kind of axis or use a formula that expects a specific base without a second calculation. For 100, the natural log is 4.60517018599 and the common log is 2.
Where are logarithms used outside math class?
In decibel scales, half-life models, orders of magnitude and any multiplicative factor turned into an additive distance. A logarithm undoes exponential growth, which is why it shows up wherever quantities multiply.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/logarithm \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"x":100,"b":10}'const res = await fetch("https://api.kit.forhosting.com/algebra/logarithm", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"x": 100,
"b": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/logarithm",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"x": 100,
"b": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/logarithm", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"x":100,"b":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"x":100,"b":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/logarithm", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"x": 100,
"b": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.logarithm",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capability computes log base b of x with the change-of-base formula, log_b(x) equals ln(x) divided by ln(b), and also returns the natural logarithm and the common logarithm of x in one deterministic response. Inputs must be positive finite numbers and the base must not equal one; otherwise the request fails with invalid_input instead of returning NaN.
What logarithms measure and why change of base matters
Calculators and programming languages usually expose only a few bases, so the change-of-base formula is the practical bridge: log_b(x) equals ln(x) over ln(b), or equivalently log10(x) over log10(b).
How to call the calculator and read the response
The argument x must be strictly greater than zero, and the base b must be strictly greater than zero and not equal to one within a tight floating-point epsilon. Numeric dust near zero is cleaned so goldens and human-readable demos stay stable, while ordinary non-integer reals keep full double precision. Typical classroom checks include log base ten of one hundred equals two, log base two of eight equals three, and ln of e equals one. Send a JSON body with the two required numbers x and b. The engine validates that both are finite numbers; missing fields, non-numeric strings, and NaN or Infinity fail immediately with invalid_input and are not charged. On success the response echoes the cleaned x and b, returns log as log_b(x), returns ln as the natural logarithm of x, returns log10 as the common logarithm of x, and includes a short formula string documenting the change-of-base identity used. Wire the endpoint into scripts that already speak JSON and need a stable contract rather than reimplementing floating-point domain checks in every language.
Practical use, pricing, limits, and delivery
Each successful request is one billable item at $0.002; failed validation and domain errors do not consume balance.
Technical questions
How do I compute log base b of x with this API?
Send JSON with positive numbers x and b (b ≠ 1). The response returns log (log_b(x)), ln, log10, and the change-of-base formula string.
Does it solve equations like log_b(x) = k for x?
No. This capacity evaluates logarithms for given x and b. Solving for the argument or the base is a different algebraic task.