# Circle Calculator

> Computes the area, circumference, diameter and radius of a circle from either its radius or its diameter. Lengths are unit-agnostic: the area is in the square of the input unit.

- Calculator id: `circle` · Category: Geometry (`geometry`) · Tool name: `calculate_circle_properties`
- Canonical page: https://tttkmbb.com/geometry/circle · This document: https://tttkmbb.com/geometry/circle.md · JSON definition: https://tttkmbb.com/geometry/circle.json

## Purpose

Computes the area, circumference, diameter and radius of a circle from either its radius or its diameter. Lengths are unit-agnostic: the area is in the square of the input unit.

**Use when:** You know a circle's radius or diameter and need its area, circumference or the other dimension.

**Do not use when:** The shape is an ellipse (use ellipse), a solid ball (use sphere) or a disc with thickness (use cylinder).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `radius` | number | units | optional | Radius of the circle. Give either radius or diameter. (> 0) |
| `diameter` | number | units | optional | Diameter of the circle (2 × radius). Used when radius is not given. (> 0) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `radius` | number | units | Radius r (as given, or diameter / 2). |
| `diameter` | number | units | 2·r. |
| `circumference` | number | units | 2·π·r. |
| `area` | number | units² | π·r², in the square of the input unit. |

## Formula

`r = radius (or diameter / 2); diameter = 2·r; circumference = 2·π·r; area = π·r²`

## Data Sources

- Wikipedia – Circle — https://en.wikipedia.org/wiki/Circle (reference, retrieved 2026-09-23)
- Wolfram MathWorld – Circle — https://mathworld.wolfram.com/Circle.html (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/circle?`
- `POST https://tttkmbb.com/api/v1/calculate/circle` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/circle · OpenAPI operationId `calculate_circle_properties` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool: `calculate_circle_properties` (dedicated) or `run_calculator` with `{"calculator_id": "circle", "inputs": {…}}`

## Example

- Radius 3: inputs `{"radius":3}` → `{"radius":3,"diameter":6,"circumference":18.8496,"area":28.2743}`
- Diameter 10: inputs `{"diameter":10}` → `{"radius":5,"circumference":31.4159,"area":78.5398}`

```
GET https://tttkmbb.com/api/v1/calculate/circle?radius=3
```

## Limitations

The shape is an ellipse (use ellipse), a solid ball (use sphere) or a disc with thickness (use cylinder). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**What units are the results in?**

The same unit as the input for lengths and its square for the area: a radius in cm gives a circumference in cm and an area in cm².

**What if I give both radius and diameter?**

They must agree (diameter = 2 × radius); otherwise the calculator returns an INVALID_PARAMETER error rather than guessing which one is right.

**How do I get the radius from the area?**

r = √(area / π). Enter that radius here to get the remaining properties.

## Related

- [Sphere Calculator](https://tttkmbb.com/geometry/sphere.md) — Volume and surface area of a ball with the same radius.
- [Cylinder Calculator](https://tttkmbb.com/geometry/cylinder.md) — Volume of a circular disc or tube with this cross-section.
- [Ellipse Calculator](https://tttkmbb.com/geometry/ellipse.md) — Area and perimeter when the two axes differ.
