---
title: "Compute logarithms of a positive number in any base. Returns the custom-base logarithm, natural logarithm (ln), common logarithm (log10), and binary logarithm (log2). Useful for signal processing (decibel calculations), information theory (entropy in bits), pH chemistry, and general scientific computation. Uses the change-of-base formula log_b(x) = ln(x) / ln(b). Feeds into exponent_calc for inverse operations and scientific_notation for order-of-magnitude analysis."
method: POST
path: "/api/log_calc"
tags: ["general"]
---

# Compute logarithms of a positive number in any base. Returns the custom-base logarithm, natural logarithm (ln), common logarithm (log10), and binary logarithm (log2). Useful for signal processing (decibel calculations), information theory (entropy in bits), pH chemistry, and general scientific computation. Uses the change-of-base formula log_b(x) = ln(x) / ln(b). Feeds into exponent_calc for inverse operations and scientific_notation for order-of-magnitude analysis.

`POST /api/log_calc`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/log_calc`
- Auth: none declared

## Request body

- object
  - `value` number, required: The positive number to compute the logarithm of
  - `base` number: The logarithm base (default 10). Must be positive and not equal to 1

## Response `200`

Computed result for log_calc

- object
  - `result` object, required
    - `result` number, required: Logarithm of the value in the specified base: log_base(value)
    - `natural_log` number, required: Natural logarithm (ln) of the value
    - `log10` number, required: Common logarithm (base 10) of the value
    - `log2` number, required: Binary logarithm (base 2) of the value
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
