---
title: "Calculate the circumference and area of a circle given either a radius or diameter. Provide one or both; if both are given, radius takes precedence. Returns circumference (C = 2πr), area (A = πr²), and both radius and diameter for completeness. Common in mechanical engineering (pulley systems, pipe sizing), electronics (antenna loop calculations, coil winding), civil engineering (manhole covers, circular foundations), and everyday measurement tasks."
method: POST
path: "/api/circumference"
tags: ["general"]
---

# Calculate the circumference and area of a circle given either a radius or diameter. Provide one or both; if both are given, radius takes precedence. Returns circumference (C = 2πr), area (A = πr²), and both radius and diameter for completeness. Common in mechanical engineering (pulley systems, pipe sizing), electronics (antenna loop calculations, coil winding), civil engineering (manhole covers, circular foundations), and everyday measurement tasks.

`POST /api/circumference`

## Request

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

## Request body

- object
  - `radius` number: The radius of the circle (takes precedence over diameter)
  - `diameter` number: The diameter of the circle

## Response `200`

Computed result for circumference

- object
  - `result` object, required
    - `circumference` number, required: Circumference of the circle (C = 2πr)
    - `area` number, required: Area of the circle (A = πr²)
    - `diameter` number, required: Diameter of the circle
    - `radius` number, required: Radius of the circle
  - `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)
